OpendTect-6_4  6.4
treecommands.h
Go to the documentation of this file.
1 #ifndef treecommands_h
2 #define treecommands_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Jaap Glas
9  Date: February 2009
10  RCS: $Id$
11  ________________________________________________________________________
12 
13 -*/
14 
15 #include "uicmddrivermod.h"
16 #include "command.h"
17 #include "cmdcomposer.h"
18 
19 namespace CmdDrive
20 {
21 
23 protected:
24 
25  bool parTreeSelPre(const uiTreeView&,
26  FileMultiString& treepath,
27  ObjectSet<const uiTreeViewItem>& nodesfound,
28  FileMultiString& curpath,bool multisel) const;
29 
30  void unfoldTreeNodes(ObjectSet<const uiTreeViewItem>&) const;
31  int countTreeItems(const uiTreeView&,const uiTreeViewItem*,
32  bool countkids=true) const;
33 
34  const uiTreeViewItem* singleSelected(const uiTreeView& uilview) const;
35 
37 
38 mExpClass(uiCmdDriver) TreeActivator: public Activator
39 {
40 public:
41  TreeActivator(const uiTreeView&,const uiTreeViewItem&,
42  const BufferStringSet& clicktags,
43  int column=0);
44  void actCB(CallBacker*);
45 protected:
46  uiTreeView& actlview_;
47  uiTreeViewItem& actitem_;
49 
51 };
52 
53 
54 mStartDeclCmdClass( uiCmdDriver, TreeClick, TreeCmd ) mEndDeclCmdClass
55 mStartDeclCmdClass( uiCmdDriver, TreeMenu, TreeCmd ) mEndDeclCmdClass
56 
57 mStartDeclCmdClass( uiCmdDriver, TreeButton, TreeCmd ) mEndDeclCmdClass
58 mStartDeclCmdClass( uiCmdDriver, TreeExpand, TreeCmd ) mEndDeclCmdClass
59 
60 mStartDeclCmdClassNoActNoEntry( uiCmdDriver,TreeQuestion, TreeCmd )
61  virtual bool isUiObjChangeCommand() const { return false; }
62  virtual bool isVisualCommand() const { return false; }
64 
68 mStartDeclCmdClass( uiCmdDriver, IsTreeItemExpanded, TreeQuestionCmd )
80 
81 
83 public:
84  virtual void updateInternalState();
85 
86 protected:
87  void reInit();
88  void storeTreeState();
89  void addToTreeState(const uiTreeView&,
90  const uiTreeViewItem* root=0);
91  void labelStoredStateOld();
92  void labelStoredStateNew();
93 
94  void writeTreeClick();
95  void writeTreeButton();
96  void writeTreeExpand();
97  void writeTreeMenu(const CmdRecEvent& menuevent);
98 
99  int stagenr_;
100  const uiTreeViewItem* clickeditem_;
101  int clickedcol_;
102  bool leftclicked_;
103  bool ctrlclicked_;
104  bool selchanged_;
105  bool expanded_;
106  bool treecmdsflushed_;
107 
108  ObjectSet<const uiTreeViewItem> checkeditems_;
109  ObjectSet<const uiTreeViewItem> wascheckeditems_;
110  ObjectSet<const uiTreeViewItem> ischeckeditems_;
111 
113 
114 }; // namespace CmdDrive
115 
116 #endif
#define mEndDeclCmdClass
Definition: command.h:152
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
#define mStartDeclCmdClass(mod, cmdkey, parentclass)
Definition: command.h:148
Command Drive
Definition: canvascommands.h:22
int actcolumn_
Definition: treecommands.h:48
Definition: command.h:186
Definition: treecommands.h:60
Definition: treecommands.h:38
Set of BufferString objects.
Definition: bufstringset.h:28
SeparString with backquotes as separators, use in most ascii files.
Definition: separstr.h:119
Set of pointers to objects.
Definition: commontypes.h:32
#define mStartDeclComposerClassWithInit(mod, cmdkey, parentclass, callerclass)
Definition: cmdcomposer.h:145
BufferStringSet actclicktags_
Definition: treecommands.h:50
Definition: uitreeview.h:201
uiTreeView & actlview_
Definition: treecommands.h:46
Definition: cmdrecorder.h:35
virtual bool isVisualCommand() const
Definition: treecommands.h:62
Definition: cmdcomposer.h:52
Definition: uitreeview.h:33
#define mStartDeclCmdClassNoActNoEntry(mod, cmdkey, parentclass)
Definition: command.h:122
#define mEndDeclComposerClass
Definition: cmdcomposer.h:149
Definition: command.h:156
uiTreeViewItem & actitem_
Definition: treecommands.h:47
Definition: treecommands.h:22

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