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
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

WidgetVBox Class

This class creates a single vertical column container.

WidgetVBox Class

This class inherits from Widget

Members


WidgetVBox (Gui gui, int space_x = 0, int space_y = 0)

Constructor. Creates a vertical box with given parameters.

Arguments

  • Gui gui - GUI, to which the new box will belong.
  • 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.

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.

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 setColor (vec4 color)

Sets a color for the global color multiplier. The default is equivalent to #ffffff (white).

Arguments

  • vec4 color - A multiplier color.

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.
Last update: 2017-07-03
Build: ()