OpendTect  6.3
uimenuhandler.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: N. Hemstra
8  Date: May 2003
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "uitoolsmod.h"
14 #include "uiparent.h"
15 #include "menuhandler.h"
16 #include "position.h"
17 
18 class uiMenu;
19 class uiToolBar;
20 /*
21 Implementation of MenuHandler for the dGB-based userinterface.
22 */
23 
24 
26 {
27 public:
28  uiMenuHandler( uiParent*, int id );
29 
30  uiParent* getParent() const { return uiparent_; }
31 
32  bool executeMenu();
33  bool executeMenu(int menutype,
34  const TypeSet<int>* path=0 );
52  int getMenuType() const { return menutype_; }
60  const TypeSet<int>* getPath() const { return path_; }
64  const Coord3& getPickedPos() const { return positionxyz_; }
65  void setPickedPos(const Coord3& pickedpos)
66  { positionxyz_=pickedpos; }
67  const Geom::Point2D<double>& get2DPickedPos() const { return positionxy_; }
69  { positionxy_=pos; }
70 
71  static int fromTree();
72  static int fromScene();
73 
74 protected:
75  bool executeMenuInternal();
76  uiMenu* createMenu( const ObjectSet<MenuItem>&,
77  const MenuItem* =0);
79  int menutype_;
84 };
85 
86 
89 public:
91 
92  void addButtons();
93  bool executeMenu() { addButtons(); return true; }
94 
95 protected:
96 
97  void butClickCB(CallBacker*);
98  void handleEmpty();
99 
102 };
Definition: uitoolbar.h:30
#define mExpClass(module)
Definition: commondefs.h:157
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
Definition: menuhandler.h:185
int getMenuType() const
Definition: uimenuhandler.h:52
uiParent * uiparent_
Definition: uimenuhandler.h:101
Coord3 positionxyz_
Definition: uimenuhandler.h:81
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
Definition: uimenuhandler.h:87
~uiMenuHandler()
Definition: uimenuhandler.h:83
Definition: uiparent.h:24
Definition: uimenuhandler.h:25
const TypeSet< int > * getPath() const
Definition: uimenuhandler.h:60
3D point or vector
Definition: commontypes.h:57
Definition: menuhandler.h:74
uiParent * uiparent_
Definition: uimenuhandler.h:78
uiParent * getParent() const
Definition: uimenuhandler.h:30
const Coord3 & getPickedPos() const
Definition: uimenuhandler.h:64
const TypeSet< int > * path_
Definition: uimenuhandler.h:80
int menutype_
Definition: uimenuhandler.h:79
Definition: uimenu.h:64
uiToolBar * tb_
Definition: uimenuhandler.h:100
bool executeMenu()
Definition: uimenuhandler.h:93
Geom::Point2D< double > positionxy_
Definition: uimenuhandler.h:82
void set2DPickedPos(const Geom::Point2D< double > &pos)
Definition: uimenuhandler.h:68
const Geom::Point2D< double > & get2DPickedPos() const
Definition: uimenuhandler.h:67
void setPickedPos(const Coord3 &pickedpos)
Definition: uimenuhandler.h:65

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