This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Core Library
Containers
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
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.

WidgetTabBox Class

Interface for widget tabbox handling. See also UnigineScript analog.

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

WidgetTabBox Class

Members


WidgetTabBox (const Ptr<Gui> & gui, int x = 0, int y = 0)

Constructor. Creates a tabbed box with given parameters.

Arguments

  • const Ptr<Gui> & gui - GUI, to which the new box will belong.
  • int x - Horizontal space between the widgets in the box and between them and the box border. This is an optional parameter.
  • int y - Vertical space between the widgets in the box and between them and the box border. This is an optional parameter.

int isTabHidden (int num)

Returns a value indicating if a specified tab is invisible.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

Returns 1 if the tab is invisible; otherwise, 0.

int getSpaceY ()

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

Return value

Vertical space.

const char * getCurrentTabText ()

Returns the title of the current tab.

Return value

Tab title.

int getPaddingRight ()

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

Return value

Right-side padding in pixels.

Ptr<WidgetTabBox> create (const Ptr<Widget> & widget)

WidgetTabBox constructor.

Arguments

  • const Ptr<Widget> & widget - Widget smart pointer.

Return value

int getPaddingBottom ()

Returns the current bottom padding for the widget content.

Return value

Bottom padding in pixels.

void setImage (const Ptr<Image> & image)

Sets a tab icons atlas image. This atlas is a vertical strip of square icons.

Arguments

  • const Ptr<Image> & image - Tabs atlas.

void setTabText (int num, const char * str)

Sets a title for the current tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • const char * str - Tab title.

void setTabTexture (int num, int texture)

Sets an icon for the specified tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • int texture - Zero-based ID of the icon (icon number in the atlas column). -1 specifies that a tab has no icon.

const char * getTabToolTip (int num)

Returns the tooltip of the given tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

Displayed tooltip.

void setTabHidden (int num, int hidden)

Sets a value indicating that a specified tab should not be rendered visible. By default all widget tabs are visible.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • int hidden - 1 for the tab to be invisible; otherwise, 0.

void clear ()

Removes all tabs from the box.

void setTabData (int num, const char * str)

Sets the data for the given tab. The data can be used as a text identifier of the item (instead of using the number of the item).

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • const char * str - Data to set.

int getPaddingLeft ()

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

Return value

Left-side padding in pixels.

int getTabTexture (int num)

Returns the icon of the specified tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

Zero-based ID of the icon (icon number in the atlas column). -1 specifies that a tab has no icon.

int type ()

WidgetTabBox type.

Return value

WidgetTabBox type identifier.

int addTab (const char * str, int texture = -1)

Adds a new tab with a given title and icon to the box.

Arguments

  • const char * str - Tab title.
  • int texture - Zero-based ID of the icon (icon number in the atlas column). -1 means that a tab has no icon.

Return value

Number of the added tab.

void setTexture (const char * texture)

Sets a texture to be used as tab icons atlas. This atlas is a vertical strip of square icons.

Arguments

  • const char * texture - Path to the atlas texture.

int getNumTabs ()

Returns the total number of tabs in the box.

Return value

Number of tabs.

void removeTab (int num)

Removes a given tab from the box.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

int getSpaceX ()

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

Return value

Horizontal space.

const char * getCurrentTabData ()

Returns the data of the current tab. The data can be used as a text identifier of the item (instead of using the number of the item).

Return value

Tab data.

const char * getTabText (int num)

Returns the title of a given tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

Tab title.

int getPaddingTop ()

Returns the current top padding for the widget content.

Return value

Top padding in pixels.

void setSpace (int x, int y)

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 provided, 0 will be used instead.
  • int y - Vertical space. If a negative value is provided, 0 will be used instead.

void setPadding (int l, int r, int t, int b)

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.

const char * getTabData (int num)

Returns the data of a given tab. The data can be used as a text identifier of the item (instead of using the number of the item).

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

Tab data.

int getCurrentTab ()

Returns the number of the current tab.

Return value

Tab number.

void getImage (const Ptr<Image> & image)

Gets the tab icons atlas image. This atlas is a vertical strip of square icons.

Arguments

  • const Ptr<Image> & image - Tabs atlas.

void setTabToolTip (int num, const char * str)

Sets a tooltip for the specified tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • const char * str - Tooltip to display.

const char * getTexture ()

Returns the path to the tab icons atlas texture. This atlas is a vertical strip of square icons.

Return value

Path to the atlas texture.

void setCurrentTab (int tab)

Makes a given tab current.

Arguments

  • int tab - Tab number in range from 0 to the total number of tabs.
Last update: 2017-07-03
Build: ()