Renamed UITabWidget "TabContainer" to "TabBar".

Added UITabWidget::set/getHideWhenNotNeeded to hide the TabBar if only 1 tab is available.
UIStyle now restricts the animations in the first onStateChange received (sin there's no previous state to animate from).
Added UISplitter::swap.
Critical fix in Node::setParent.
Added Node::findByType.
Fixed Code Editor splitting.
Minor improvements in Code Editor.
This commit is contained in:
Martín Lucas Golini
2020-06-04 02:23:21 -03:00
parent 601354f3b3
commit 951d7b2e7e
22 changed files with 354 additions and 95 deletions

View File

@@ -5,6 +5,8 @@
class App {
public:
enum class SplitDirection { Left, Right, Top, Bottom };
~App();
void init( const std::string& file = "" );
@@ -25,15 +27,17 @@ class App {
UICodeEditor* createCodeEditor();
UISplitter* createEditorWithSplitter( Node* parent );
UITabWidget* tabWidgetFromEditor( UICodeEditor* editor );
UISplitter* splitterFromEditor( UICodeEditor* editor );
std::pair<UITab*, UICodeEditor*> createCodeEditorInTabWidget( UITabWidget* tabWidget );
UITabWidget* createEditorWithTabWidget( UISplitter* splitter );
UITabWidget* createEditorWithTabWidget( Node* parent );
void splitEditor( const UIOrientation& orientation );
void splitEditor( const SplitDirection& direction, UICodeEditor* editor );
void focusSomeEditor( Node* searchFrom = NULL );
protected:
EE::Window::Window* mWindow{NULL};
@@ -58,6 +62,8 @@ class App {
bool onCloseRequestCallback( EE::Window::Window* );
void closeCurrrentTab();
void onTabClosed( const TabEvent* tabEvent );
};
#endif // EE_TOOLS_CODEEDITOR_HPP