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
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

WidgetGroupBox Class

This class creates a group box.

WidgetGroupBox Class

This class inherits from Widget

Members


WidgetGroupBox (Gui gui, string title = 0, int space_x = 0, int space_y = 0)

Constructor. Creates a group box with given parameters.

Arguments

  • Gui gui - GUI, to which the new box will belong.
  • string title - Box title. This is an optional parameter.
  • int space_x - Horizontal space between the widgets in the box and between them and the box border. This is an optional parameter.
  • int space_y - Vertical space between the widgets in the box and between them and the box border. This is an optional parameter.

int getBackground ()

Returns a value indicating if a background texture is rendered for the box.

Return value

1 if a background texture is rendered; otherwise, 0.

int getBorder ()

Returns a flag indicating if a one-pixel border is rendered around the widget content (in a shape of a box).

Return value

1 if a border is rendered; otherwise, 0.

vec4 getColor ()

Returns a color of the global color multiplier.

Return value

A multiplier color.

int getPaddingBottom ()

Returns the current bottom padding for the widget content.

Return value

Bottom padding in pixels.

int getPaddingLeft ()

Returns the current left-side padding for the widget content.

Return value

Left-side padding in pixels.

int getPaddingRight ()

Returns the current right-side padding for the widget content.

Return value

Right-side padding in pixels.

int getPaddingTop ()

Returns the current top padding for the widget content.

Return value

Top padding in pixels.

int getSpaceX ()

Returns the horizontal space between the widgets in the box and between them and the box border.

Return value

Horizontal space.

int getSpaceY ()

Returns the vertical space between the widgets in the box and between them and the box border.

Return value

Vertical space.

int getStencil ()

Returns a value indicating if a widget cuts off its children along its set bounds. Everything that lies outside of them, is not rendered. This option works only if children have GUI_ALIGN_OVERLAP flag set (otherwise, they will expand the box widget bounds and no cutting will be done).

Return value

1 if cutting is enabled; otherwise, 0.

string getText ()

Returns the box title.

Return value

Box title.

void setBackground (int mode)

Sets a value indicating if a background texture should be rendered for the box.

Arguments

  • int mode - 1 to render a background texture, 0 not to render.

void setBorder (int border)

Sets a flag indicating if a one-pixel border is rendered around the widget content (in a shape of a box). By default, the border is always rendered.

Arguments

  • int border - 1 to use a border around the content; 0 not to use a border.

void setColor (vec4 color)

Sets a color for the global color multiplier. The default is equivalent to vec4(1,1,1,1) (white).

Arguments

  • vec4 color - Color multiplier.

void setPadding (int left, int right, int top, int bottom)

Sets widget paddings for all sides. Padding clears an area around the content of a widget (inside of it).

Arguments

  • int left - Left-side padding in pixels.
  • int right - Right-side padding in pixels.
  • int top - Top padding in pixels.
  • int bottom - Bottom padding in pixels.

void setSpace (int space_x, int space_y)

Sets a space between the widgets in the box and between them and the box border.

Arguments

  • int space_x - Horizontal space.
  • int space_y - Vertical space.

void setStencil (int stencil)

Sets a value indicating if a widget cuts off its children along its bounds. Everything that lies outside of them, is not rendered.

Arguments

  • int stencil - 1 to enable cutting; otherwise, 0.

void setText (string title)

Sets a box title.

Arguments

  • string title - Box title.
Last update: 2017-07-03
Build: ()