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::WidgetDialog Class

Interface for widget dialog handling. See also UnigineScript analog.

To use this class, include the UnigineWidgetDialog.h file.

Unigine::WidgetDialog Class

Members


static int type ()

WidgetDialog type.

Return value

WidgetDialog type identifier.

static Ptr< WidgetDialog > create (const WidgetPtr & widget)

WidgetDialog constructor.

Arguments

  • const WidgetPtr & widget - Widget smart pointer.

static Ptr< WidgetDialog > create (const Ptr< Gui > & gui, const char * str, int x, int y)

WidgetDialog constructor.

Arguments

  • const Ptr< Gui > & gui - Gui pointer.
  • const char * str - Dialog window title. This is an optional argument.
  • int x - Horizontal space between widgets in the window and between them and the window border. This is an optional argument.
  • int y - Vertical space between widgets in the window and between them and the window border. This is an optional argument.

virtual Ptr< WidgetDialog > getWidgetDialog () const =0

Returns a dialog pointer.

Return value

WidgetDialog pointer.

virtual int isDone () const =0

Returns a value indicating if the dialog window is closed.

Return value

Returns 1 if the dialog window is closed; otherwise, 0.

virtual int getResult () const =0

Returns a value indicating which button has been clicked.

Return value

1 if the Ok button is clicked; -1 if the Cancel button is clicked; 0 if the Close button is clicked.

virtual int isOkClicked () const =0

Returns a value indicating if the OK button is clicked.

Return value

Returns 1 if the OK button is clicked; otherwise, 0.

virtual void setOkText (const char * str) const =0

Sets a caption of the OK button.

Arguments

  • const char * str - OK button caption.

virtual const char * getOkText () const =0

Returns the caption of the OK button. The default is OK.

Return value

OK button caption.

virtual WidgetButtonPtr getOkButton () const =0

Returns the button that approves an action.

Return value

OK button.

virtual int isCancelClicked () const =0

Returns a value indicating if the Cancel button is clicked.

Return value

Returns 1 if the Cancel button is clicked; otherwise, 0.

virtual void setCancelText (const char * str) const =0

Sets a caption of the Cancel button.

Arguments

  • const char * str - Cancel button caption.

virtual const char * getCancelText () const =0

Returns the caption of the Cancel button. The default is Cancel.

Return value

Cancel button caption.

virtual WidgetButtonPtr getCancelButton () const =0

Returns the button that cancels an action.

Return value

Cancel button.

virtual int isCloseClicked () const =0

Returns a value indicating if the Close button is clicked.

Return value

Returns 1 if the Close button is clicked; otherwise, 0.

virtual void setCloseText (const char * str) const =0

Sets a caption of the Close button.

Arguments

  • const char * str - Close button caption.

virtual const char * getCloseText () const =0

Returns the caption of the Close button. The default is empty.

Return value

Close button caption.

virtual WidgetButtonPtr getCloseButton () const =0

Returns the button that closes an action.

Return value

Close button.
Last update: 2017-07-03
Build: ()