#include <OpenGUI_WidgetManager.h>
Public Types | |
| typedef std::pair< std::string, std::string > | WidgetRegPair |
| inner type of WidgetRegPairList | |
| typedef std::list< WidgetRegPair > | WidgetRegPairList |
| return type of GetRegisteredWidgets() | |
| typedef std::list< std::string > | WidgetDefList |
| return type of GetDefinedWidgets() | |
Public Member Functions | |
| Widget * | CreateRawWidget (const std::string &Name, const std::string &Library="") |
Create a Widget that was registered under the given Name and optionally Library. | |
| Widget * | CreateDefinedWidget (const std::string &Name) |
| Creates and initializes a Widget that was previously defined by DefineWidget(). | |
| void | DefineWidget (const std::string &Name, const ValueList &propertyList, const std::string &BaseName, const std::string &BaseLibrary) |
Defines a new Widget under the given Name with the given propertyList, using BaseName and BaseLibrary as the source. | |
| void | UndefineWidget (const std::string &Name) |
Undefines an existing Widget definition by Name. | |
| void | RegisterWidgetFactory (const std::string &Name, const std::string &Library, WidgetFactoryCallback *factoryCallback) |
| Register a Widget factory. | |
| void | UnregisterWidgetFactory (const std::string &Name, const std::string &Library) |
| Unregister a Widget factory. | |
| WidgetRegPairList | GetRegisteredWidgets () |
| returns a pair list of all registered widgets | |
| WidgetDefList | GetDefinedWidgets () |
| returns a list of all defined widgets | |
| void | getStats (size_t &RegWidgets, size_t &RegLibs, size_t &DefWidgets) |
| returns the number of registered widgets across the number of libraries, as well as the number of widget definitions | |
Static Public Member Functions | |
| static WidgetManager & | getSingleton (void) |
| Retrieve the current singleton, if one exists. If none exists, this will cause an error. | |
| static WidgetManager * | getSingletonPtr (void) |
| Retrieve a pointer to the current singleton, if one exists. If none exists, this will return 0. | |
| typedef std::list<std::string> OpenGUI::WidgetManager::WidgetDefList |
return type of GetDefinedWidgets()
| typedef std::pair<std::string, std::string> OpenGUI::WidgetManager::WidgetRegPair |
inner type of WidgetRegPairList
| typedef std::list<WidgetRegPair> OpenGUI::WidgetManager::WidgetRegPairList |
return type of GetRegisteredWidgets()
| Widget * OpenGUI::WidgetManager::CreateDefinedWidget | ( | const std::string & | Name | ) |
Creates and initializes a Widget that was previously defined by DefineWidget().
| Widget * OpenGUI::WidgetManager::CreateRawWidget | ( | const std::string & | Name, | |
| const std::string & | Library = "" | |||
| ) |
Create a Widget that was registered under the given Name and optionally Library.
If Library is not given or is "", the value of Name will be tested to see if it is in a packed Name:Library format. If so then the packed value will be exploded and used, otherwise the full list of registered cursors is walked and the first entry with a matching Name is used.
| void OpenGUI::WidgetManager::DefineWidget | ( | const std::string & | Name, | |
| const ValueList & | propertyList, | |||
| const std::string & | BaseName, | |||
| const std::string & | BaseLibrary | |||
| ) |
Defines a new Widget under the given Name with the given propertyList, using BaseName and BaseLibrary as the source.
| WidgetManager::WidgetDefList OpenGUI::WidgetManager::GetDefinedWidgets | ( | ) |
returns a list of all defined widgets
| WidgetManager::WidgetRegPairList OpenGUI::WidgetManager::GetRegisteredWidgets | ( | ) |
returns a pair list of all registered widgets
| WidgetManager & OpenGUI::WidgetManager::getSingleton | ( | void | ) | [static] |
Retrieve the current singleton, if one exists. If none exists, this will cause an error.
| WidgetManager * OpenGUI::WidgetManager::getSingletonPtr | ( | void | ) | [static] |
Retrieve a pointer to the current singleton, if one exists. If none exists, this will return 0.
| void OpenGUI::WidgetManager::getStats | ( | size_t & | RegWidgets, | |
| size_t & | RegLibs, | |||
| size_t & | DefWidgets | |||
| ) |
returns the number of registered widgets across the number of libraries, as well as the number of widget definitions
| void OpenGUI::WidgetManager::RegisterWidgetFactory | ( | const std::string & | Name, | |
| const std::string & | Library, | |||
| WidgetFactoryCallback * | factoryCallback | |||
| ) |
Register a Widget factory.
| void OpenGUI::WidgetManager::UndefineWidget | ( | const std::string & | Name | ) |
Undefines an existing Widget definition by Name.
| void OpenGUI::WidgetManager::UnregisterWidgetFactory | ( | const std::string & | Name, | |
| const std::string & | Library | |||
| ) |
Unregister a Widget factory.