Unigine::UserInterface Class
Interface for gui.
To use this class, include the UnigineUserInterface.h file.
Unigine::UserInterface Class
Members
virtual ~UserInterface ()
Virtual destructor.static Ptr< UserInterface > create (const GuiPtr & gui, const char * name, const char * prefix)
UserInterface constructor.Arguments
- const GuiPtr & gui - Gui smart pointer.
- const char * name - User interface name.
- const char * prefix - Names prefix.
Return value
Pointer to the created user interface.virtual void updateWidgets () const =0
Updates all widgets belonging to the user interface. This function should be called, for example, after change of the interface language.virtual int getNumWidgets () const =0
Returns the number of associated widgets.Return value
Number of associated widgets.virtual int findWidget (const char * name) const =0
Searches a widget by its name.Arguments
- const char * name - Widget name.
Return value
Returns the number of the widget if exists; otherwise, -1.virtual WidgetPtr getWidget (int num) const =0
Returns pointer to the widget with a given number.Arguments
- int num - Widget number.
Return value
Pointer to the widget with the given number.virtual const char * getWidgetName (int num) const =0
Returns widget name by its number.Arguments
- int num - Widget number.
Return value
Widget name.virtual const char * getWidgetNext (int num) const =0
Returns the name of the widget, which will be focused next.Arguments
- int num - Current widget number.
Return value
Next Widget name.virtual int getWidgetExport (int num) const =0
Returns a value indicating if a given widget is exported into a script.Arguments
- int num - Widget number.
Return value
Returns 1 if the widget is exported; otherwise, 0.virtual int getNumCallbacks (int num) const =0
Returns the total number of callbacks for a given widget.Arguments
- int num - Widget number.
Return value
Number of callbacks.virtual int getCallback (int num, int callback) const =0
Returns the number of a given callback function.Arguments
- int num - Widget number.
- int callback - Callback number.
Return value
Callback number.virtual const char * getCallbackName (int num, int callback) const =0
Returns the name of a given callback function.Arguments
- int num - Widget number.
- int callback - Callback number.
Return value
Callback function name.virtual WidgetPtr getCallbackWidgetData (int num, int callback) const =0
Returns the callback widget data.Arguments
- int num - Widget number.
- int callback - Callback number.
Return value
Widget data.virtual const char * getCallbackStringData (int num, int callback) const =0
Returns the callback string data.Arguments
- int num - Widget number.
- int callback - Callback number.
Return value
Callback string data.virtual const char * getCallbackVariableData (int num, int callback) const =0
Returns the callback variable data.Arguments
- int num - Widget number.
- int callback - Callback number.
Return value
Callback variable data.virtual void setCallback (const char * name, int callback, CallbackBase * func) const =0
Sets a callback function to a widget with a given name.Arguments
- const char * name - Widget name.
- int callback - Callback number.
- CallbackBase * func - Callback pointer.
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)