This page has been translated automatically.
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::WidgetDialog Class

Header:#include <UnigineWidgets.h>
Inherits:WidgetWindow

This class creates a dialog window.

WidgetDialog Class

Members


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

Constructor. Creates a dialog window with given parameters.

Arguments

  • const Ptr<Gui> & gui - GUI, to which the dialog will belong.
  • const char * str - Window title. This is an optional parameter.
  • int x - Horizontal space between widgets in the window and between them and the window border. This is an optional parameter.
  • int y - Vertical space between widgets in the window and between them and the window border. This is an optional parameter.

Ptr<WidgetDialog> cast(const Ptr<Widget> & widget)

Arguments

  • const Ptr<Widget> & widget

Ptr<WidgetButton> getCancelButton()

Returns the button that cancels an action.

Return value

Cancel button.

int isCancelClicked()

Returns a value indicating if the Cancel button is clicked.

Return value

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

void setCancelText(const char * text)

Sets a caption of the Cancel button.

Arguments

  • const char * text - Cancel button caption.

const char * getCancelText()

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

Return value

Cancel button caption.

Ptr<WidgetButton> getCloseButton()

Returns the button that closes an action.

Return value

Close button.

int isCloseClicked()

Returns a value indicating if the Close button is clicked.

Return value

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

void setCloseText(const char * text)

Sets a caption of the Close button.

Arguments

  • const char * text - Close button caption.

const char * getCloseText()

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

Return value

Close button caption.

int isDone()

Returns a value indicating if the dialog window is closed.

Return value

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

Ptr<WidgetButton> getOkButton()

Returns the button that approves an action.

Return value

OK button.

int isOkClicked()

Returns a value indicating if the OK button is clicked.

Return value

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

void setOkText(const char * text)

Sets a caption of the OK button.

Arguments

  • const char * text - OK button caption.

const char * getOkText()

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

Return value

OK button caption.

int getResult()

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.

Ptr<WidgetDialog> getWidgetDialog()

Returns a dialog pointer.

Return value

WidgetDialog pointer.

int type()

WidgetDialog type.

Return value

WidgetDialog type identifier.
Last update: 2017-07-03
Build: ()