OpendTect-6_4  6.4
uiodtreeitem.h
Go to the documentation of this file.
1 #ifndef uiodtreeitem_h
2 #define uiodtreeitem_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "uiodmainmod.h"
17 #include "uitreeitemmanager.h"
18 #include "menuhandler.h"
19 #include "uistring.h"
20 
21 class uiTreeView;
22 class uiODApplMgr;
23 class uiMenu;
24 class ui3DViewer;
25 
26 
29 public:
30  uiODTreeItem(const uiString&);
31  bool anyButtonClick(uiTreeViewItem*);
32 
33  int sceneID() const;
34 protected:
35 
36  uiODApplMgr* applMgr();
37  ui3DViewer* viewer();
38 
39  virtual bool init();
40  virtual const char* iconName() const { return 0; }
41 
42  void addStandardItems(uiMenu&);
43  void handleStandardItems(int mnuid);
44 
45  void setMoreObjectsToDoHint(bool yn);
46  bool getMoreObjectsToDoHint() const;
47 };
48 
49 
52 public:
55  ~uiODTreeTop();
56 
57  static const char* sceneidkey();
58  static const char* viewerptr();
59  static const char* applmgrstr();
60 
61  int sceneID() const;
62  bool selectWithKey(int selkey);
63  TypeSet<int> getDisplayIds(int&, bool);
64  void loopOverChildrenIds(TypeSet<int>&,int&,bool,
65  const ObjectSet<uiTreeItem>&);
66 
67 protected:
68 
69  void addFactoryCB(CallBacker*);
70  void removeFactoryCB(CallBacker*);
71 
72  virtual const char* parentType() const { return 0; }
73  uiODApplMgr* applMgr();
74 
76 };
77 
78 
79 
82 public:
83 
84  virtual uiTreeItem* createForVis(int visid,uiTreeItem*) const
85  { return 0; }
86 
87 };
88 
89 
90 #define mShowMenu bool showSubMenu();
91 #define mMenuOnAnyButton bool anyButtonClick(uiTreeViewItem* lv) \
92 { \
93  if ( lv==uitreeviewitem_ ) { select(); showSubMenu(); return true; } \
94  return inheritedClass::anyButtonClick( lv ); \
95 }
96 
97 #define mDefineItemMembers( type, inherited, parentitem ) \
98  typedef uiOD##inherited inheritedClass; \
99 protected: \
100  virtual const char* iconName() const; \
101  const char* parentType() const \
102  { return typeid(uiOD##parentitem).name();} \
103 public: \
104  uiOD##type##TreeItem()
105 
106 #define mDefineItem( type, inherited, parentitem, extrapublic ) \
107 mExpClass(uiODMain) uiOD##type##TreeItem : public uiOD##inherited \
108 { mODTextTranslationClass(uiOD##type##TreeItem)\
109  mDefineItemMembers( type, inherited, parentitem ); \
110  extrapublic; \
111 };
112 
113 
114 
115 
116 #endif
#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: uiodtreeitem.h:27
Application level manager - ties part servers together.
Definition: uiodapplmgr.h:55
OpendTect application top level object.
Definition: uiodmain.h:41
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
virtual uiTreeItem * createForVis(int visid, uiTreeItem *) const
Definition: uiodtreeitem.h:84
bool init()
Definition: uistring.h:89
Definition: uiodtreeitem.h:80
Definition: uitreeview.h:201
Definition: ui3dviewer.h:29
Definition: uitreeitemmanager.h:278
Definition: uiodtreeitem.h:50
Definition: uimenu.h:65
Definition: uitreeview.h:33
int sceneID() const
Definition: uitreeitemmanager.h:239
Definition: uitreeitemmanager.h:287
Definition: uitreeitemmanager.h:34
uiTreeFactorySet * tfs
Definition: uiodtreeitem.h:75
virtual const char * iconName() const
Definition: uiodtreeitem.h:40
virtual const char * parentType() const
Definition: uiodtreeitem.h:72

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