This page has been translated automatically.
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
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::WidgetGroupBox Class

Interface for widget groupbox handling. See also UnigineScript analog.

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

Unigine::WidgetGroupBox Class

Members


static int type ()

WidgetGroupBox type.

Return value

WidgetGroupBox type identifier.

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

WidgetGroupBox constructor.

Arguments

  • const WidgetPtr & widget - Widget smart pointer.

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

WidgetGroupBox constructor.

Arguments

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

virtual void setSpace (int x, int y) const =0

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

Arguments

  • int x - Horizontal space. If a negative value is specified, 0 will be used instead.
  • int y - Vertical space. If a negative value is specified, 0 will be used instead.

virtual int getSpaceX () const =0

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

Return value

Horizontal space.

virtual int getSpaceY () const =0

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

Return value

Vertical space.

virtual void setPadding (int l, int r, int t, int b) const =0

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

Arguments

  • int l - Left-side padding in pixels.
  • int r - Right-side padding in pixels.
  • int t - Top padding in pixels.
  • int b - Bottom padding in pixels.

virtual int getPaddingLeft () const =0

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

Return value

Left-side padding in pixels.

virtual int getPaddingRight () const =0

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

Return value

Right-side padding in pixels.

virtual int getPaddingTop () const =0

Returns the current top padding for the widget content.

Return value

Top padding in pixels.

virtual int getPaddingBottom () const =0

Returns the current bottom padding for the widget content.

Return value

Bottom padding in pixels.

virtual void setBorder (int border) const =0

Sets a flag indicating if a one-pixel border is rendered around the widget content (in a shape of a box). The default is 1 (use a border).

Arguments

  • int border - Positive number to enable a border, 0 to disable it.

virtual int getBorder () const =0

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

Return value

Positive number if a border is enabled; otherwise, 0.

virtual void setStencil (int stencil) const =0

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

Arguments

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

virtual int getStencil () const =0

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 ALIGN_OVERLAP flag set (otherwise, they will expand the box widget bounds and no cutting will be done).

Return value

Returns 1 if cutting is enabled; otherwise, 0.

virtual void setColor (const vec4 & color) const =0

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

Arguments

  • const vec4 & color - Color to set.

virtual vec4 getColor () const =0

Returns a color of the global color multiplier.

Return value

Color of the color multiplier.

virtual void setBackground (int background) const =0

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

Arguments

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

virtual int getBackground () const =0

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

Return value

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

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

Sets a box title.

Arguments

  • const char * str - Box title.

virtual const char * getText () const =0

Returns the box title.

Return value

Box title.
Last update: 03.07.2017
Build: ()