Editor API
UnigineEditor public API
Editor::MenuBase Class Referenceabstract

#include <MenuBase.h>

Public Types

using ItemId = Item *
 
using CallbackItemId = void *
 

Public Member Functions

virtual void setTitle (const char *title)=0
 
virtual const char * getTitle () const =0
 
virtual void clear ()=0
 
virtual void remove (ItemId item)=0
 
virtual bool isEmpty () const =0
 
virtual ItemId addAction (const char *text)=0
 
virtual ItemId insertAction (const char *text, ItemId before_item)=0
 
virtual bool isAction (ItemId item) const =0
 
virtual MenuBaseaddMenu (const char *title)=0
 
virtual MenuBaseinsertMenu (const char *title, ItemId before_item)=0
 
virtual MenuBasegetMenu (ItemId item) const =0
 
virtual ItemId getItemId () const =0
 
virtual bool isMenu (ItemId item) const =0
 
virtual ItemId addSeparator ()=0
 
virtual ItemId insertSeparator (ItemId before_item)=0
 
virtual bool isSeparator (ItemId item) const =0
 
virtual void setText (ItemId item, const char *text)=0
 
virtual const char * getText (ItemId item) const =0
 
virtual void setData (ItemId item, const char *data)=0
 
virtual const char * getData (ItemId item) const =0
 
virtual void setToolTip (ItemId item, const char *tooltip)=0
 
virtual const char * getToolTip (ItemId item) const =0
 
virtual void setEnabled (ItemId item, bool enabled)=0
 
virtual bool isEnabled (ItemId item) const =0
 
virtual void setCheckable (ItemId item, bool checkable)=0
 
virtual bool isCheckable (ItemId item) const =0
 
virtual void setChecked (ItemId item, bool checked)=0
 
virtual bool isChecked (ItemId item) const =0
 
virtual CallbackItemId addCallbackAboutToHide (Unigine::CallbackBase1< MenuBase * > *func)=0
 
virtual CallbackItemId addCallbackAboutToShow (Unigine::CallbackBase1< MenuBase * > *func)=0
 
virtual CallbackItemId addCallbackTriggered (ItemId item, Unigine::CallbackBase2< MenuBase *, ItemId > *func)=0
 
virtual bool removeCallback (CallbackItemId id)=0
 

Protected Member Functions

 MenuBase ()=default
 
virtual ~MenuBase ()=default
 

Member Typedef Documentation

◆ CallbackItemId

◆ ItemId

using Editor::MenuBase::ItemId = Item *

Constructor & Destructor Documentation

◆ MenuBase()

Editor::MenuBase::MenuBase ( )
protecteddefault

◆ ~MenuBase()

virtual Editor::MenuBase::~MenuBase ( )
protectedvirtualdefault

Member Function Documentation

◆ addAction()

virtual ItemId Editor::MenuBase::addAction ( const char *  text)
pure virtual

◆ addCallbackAboutToHide()

virtual CallbackItemId Editor::MenuBase::addCallbackAboutToHide ( Unigine::CallbackBase1< MenuBase * > *  func)
pure virtual

◆ addCallbackAboutToShow()

virtual CallbackItemId Editor::MenuBase::addCallbackAboutToShow ( Unigine::CallbackBase1< MenuBase * > *  func)
pure virtual

◆ addCallbackTriggered()

virtual CallbackItemId Editor::MenuBase::addCallbackTriggered ( ItemId  item,
Unigine::CallbackBase2< MenuBase *, ItemId > *  func 
)
pure virtual

◆ addMenu()

virtual MenuBase* Editor::MenuBase::addMenu ( const char *  title)
pure virtual

◆ addSeparator()

virtual ItemId Editor::MenuBase::addSeparator ( )
pure virtual

◆ clear()

virtual void Editor::MenuBase::clear ( )
pure virtual

◆ getData()

virtual const char* Editor::MenuBase::getData ( ItemId  item) const
pure virtual

◆ getItemId()

virtual ItemId Editor::MenuBase::getItemId ( ) const
pure virtual

◆ getMenu()

virtual MenuBase* Editor::MenuBase::getMenu ( ItemId  item) const
pure virtual

◆ getText()

virtual const char* Editor::MenuBase::getText ( ItemId  item) const
pure virtual

◆ getTitle()

virtual const char* Editor::MenuBase::getTitle ( ) const
pure virtual

◆ getToolTip()

virtual const char* Editor::MenuBase::getToolTip ( ItemId  item) const
pure virtual

◆ insertAction()

virtual ItemId Editor::MenuBase::insertAction ( const char *  text,
ItemId  before_item 
)
pure virtual

◆ insertMenu()

virtual MenuBase* Editor::MenuBase::insertMenu ( const char *  title,
ItemId  before_item 
)
pure virtual

◆ insertSeparator()

virtual ItemId Editor::MenuBase::insertSeparator ( ItemId  before_item)
pure virtual

◆ isAction()

virtual bool Editor::MenuBase::isAction ( ItemId  item) const
pure virtual

◆ isCheckable()

virtual bool Editor::MenuBase::isCheckable ( ItemId  item) const
pure virtual

◆ isChecked()

virtual bool Editor::MenuBase::isChecked ( ItemId  item) const
pure virtual

◆ isEmpty()

virtual bool Editor::MenuBase::isEmpty ( ) const
pure virtual

◆ isEnabled()

virtual bool Editor::MenuBase::isEnabled ( ItemId  item) const
pure virtual

◆ isMenu()

virtual bool Editor::MenuBase::isMenu ( ItemId  item) const
pure virtual

◆ isSeparator()

virtual bool Editor::MenuBase::isSeparator ( ItemId  item) const
pure virtual

◆ remove()

virtual void Editor::MenuBase::remove ( ItemId  item)
pure virtual

◆ removeCallback()

virtual bool Editor::MenuBase::removeCallback ( CallbackItemId  id)
pure virtual

◆ setCheckable()

virtual void Editor::MenuBase::setCheckable ( ItemId  item,
bool  checkable 
)
pure virtual

◆ setChecked()

virtual void Editor::MenuBase::setChecked ( ItemId  item,
bool  checked 
)
pure virtual

◆ setData()

virtual void Editor::MenuBase::setData ( ItemId  item,
const char *  data 
)
pure virtual

◆ setEnabled()

virtual void Editor::MenuBase::setEnabled ( ItemId  item,
bool  enabled 
)
pure virtual

◆ setText()

virtual void Editor::MenuBase::setText ( ItemId  item,
const char *  text 
)
pure virtual

◆ setTitle()

virtual void Editor::MenuBase::setTitle ( const char *  title)
pure virtual

◆ setToolTip()

virtual void Editor::MenuBase::setToolTip ( ItemId  item,
const char *  tooltip 
)
pure virtual