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 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 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: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)