| OpendTect 8.0

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
uiMenuHandler Class Reference
uiTools

`#include <uimenuhandler.h>`

Inheritance diagram for uiMenuHandler:
[legend]

## Public Member Functions
| uiMenuHandler (uiParent *, int id)
| ~uiMenuHandler ()
bool | executeMenu () override
bool | executeMenu (int menutype, const TypeSet< int > *path=0)
const Geom::Point2D< double > & | get2DPickedPos () const
int | getMenuType () const
uiParent * | getParent () const
const TypeSet< int > * | getPath () const
const Coord3 & | getPickedPos () const
void | set2DPickedPos (const Geom::Point2D< double > &pos)
void | setPickedPos (const Coord3 &pickedpos)
Public Member Functions inherited from MenuHandler
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)
MenuItem * | findItem (const char *)
| Seaches for untranslated text.
const MenuItem * | findItem (const char *) const
| Seaches for untranslated text.
MenuItem * | findItem (int id)
const MenuItem * | findItem (int id) const
MenuItem * | getItem (int idx)
const MenuItem * | getItem (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.
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.
CallBacker & | operator= (const CallBacker &)=delete
void | stopReceivingNotifications () const
virtual CallBacker * | trueCaller ()
Public Member Functions inherited from RefCount::Referenced
void | addObserver (WeakPtrBase *obs)
| Not for normal use. May become private.
int | nrRefs () const
| Only for expert use.
void | ref () const
bool | refIfReffed () const
| Don't use in production, for debugging.
void | removeObserver (WeakPtrBase *obs)
| Not for normal use. May become private.
bool | tryRef () const
| Not for normal use. May become private.
void | unRef () const
void | unRefNoDelete () const

## Static Public Member Functions
static int | fromScene ()
static int | fromTree ()
Static Public Member Functions inherited from CallBacker
static void | createReceiverForCurrentThread ()
static void | removeReceiverForCurrentThread ()
Static Public Member Functions inherited from RefCount::Referenced
static bool | isSane (const Referenced *)

## Protected Member Functions
uiMenu * | createMenu (const ObjectSet< MenuItem > &, const MenuItem *=0)
bool | executeMenuInternal ()
Protected Member Functions inherited from MenuHandler
| MenuHandler (int id)
virtual | ~MenuHandler ()
void | assignItemID (MenuItem &) override
void | executeQueue ()
Protected Member Functions inherited from MenuItemHolder
void | itemIsDeletedCB (CallBacker *)
Protected Member Functions inherited from RefCount::Referenced
| Referenced ()
| Referenced (const Referenced &)
virtual | ~Referenced ()
Referenced & | operator= (const Referenced &)

## Protected Attributes
int | menutype_
const TypeSet< int > * | path_
Geom::Point2D< double > | positionxy_
Coord3 | positionxyz_
uiParent * | uiparent_
Protected Attributes inherited from MenuHandler
int | id_
bool | ishandled_
int | queueid_
Protected Attributes inherited from MenuItemHolder
MenuItemHolder * | parent_

## Additional Inherited Members
Public Attributes inherited from MenuHandler
Notifier< MenuHandler > | createnotifier
CNotifier< MenuHandler, int > | handlenotifier
Notifier< MenuHandler > | initnotifier
Public Attributes inherited from MenuItemHolder
Notifier< MenuItemHolder > | removal

## Detailed Description

<>

## Constructor & Destructor Documentation

## ◆ uiMenuHandler()

uiMenuHandler::uiMenuHandler | ( | uiParent * | ,
|  | int | id )

## ◆ ~uiMenuHandler()

uiMenuHandler::~uiMenuHandler | ( |  | ) |

## Member Function Documentation

## ◆ createMenu()

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

## ◆ executeMenu() [1/2]

bool uiMenuHandler::executeMenu | ( |  | ) |
| override virtual

Implements MenuHandler.

## ◆ executeMenu() [2/2]

bool uiMenuHandler::executeMenu | ( | int | menutype,
|  | const TypeSet< int > * | path = 0 )

Parameters

  menutype | is 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.
  path | If 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-2025