mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Added:
UIWidgetCreator::registerWidget UIWidgetCreator::unregisterWidget UIWidgetCreator::isWidgetRegistered --HG-- branch : dev
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user