UIWidgetCreator::registerWidget
UIWidgetCreator::unregisterWidget
UIWidgetCreator::isWidgetRegistered

--HG--
branch : dev
This commit is contained in:
Martín Lucas Golini
2017-12-17 03:17:27 -03:00
parent 1902a22783
commit e807877cdd
2 changed files with 28 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ namespace EE { namespace UI {
class EE_API UIWidgetCreator {
public:
typedef cb::Callback1<UIWidget*, std::string> CustomWidgetCb;
typedef cb::Callback0<UIWidget*> RegisterWidgetCb;
static UIWidget * createFromName( std::string widgetName );
@@ -17,8 +18,17 @@ class EE_API UIWidgetCreator {
static void removeCustomWidgetCallback( std::string widgetName );
static bool existsCustomWidgetCallback( std::string widgetName );
static void registerWidget( std::string widgetName, const RegisterWidgetCb& cb );
static void unregisterWidget( std::string widgetName );
static bool isWidgetRegistered( std::string widgetName );
protected:
typedef std::map<std::string, UIWidgetCreator::CustomWidgetCb> WidgetCallbackMap;
typedef std::map<std::string, UIWidgetCreator::RegisterWidgetCb> RegisteredWidgetCallbackMap;
static RegisteredWidgetCallbackMap registeredWidget;
static WidgetCallbackMap widgetCallback;
};