OpendTect-6_4  6.4
Public Member Functions | Public Attributes | List of all members
MenuItem Class Reference
Inheritance diagram for MenuItem:
[legend]

Public Member Functions

 MenuItem (const uiString &text=uiString::emptyString(), int placement=-1)
 
 MenuItem (const uiString &text, CallBack cb, int placement=-1)
 
 MenuItem (const uiString &text, const char *iconnm, const char *tooltip, CallBack cb=CallBack(), int placement=-1)
 
void createItems (const BufferStringSet &)
 
void createItems (const uiStringSet &)
 
- Public Member Functions inherited from MenuItemHolder
 MenuItemHolder ()
 
virtual ~MenuItemHolder ()
 
virtual void addItem (MenuItem *, bool manage=false)
 
void removeItems ()
 
int nrItems () const
 
const MenuItemgetItem (int idx) const
 
MenuItemgetItem (int idx)
 
int itemIndex (const MenuItem *) const
 
int itemIndex (int id) const
 
MenuItemfindItem (int id)
 
const MenuItemfindItem (int id) const
 
MenuItemfindItem (const char *)
 Seaches for untranslated text. More...
 
const MenuItemfindItem (const char *) const
 Seaches for untranslated text. More...
 
const ObjectSet< MenuItem > & getItems () const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Public Attributes

uiString text
 
int placement
 
int id
 
bool checkable
 
bool checked
 
bool enabled
 
BufferString iconfnm
 
BufferString tooltip
 
CallBack cb
 
- Public Attributes inherited from MenuItemHolder
Notifier< MenuItemHolderremoval
 

Additional Inherited Members

- Protected Member Functions inherited from MenuItemHolder
void itemIsDeletedCB (CallBacker *)
 
virtual void assignItemID (MenuItem &)
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 
- Protected Attributes inherited from MenuItemHolder
MenuItemHolderparent_
 

Detailed Description

A generic representation of an item in a menu.

Constructor & Destructor Documentation

MenuItem::MenuItem ( const uiString text = uiString::emptyString(),
int  placement = -1 
)
MenuItem::MenuItem ( const uiString text,
CallBack  cb,
int  placement = -1 
)
MenuItem::MenuItem ( const uiString text,
const char *  iconnm,
const char *  tooltip,
CallBack  cb = CallBack(),
int  placement = -1 
)

Member Function Documentation

void MenuItem::createItems ( const BufferStringSet )
void MenuItem::createItems ( const uiStringSet )

Member Data Documentation

CallBack MenuItem::cb
bool MenuItem::checkable

If true, a check-mark can be placed

bool MenuItem::checked

If true, a check-mark will be put infront of the items text

bool MenuItem::enabled

If false, the item will be visble, but not selectable.

BufferString MenuItem::iconfnm
int MenuItem::id

This item's unique id.

int MenuItem::placement

Gives the system an indication where in the menu the item should be placed. Items will be placed in increasing order of placement.

uiString MenuItem::text
BufferString MenuItem::tooltip

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019