UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials

Unigine::WidgetWindow Class

Interface for widget window handling. See also UnigineScript analog.

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

Unigine::WidgetWindow Class

Members


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

WidgetWindow constructor.

Arguments

  • const WidgetPtr & widget - Widget smart pointer.

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

WidgetWindow constructor.

Arguments

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

virtual Ptr< WidgetWindow > getWidgetWindow () const =0

Returns a window pointer.

Return value

WidgetWindow pointer.

virtual void setMoveable (int moveable) const =0

Sets a value indicating if the window is movable.

Arguments

  • int moveable - 1 to set the window movable; otherwise, 0.

virtual int isMoveable () const =0

Returns a value indicating if the window is movable. The default is 1.

Return value

Returns 1 if the window is movable; otherwise, 0.

virtual void setSizeable (int sizeable) const =0

Sets a value indicating if the window is resizeable.

Arguments

  • int sizeable - 1 to allow resizing the window, 0 to disallow it.

virtual int isSizeable () const =0

Returns a value indicating if the window is resizeable. The default is 0.

Return value

Returns 1 if the window is resizeable; otherwise, 0.

virtual void setTitleable (int titleable) const =0

Sets a value indicating if the window is minimized when double-clicking on it. The default is 0.

Arguments

  • int titleable - 1 to allow minimization, 0 to disallow it.

virtual int isTitleable () const =0

Returns a value indicating if the window is minimized when double-clicking on it. The default is 0.

Return value

Returns 1 if the window is minimized when double-clicking on it; otherwise, 0.

virtual void setBlendable (int blendable) const =0

Sets a value indicating if the window can fade in and out when changing to the minimized state and back.

Arguments

  • int blendable - 1 to allow fading in and out, 0 to disallow it.

virtual int isBlendable () const =0

Returns a value indicating if the window can fade in and out when changing to the minimized state and back. The default is 0.

Return value

Returns 1 if the window can fade in and out; otherwise, 0.

virtual void setFloatable (int floatable) const =0

Sets a value indicating if the window is animated when changing to the minimized state and back.

Arguments

  • int floatable - 1 to allow animating the window, 0 not to make it.

virtual int isFloatable () const =0

Returns a value indicating if the window is animated when changing to the minimized state and back. The default is 0.

Return value

Returns 1 if the window is animated; otherwise, 0.

virtual void setSnapDistance (int distance) const =0

Sets a distance, at which the window snaps to another window or screen edge.

Arguments

  • int distance - Distance in pixels.

virtual int getSnapDistance () const =0

Returns the distance, at which the window snaps to another window or screen edge. The default is 0 (do not snap).

Return value

Distance in pixels.

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 for the color multiplier.

virtual vec4 getColor () const =0

Returns a color of the global color multiplier.

Return value

Color for the color multiplier.

virtual void setTransform (const mat4 & transform) const =0

Sets the global widget transformation matrix. This 2D matrix can be tilted, rotated, moved or modified in many ways in 3D space.

Arguments

  • const mat4 & transform - Transformation matrix.

virtual mat4 getTransform () const =0

Returns the global widget transformation matrix.

Return value

Transformation matrix.

virtual void setMaxWidth (int width) const =0

Sets the maximum width value for the window.

Arguments

  • int width - Maximum width value.

virtual int getMaxWidth () const =0

Returns the maximum width value of the window.

Return value

Maximum width value.

virtual void setMaxHeight (int height) const =0

Sets the maximum height value for the window.

Arguments

  • int height - Maximum height value.

virtual int getMaxHeight () const =0

Returns the maximum height value of the window.

Return value

Maximum height value.

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

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

Arguments

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

virtual int getSpaceX () const =0

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

Return value

Horizontal space.

virtual int getSpaceY () const =0

Returns the vertical space between the widgets in the window and between them and the window 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 setTextAlign (int align) const =0

Sets alignment of the window title.

Arguments

virtual int getTextAlign () const =0

Returns the alignment of the window title.

Return value

One of the Unigine::Gui:: Enumeration with ALIGN_* prefixes.

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

Sets a window title.

Arguments

  • const char * str - Window title.

virtual const char * getText () const =0

Returns the current window title.

Return value

Window title.
Last update: 2017-07-03