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
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

WidgetComboBox Class

Interface for widget combobox handling. See also UnigineScript analog.

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

WidgetComboBox Class

Members


WidgetComboBox (const Ptr<Gui> & gui)

Constructor. Creates an empty combobox.

Arguments

  • const Ptr<Gui> & gui - GUI, to which the new combobox will belong.

int type ()

WidgetComboBox type.

Return value

WidgetComboBox type identifier.

void clear ()

Removes all items from the combobox.

void setItemText (int item, const char * str)

Sets a text for a given item.

Arguments

  • int item - Item number in range from 0 to the total number of items.
  • const char * str - Item text.

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

WidgetComboBox constructor.

Arguments

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

Return value

const char * getCurrentItemText ()

Returns a text value of the currently selected item.

Return value

Item text.

int getCurrentItem ()

Returns the currently selected item.

Return value

Item number.

void removeItem (int num)

Removes a given item from the combobox.

Arguments

  • int num - Item number in range from 0 to the total number of items.

void setItemData (int item, const char * str)

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

Arguments

  • int item - Item number in range from 0 to the total number of items.
  • const char * str - Item data to set.

const char * getCurrentItemData ()

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

Return value

Item data.

int getNumItems ()

Returns the number of items in the combobox.

Return value

Number of items.

void setItemTexture (int item, int texture)

Sets an icon for a given item.

Arguments

  • int item - Item number in range from 0 to the total number of items.
  • int texture - Zero-based ID of the icon.

void setTexture (const char * texture)

Sets a texture with mini-icons to be used with items. The texture is a vertical strip of square icons.

Arguments

  • const char * texture - Path to a texture file.

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

Adds a new item with a given text and an icon.

Arguments

  • const char * str - Item text.
  • int texture - Zero-based ID of the icon.

Return value

Number of the added item.

void getImage (const Ptr<Image> & image)

Returns the image with mini-icons, which are used with the combobox items.

Arguments

  • const Ptr<Image> & image

void setCurrentItem (int item)

Sets a given item as selected.

Arguments

  • int item - Item number.

void setImage (const Ptr<Image> & image)

Sets an image with mini-icons to be used with items. The image is a vertical strip of square icons.

Arguments

  • const Ptr<Image> & image - Image to set.

const char * getTexture ()

Returns path to the image with mini-icons, which are used with combobox items.

Return value

Path to the texture file.

int getItemTexture (int item)

Returns the icon of a given item.

Arguments

  • int item - Item number in range from 0 to the total number of items.

Return value

Zero-based ID of the icon.

const char * getItemText (int item)

Returns the text of a given item.

Arguments

  • int item - Item number in range from 0 to the total number of items.

Return value

Item text.

const char * getItemData (int item)

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

Arguments

  • int item - Item number in range from 0 to the total number of items.

Return value

Item data.
Last update: 03.07.2017
Build: ()