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
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::WidgetComboBox Class

Interface for widget combobox handling. See also UnigineScript analog.

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

Unigine::WidgetComboBox Class

Members


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

WidgetComboBox constructor.

Arguments

  • const WidgetPtr & widget - Widget smart pointer.

static Ptr< WidgetComboBox > create (const Ptr< Gui > & gui)

WidgetComboBox constructor.

Arguments

  • const Ptr< Gui > & gui - Gui pointer.

virtual void setImage (const ImagePtr & image) const =0

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

Arguments

  • const ImagePtr & image - Image to set.

virtual void getImage () const =0

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

Return value

image Image with mini-icons.

virtual void setTexture (const char * name) const =0

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

Arguments

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

virtual const char * getTexture () const =0

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

Return value

Path to the texture file.

virtual void clear () const =0

Removes all items from the combobox.

virtual int addItem (const char * str, int texture) const =0

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.

virtual void removeItem (int item) const =0

Removes a given item from the combobox.

Arguments

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

virtual int getNumItems () const =0

Returns the number of items in the combobox.

Return value

Number of items.

virtual void setItemText (int item, const char * str) const =0

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.

virtual const char * getItemText (int item) const =0

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.

virtual void setItemTexture (int item, int texture) const =0

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.

virtual int getItemTexture (int item) const =0

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.

virtual void setCurrentItem (int item) const =0

Sets a given item as selected.

Arguments

  • int item - Item number.

virtual int getCurrentItem () const =0

Returns the currently selected item.

Return value

Item number.

virtual const char * getCurrentItemText () const =0

Returns a text value of the currently selected item.

Return value

Item text.
Last update: 03.07.2017
Build: ()