OpendTect-6_4  6.4
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)
 
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

Notifier< MenuItemHolderremoval
 

Protected Member Functions

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

MenuItemHolderparent_
 

Private Attributes

ObjectSet< MenuItemitems_
 
BoolTypeSet manageitems_
 

Friends

class MenuHandler
 

Detailed Description

Constructor & Destructor Documentation

MenuItemHolder::MenuItemHolder ( )
virtual MenuItemHolder::~MenuItemHolder ( )
virtual

Member Function Documentation

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

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

virtual void MenuItemHolder::assignItemID ( MenuItem )
protectedvirtual

Get a unique id for this item.

Reimplemented in MenuHandler.

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

Seaches for untranslated text.

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

Seaches for untranslated text.

const MenuItem* MenuItemHolder::getItem ( int  idx) const
MenuItem* MenuItemHolder::getItem ( int  idx)
const ObjectSet<MenuItem>& MenuItemHolder::getItems ( ) const
int MenuItemHolder::itemIndex ( const MenuItem ) const
int MenuItemHolder::itemIndex ( int  id) const
void MenuItemHolder::itemIsDeletedCB ( CallBacker )
protected
int MenuItemHolder::nrItems ( ) const
void MenuItemHolder::removeItems ( )

Friends And Related Function Documentation

friend class MenuHandler
friend

Member Data Documentation

ObjectSet<MenuItem> MenuItemHolder::items_
private
BoolTypeSet MenuItemHolder::manageitems_
private
MenuItemHolder* MenuItemHolder::parent_
protected
Notifier<MenuItemHolder> MenuItemHolder::removal

triggers when class is deleted


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