15 #include "generalmod.h" 122 : MenuItem(tr(
"Separator"),plmnt) {}
240 const CallBack&,
const char* parenttxt=0,
253 void setIcon(
const char* fnm);
257 virtual void createMenuCB(CallBacker*);
258 virtual void handleMenuCB(CallBacker*);
272 #define mResetMenuItem( item ) \ 274 (item)->enabled = true; \ 275 (item)->checked = false; \ 277 (item)->removeItems(); \ 280 #define mAddMenuItemWithManageFlag( parent, item, manage, enab, check ) \ 282 MenuItem* _item = item; \ 283 MenuItemHolder* _parent = parent; \ 284 if ( _parent && (_parent)->itemIndex(_item)==-1 ) \ 285 (_parent)->addItem( _item ); \ 287 (_item)->enabled = (enab); \ 288 (_item)->checked = (check); \ 291 #define mAddMenuItem( parent, item, enab, check ) \ 292 mAddMenuItemWithManageFlag( parent, item, false, enab, check ) 295 #define mAddManagedMenuItem( parent, item, enab, check ) \ 296 mAddMenuItemWithManageFlag( parent, item, true, enab, check ) 299 #define mAddMenuItemCond( menu, item, enab, check, cond ) { \ 300 if ( menu && cond ) \ 301 mAddMenuItem( menu, item, enab, check ) \ 303 mResetMenuItem( item ) } \ 306 #define mAddMenuOrTBItem( istoolbar, tbparent, popupparent, item, enab, check )\ 308 istoolbar?(MenuItemHolder*)(tbparent):(MenuItemHolder*)(popupparent), \ #define mRefCountImpl(ClassName)
Macro to setup a class with destructor for reference counting.
Definition: refcount.h:163
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
int menuID() const
Definition: menuhandler.h:194
bool ishandled_
Definition: menuhandler.h:224
Definition: menuhandler.h:187
void assignItemID(MenuItem &)
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
MenuItem menuitem_
Definition: menuhandler.h:264
Definition: menuhandler.h:236
BufferString parenttext_
Definition: menuhandler.h:267
bool ischecked_
Definition: menuhandler.h:249
static const uiString & emptyString()
Definition: uistring.h:109
int id_
Definition: menuhandler.h:223
Definition: uistring.h:89
virtual bool shouldBeChecked() const
Definition: menuhandler.h:262
Set of BufferString objects.
Definition: bufstringset.h:28
bool doadd_
Definition: menuhandler.h:243
SeparatorItem(int plmnt=-1)
Definition: menuhandler.h:121
bool isenabled_
Definition: menuhandler.h:246
MenuHandler & menuhandler_
Definition: menuhandler.h:265
void setMenuID(int newid)
Definition: menuhandler.h:197
Definition: menuhandler.h:118
CNotifier< MenuHandler, int > handlenotifier
Definition: menuhandler.h:201
Notifier< MenuHandler > initnotifier
Definition: menuhandler.h:199
Notifier< MenuHandler > createnotifier
Definition: menuhandler.h:200
virtual bool executeMenu()=0
CallBack cb_
Definition: menuhandler.h:266
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
virtual bool shouldBeEnabled() const
Definition: menuhandler.h:261
Definition: uistring.h:218
virtual bool shouldAddMenu() const
Definition: menuhandler.h:260
CallBacks object-oriented (object + method).
Definition: callback.h:57
int queueid_
Definition: menuhandler.h:225
int queueID() const
Definition: menuhandler.h:215