This page has been translated automatically.
Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

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 const char * getCallbackInstanceData (int num, int callback) const =0

Returns the callback instance data.

Arguments

  • int num - Widget number.
  • int callback - Callback number.

Return value

Callback instance data.

virtual void setCallback0 (const char * name, int callback, CallbackBase * func) const =0

Sets a 0-argument callback function to a widget with a given name.

Arguments

  • const char * name - Widget name.
  • int callback - Callback number.
  • CallbackBase * func - Callback pointer.

virtual void setCallback1 (const char * name, int callback, CallbackBase * func) const =0

Sets a 1-argument callback function to a widget with a given name.

Arguments

  • const char * name - Widget name.
  • int callback - Callback number.
  • CallbackBase * func - Callback pointer.

virtual void setCallback2 (const char * name, int callback, CallbackBase * func) const =0

Sets a 2-argument callback function to a widget with a given name.

Arguments

  • const char * name - Widget name.
  • int callback - Callback number.
  • CallbackBase * func - Callback pointer.

virtual void setCallback3 (const char * name, int callback, CallbackBase * func) const =0

Sets a 3-argument 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
Build: ()