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

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