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
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.

Unigine::WidgetMenuBar Class

Interface for widget menubar handling. See also UnigineScript analog.

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

Unigine::WidgetMenuBar Class

Members


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

WidgetMenuBar constructor.

Arguments

  • const WidgetPtr & widget - Widget smart pointer.

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

WidgetMenuBar constructor.

Arguments

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

virtual void clear () const =0

Removes all menus from the menu bar.

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

Adds an empty menu with a given title.

Arguments

  • const char * str - Menu title.

Return value

Number of the added menu.

virtual int addItem (const char * str, const WidgetMenuBoxPtr & menu) const =0

Adds a menu with a given title.

Arguments

  • const char * str - Menu title.
  • const WidgetMenuBoxPtr & menu - Menu box.

Return value

Number of the added menu.

virtual void removeItem (int item) const =0

Removes a given item from the menu bar.

Arguments

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

virtual int getNumItems () const =0

Returns the number of items in the menu bar.

Return value

Number of items.

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

Sets a title for a given item.

Arguments

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

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

Returns the title of a given item.

Arguments

  • int item - Item number.

Return value

Item title.

virtual void setItemMenu (int item, const WidgetMenuBoxPtr & menu) const =0

Sets a menu for a given item.

Arguments

  • int item - Item number in range from 0 to the total number of menu bar items.
  • const WidgetMenuBoxPtr & menu - Menu box.

virtual WidgetMenuBoxPtr getItemMenu (int item) const =0

Returns the menu of a given item.

Arguments

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

Return value

Menu box.
Last update: 2017-07-03
Build: ()