OpendTect  6.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
MenuItemHolder Class Reference
Inheritance diagram for MenuItemHolder:
[legend]

Public Member Functions

 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
 

Public Attributes

Notifier< MenuItemHolderremoval
 

Protected Member Functions

virtual void assignItemID (MenuItem &)
 
void itemIsDeletedCB (CallBacker *)
 

Protected Attributes

MenuItemHolderparent_
 

Private Attributes

ObjectSet< MenuItemitems_
 
BoolTypeSet manageitems_
 

Friends

class MenuHandler
 

Additional Inherited Members

- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Detailed Description

<>

Constructor & Destructor Documentation

◆ MenuItemHolder()

MenuItemHolder::MenuItemHolder ( )

◆ ~MenuItemHolder()

virtual MenuItemHolder::~MenuItemHolder ( )
virtual

Member Function Documentation

◆ addItem()

virtual void MenuItemHolder::addItem ( MenuItem ,
bool  manage = false 
)
virtual
Parameters
managespecified wether the class will delete the item when it's not needed any longer. Mostly used when doing:
item->addItem(new MenuItem("Menu text"),true);
Definition: menuhandler.h:76
.

Each item will get a unique id, that is the mechanism to see which item was selected in the menu.

◆ assignItemID()

virtual void MenuItemHolder::assignItemID ( MenuItem )
protectedvirtual

Get a unique id for this item.

Reimplemented in MenuHandler.

◆ findItem() [1/4]

MenuItem* MenuItemHolder::findItem ( const char *  )

Seaches for untranslated text.

◆ findItem() [2/4]

const MenuItem* MenuItemHolder::findItem ( const char *  ) const

Seaches for untranslated text.

◆ findItem() [3/4]

MenuItem* MenuItemHolder::findItem ( int  id)

◆ findItem() [4/4]

const MenuItem* MenuItemHolder::findItem ( int  id) const

◆ getItem() [1/2]

MenuItem* MenuItemHolder::getItem ( int  idx)

◆ getItem() [2/2]

const MenuItem* MenuItemHolder::getItem ( int  idx) const

◆ getItems()

const ObjectSet<MenuItem>& MenuItemHolder::getItems ( ) const

◆ itemIndex() [1/2]

int MenuItemHolder::itemIndex ( const MenuItem ) const

◆ itemIndex() [2/2]

int MenuItemHolder::itemIndex ( int  id) const

◆ itemIsDeletedCB()

void MenuItemHolder::itemIsDeletedCB ( CallBacker )
protected

◆ nrItems()

int MenuItemHolder::nrItems ( ) const

◆ removeItems()

void MenuItemHolder::removeItems ( )

Friends And Related Function Documentation

◆ MenuHandler

friend class MenuHandler
friend

Member Data Documentation

◆ items_

ObjectSet<MenuItem> MenuItemHolder::items_
private

◆ manageitems_

BoolTypeSet MenuItemHolder::manageitems_
private

◆ parent_

MenuItemHolder* MenuItemHolder::parent_
protected

◆ removal

Notifier<MenuItemHolder> MenuItemHolder::removal

triggers when class is deleted


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