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

Public Member Functions

 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)
 
 MenuItem (const uiString &text=uiString::emptyString(), 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)
 
MenuItemfindItem (const char *)
 Seaches for untranslated text. More...
 
const MenuItemfindItem (const char *) const
 Seaches for untranslated text. More...
 
MenuItemfindItem (int id)
 
const MenuItemfindItem (int id) const
 
MenuItemgetItem (int idx)
 
const MenuItemgetItem (int idx) const
 
const ObjectSet< MenuItem > & getItems () const
 
int itemIndex (const MenuItem *) const
 
int itemIndex (int id) const
 
int nrItems () const
 
void removeItems ()
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 

Public Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 
- Protected Member Functions inherited from MenuItemHolder
virtual void assignItemID (MenuItem &)
 
void itemIsDeletedCB (CallBacker *)
 
- Protected Attributes inherited from MenuItemHolder
MenuItemHolderparent_
 

Detailed Description

A generic representation of an item in a menu.

<>

Constructor & Destructor Documentation

◆ MenuItem() [1/3]

MenuItem::MenuItem ( const uiString text = uiString::emptyString(),
int  placement = -1 
)

◆ MenuItem() [2/3]

MenuItem::MenuItem ( const uiString text,
CallBack  cb,
int  placement = -1 
)

◆ MenuItem() [3/3]

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

Member Function Documentation

◆ createItems() [1/2]

void MenuItem::createItems ( const BufferStringSet )

◆ createItems() [2/2]

void MenuItem::createItems ( const uiStringSet )

Member Data Documentation

◆ cb

CallBack MenuItem::cb

◆ checkable

bool MenuItem::checkable

If true, a check-mark can be placed

◆ checked

bool MenuItem::checked

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

◆ enabled

bool MenuItem::enabled

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

◆ iconfnm

BufferString MenuItem::iconfnm

◆ id

int MenuItem::id

This item's unique id.

◆ placement

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.

◆ text

uiString MenuItem::text

◆ tooltip

BufferString MenuItem::tooltip

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