ecode: Added Terminal menu.

This commit is contained in:
Martín Lucas Golini
2022-09-12 01:38:11 -03:00
parent db57f39ae3
commit 19e2aba3ba
8 changed files with 110 additions and 6 deletions

View File

@@ -118,6 +118,12 @@ class EE_API UICodeEditorSplitter {
void applyColorScheme( const SyntaxColorScheme& colorScheme );
void forEachWidgetType( const UINodeType& nodeType,
std::function<void( UIWidget* )> run ) const;
void forEachWidgetTypeStoppable( const UINodeType& nodeType,
std::function<bool( UIWidget* )> run ) const;
void forEachWidgetStoppable( std::function<bool( UIWidget* )> run ) const;
void forEachWidget( std::function<void( UIWidget* )> run ) const;

View File

@@ -87,6 +87,8 @@ template <typename T> class UIDataBind {
*data = t;
setValueChange();
inSetValue = false;
if ( onValueChangeCb )
onValueChangeCb( t );
}
const T& get() const { return *data; }
@@ -127,6 +129,8 @@ template <typename T> class UIDataBind {
const PropertyDefinition* getPropertyDefinition() const { return property; }
std::function<void( const T& newVal )> onValueChangeCb;
protected:
T* data{ nullptr };
std::set<UIWidget*> widgets;
@@ -172,6 +176,8 @@ template <typename T> class UIDataBind {
widget->applyProperty( prop );
}
inSetValue = false;
if ( onValueChangeCb )
onValueChangeCb( val );
}
}