mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
TreeView in ecode and more fixes and improvements for the abstract views, treeview and models.
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
#include <eepp/ui/uitheme.hpp>
|
||||
#include <eepp/ui/uithememanager.hpp>
|
||||
#include <eepp/ui/uitouchdraggablewidget.hpp>
|
||||
#include <eepp/ui/uitreeview.hpp>
|
||||
#include <eepp/ui/uiviewpager.hpp>
|
||||
#include <eepp/ui/uiwidget.hpp>
|
||||
#include <eepp/ui/uiwidgetcreator.hpp>
|
||||
@@ -71,4 +72,8 @@
|
||||
#include <eepp/ui/tools/uicodeeditorsplitter.hpp>
|
||||
#include <eepp/ui/tools/uicolorpicker.hpp>
|
||||
|
||||
#include <eepp/ui/models/filesystemmodel.hpp>
|
||||
#include <eepp/ui/models/model.hpp>
|
||||
#include <eepp/ui/models/modelselection.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,7 @@ class EE_API UIAbstractTableView : public UIAbstractView {
|
||||
|
||||
bool isType( const Uint32& type ) const;
|
||||
|
||||
virtual Float getRowHeight() const { return getHeaderHeight(); }
|
||||
virtual Float getRowHeight() const;
|
||||
|
||||
virtual Float getHeaderHeight() const;
|
||||
|
||||
@@ -34,6 +34,8 @@ class EE_API UIAbstractTableView : public UIAbstractView {
|
||||
|
||||
void setColumnHidden( const size_t& column, bool hidden );
|
||||
|
||||
void setColumnsHidden( const std::vector<size_t> columns, bool hidden );
|
||||
|
||||
virtual void selectAll();
|
||||
|
||||
const Float& getDragBorderDistance() const;
|
||||
@@ -42,6 +44,8 @@ class EE_API UIAbstractTableView : public UIAbstractView {
|
||||
|
||||
Vector2f getColumnPosition( const size_t& index );
|
||||
|
||||
int visibleColumnCount() const;
|
||||
|
||||
protected:
|
||||
friend class EE::UI::UITableHeaderColumn;
|
||||
|
||||
@@ -71,8 +75,14 @@ class EE_API UIAbstractTableView : public UIAbstractView {
|
||||
|
||||
virtual void onColumnResizeToContent( const size_t& colIndex );
|
||||
|
||||
virtual void updateColumnsWidth();
|
||||
|
||||
virtual void updateScroll();
|
||||
|
||||
void updateHeaderSize();
|
||||
|
||||
int visibleColumn();
|
||||
|
||||
UILinearLayout* mHeader;
|
||||
Float mDragBorderDistance{8};
|
||||
};
|
||||
|
||||
@@ -11,18 +11,27 @@ using namespace EE::UI::Models;
|
||||
|
||||
namespace EE { namespace UI { namespace Abstract {
|
||||
|
||||
enum class ModelEventType { Open };
|
||||
|
||||
class EE_API ModelEvent : public Event {
|
||||
public:
|
||||
ModelEvent( Model* model, const ModelIndex& index, Node* node ) :
|
||||
Event( node, Event::OnModelEvent ), model( model ), index( index ) {}
|
||||
ModelEvent( Model* model, const ModelIndex& index, Node* node,
|
||||
const ModelEventType& modelEventType = ModelEventType::Open ) :
|
||||
Event( node, Event::OnModelEvent ),
|
||||
model( model ),
|
||||
index( index ),
|
||||
modelEventType( modelEventType ) {}
|
||||
|
||||
const Model* getModel() const { return model; }
|
||||
|
||||
const ModelIndex& getModelIndex() const { return index; }
|
||||
|
||||
const ModelEventType& getModelEventType() const { return modelEventType; }
|
||||
|
||||
protected:
|
||||
const Model* model;
|
||||
ModelIndex index;
|
||||
ModelEventType modelEventType;
|
||||
};
|
||||
|
||||
class EE_API UIAbstractView : public UIScrollableWidget {
|
||||
|
||||
@@ -45,6 +45,7 @@ class EE_API FileSystemModel : public Model {
|
||||
FileInfo mInfo;
|
||||
std::vector<Node> mChildren;
|
||||
bool mHasTraversed{false};
|
||||
bool mInfoDirty{true};
|
||||
bool mSelected{false};
|
||||
ModelIndex index( const FileSystemModel& model, int column ) const;
|
||||
void traverseIfNeeded( const FileSystemModel& );
|
||||
|
||||
@@ -81,6 +81,8 @@ class EE_API UICodeEditorSplitter {
|
||||
|
||||
UITabWidget* createEditorWithTabWidget( Node* parent );
|
||||
|
||||
UITab* isDocumentOpen( const std::string& path ) const;
|
||||
|
||||
void applyColorScheme( const SyntaxColorScheme& colorScheme );
|
||||
|
||||
void forEachEditor( std::function<void( UICodeEditor* )> run );
|
||||
|
||||
Reference in New Issue
Block a user