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
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.

Unigine::WidgetVBox Class

Interface for widget vbox handling. See also UnigineScript analog.

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

Unigine::WidgetVBox Class

Members


static int type ()

WidgetVBox type.

Return value

WidgetVBox type identifier.

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

WidgetVBox constructor.

Arguments

  • const WidgetPtr & widget - Widget smart pointer.

static Ptr< WidgetVBox > create (const Ptr< Gui > & gui, int x, int y)

WidgetVBox constructor.

Arguments

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

virtual Ptr< WidgetVBox > getWidgetVBox () const =0

Returns a widget vbox pointer.

Return value

WidgetVBox pointer.

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