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

Static Public Member Functions

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

Protected Member Functions

 ~uiMenuHandler ()
 
uiMenucreateMenu (const ObjectSet< MenuItem > &, const MenuItem *=0)
 
bool executeMenuInternal ()
 
- Protected Member Functions inherited from MenuHandler
void assignItemID (MenuItem &)
 
void executeQueue ()
 
- Protected Member Functions inherited from MenuItemHolder
void itemIsDeletedCB (CallBacker *)
 

Protected Attributes

int menutype_
 
const TypeSet< int > * path_
 
Geom::Point2D< double > positionxy_
 
Coord3 positionxyz_
 
uiParentuiparent_
 
- 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< MenuHandlercreatenotifier
 
CNotifier< MenuHandler, int > handlenotifier
 
Notifier< MenuHandlerinitnotifier
 
- Public Attributes inherited from MenuItemHolder
Notifier< MenuItemHolderremoval
 

Detailed Description

<>

Constructor & Destructor Documentation

◆ uiMenuHandler()

uiMenuHandler::uiMenuHandler ( uiParent ,
int  id 
)

◆ ~uiMenuHandler()

uiMenuHandler::~uiMenuHandler ( )
inlineprotected

Member Function Documentation

◆ createMenu()

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

◆ executeMenu() [1/2]

bool uiMenuHandler::executeMenu ( )
virtual

Implements MenuHandler.

◆ executeMenu() [2/2]

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

◆ executeMenuInternal()

bool uiMenuHandler::executeMenuInternal ( )
protected

◆ fromScene()

static int uiMenuHandler::fromScene ( )
static

◆ fromTree()

static int uiMenuHandler::fromTree ( )
static

◆ get2DPickedPos()

const Geom::Point2D<double>& uiMenuHandler::get2DPickedPos ( ) const
inline

◆ getMenuType()

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.

◆ getParent()

uiParent* uiMenuHandler::getParent ( ) const
inline

◆ getPath()

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

◆ getPickedPos()

const Coord3& uiMenuHandler::getPickedPos ( ) const
inline

◆ set2DPickedPos()

void uiMenuHandler::set2DPickedPos ( const Geom::Point2D< double > &  pos)
inline

◆ setPickedPos()

void uiMenuHandler::setPickedPos ( const Coord3 pickedpos)
inline

Member Data Documentation

◆ menutype_

int uiMenuHandler::menutype_
protected

◆ path_

const TypeSet<int>* uiMenuHandler::path_
protected

◆ positionxy_

Geom::Point2D<double> uiMenuHandler::positionxy_
protected

◆ positionxyz_

Coord3 uiMenuHandler::positionxyz_
protected

◆ uiparent_

uiParent* uiMenuHandler::uiparent_
protected

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