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

Public Member Functions

 uiMenuHandler (uiParent *, int id)
 
uiParentgetParent () const
 
bool executeMenu ()
 
bool executeMenu (int menutype, const TypeSet< int > *path=0)
 
int getMenuType () const
 
const TypeSet< int > * getPath () const
 
const Coord3getPickedPos () const
 
void setPickedPos (const Coord3 &pickedpos)
 
const Geom::Point2D< double > & get2DPickedPos () const
 
void set2DPickedPos (const Geom::Point2D< double > &pos)
 
- Public Member Functions inherited from MenuHandler
 MenuHandler (int id)
 
int menuID () const
 
void setMenuID (int newid)
 
bool isHandled () const
 
void setIsHandled (bool)
 
int queueID () const
 
- 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...
 

Static Public Member Functions

static int fromTree ()
 
static int fromScene ()
 

Protected Member Functions

bool executeMenuInternal ()
 
uiMenucreateMenu (const ObjectSet< MenuItem > &, const MenuItem *=0)
 
 ~uiMenuHandler ()
 
- Protected Member Functions inherited from MenuHandler
void assignItemID (MenuItem &)
 
void executeQueue ()
 
- Protected Member Functions inherited from MenuItemHolder
void itemIsDeletedCB (CallBacker *)
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Protected Attributes

uiParentuiparent_
 
int menutype_
 
const TypeSet< int > * path_
 
Coord3 positionxyz_
 
Geom::Point2D< double > positionxy_
 
- Protected Attributes inherited from MenuHandler
int id_
 
bool ishandled_
 
int queueid_
 
- Protected Attributes inherited from MenuItemHolder
MenuItemHolderparent_
 

Additional Inherited Members

- Public Attributes inherited from MenuHandler
Notifier< MenuHandlerinitnotifier
 
Notifier< MenuHandlercreatenotifier
 
CNotifier< MenuHandler, int > handlenotifier
 
- Public Attributes inherited from MenuItemHolder
Notifier< MenuItemHolderremoval
 

Detailed Description

Constructor & Destructor Documentation

uiMenuHandler::uiMenuHandler ( uiParent ,
int  id 
)
uiMenuHandler::~uiMenuHandler ( )
inlineprotected

Member Function Documentation

uiMenu* uiMenuHandler::createMenu ( const ObjectSet< MenuItem > &  ,
const MenuItem = 0 
)
protected
bool uiMenuHandler::executeMenu ( )
virtual

Implements MenuHandler.

bool uiMenuHandler::executeMenu ( int  menutype,
const TypeSet< int > *  path = 0 
)
Parameters
menutypeis an integer that specifies what type of menu should be generated. Two numbers are reserved, and the user of the class may use his own codes for other circumstances. The two defined values are:
  • menutype==fromTree menu generated from (a right-click on) the treeitem.
  • menutype==fromScene menu generated from the scene.
pathIf menutype==fromScene the path of selection (i.e. a list of the ids of the paht, from scene to picked object).
bool uiMenuHandler::executeMenuInternal ( )
protected
static int uiMenuHandler::fromScene ( )
static
static int uiMenuHandler::fromTree ( )
static
const Geom::Point2D<double>& uiMenuHandler::get2DPickedPos ( ) const
inline
int uiMenuHandler::getMenuType ( ) const
inline
Returns
the menutype specified in uiMenuHandler::executeMenu.
Note
does only give a valid answer if called from a callback, notified by uiMenuHandler::createnotifier or uiMenuHandler::handlenotifier.
uiParent* uiMenuHandler::getParent ( ) const
inline
const TypeSet<int>* uiMenuHandler::getPath ( ) const
inline
Returns
The path of selection (i.e. a list of the ids of the paht, from scene to picked object).
const Coord3& uiMenuHandler::getPickedPos ( ) const
inline
void uiMenuHandler::set2DPickedPos ( const Geom::Point2D< double > &  pos)
inline
void uiMenuHandler::setPickedPos ( const Coord3 pickedpos)
inline

Member Data Documentation

int uiMenuHandler::menutype_
protected
const TypeSet<int>* uiMenuHandler::path_
protected
Geom::Point2D<double> uiMenuHandler::positionxy_
protected
Coord3 uiMenuHandler::positionxyz_
protected
uiParent* uiMenuHandler::uiparent_
protected

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