OpendTect  6.3
treecommands.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: Jaap Glas
8  Date: February 2009
9  ________________________________________________________________________
10 
11 -*/
12 
13 #include "uicmddrivermod.h"
14 #include "command.h"
15 #include "cmdcomposer.h"
16 
17 namespace CmdDrive
18 {
19 
21 protected:
22 
23  bool parTreeSelPre(const uiTreeView&,
24  FileMultiString& treepath,
25  ObjectSet<const uiTreeViewItem>& nodesfound,
26  FileMultiString& curpath,bool multisel) const;
27 
28  void unfoldTreeNodes(ObjectSet<const uiTreeViewItem>&) const;
29  int countTreeItems(const uiTreeView&,const uiTreeViewItem*,
30  bool countkids=true) const;
31 
32  const uiTreeViewItem* singleSelected(const uiTreeView& uilview) const;
33 
35 
36 mExpClass(uiCmdDriver) TreeActivator: public Activator
37 {
38 public:
39  TreeActivator(const uiTreeView&,const uiTreeViewItem&,
40  const BufferStringSet& clicktags,
41  int column=0);
42  void actCB(CallBacker*);
43 protected:
44  uiTreeView& actlview_;
45  uiTreeViewItem& actitem_;
47 
49 };
50 
51 
52 mStartDeclCmdClass( uiCmdDriver, TreeClick, TreeCmd ) mEndDeclCmdClass
53 mStartDeclCmdClass( uiCmdDriver, TreeMenu, TreeCmd ) mEndDeclCmdClass
54 
55 mStartDeclCmdClass( uiCmdDriver, TreeButton, TreeCmd ) mEndDeclCmdClass
56 mStartDeclCmdClass( uiCmdDriver, TreeExpand, TreeCmd ) mEndDeclCmdClass
57 
58 mStartDeclCmdClassNoActNoEntry( uiCmdDriver,TreeQuestion, TreeCmd )
59  virtual bool isUiObjChangeCommand() const { return false; }
60  virtual bool isVisualCommand() const { return false; }
62 
66 mStartDeclCmdClass( uiCmdDriver, IsTreeItemExpanded, TreeQuestionCmd )
78 
79 
81 public:
82  virtual void updateInternalState();
83 
84 protected:
85  void reInit();
86  void storeTreeState();
87  void addToTreeState(const uiTreeView&,
88  const uiTreeViewItem* root=0);
89  void labelStoredStateOld();
90  void labelStoredStateNew();
91 
92  void writeTreeClick();
93  void writeTreeButton();
94  void writeTreeExpand();
95  void writeTreeMenu(const CmdRecEvent& menuevent);
96 
97  int stagenr_;
98  const uiTreeViewItem* clickeditem_;
99  int clickedcol_;
100  bool leftclicked_;
101  bool ctrlclicked_;
102  bool selchanged_;
103  bool expanded_;
104  bool treecmdsflushed_;
105 
106  ObjectSet<const uiTreeViewItem> checkeditems_;
107  ObjectSet<const uiTreeViewItem> wascheckeditems_;
108  ObjectSet<const uiTreeViewItem> ischeckeditems_;
109 
111 
112 }; // namespace CmdDrive
#define mEndDeclCmdClass
Definition: command.h:150
#define mExpClass(module)
Definition: commondefs.h:157
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
#define mStartDeclCmdClass(mod, cmdkey, parentclass)
Definition: command.h:146
Command Drive
Definition: canvascommands.h:20
int actcolumn_
Definition: treecommands.h:46
Definition: command.h:184
Definition: treecommands.h:58
Definition: treecommands.h:36
Set of BufferString objects.
Definition: bufstringset.h:25
SeparString with backquotes as separators, use in most ascii files.
Definition: separstr.h:131
Set of pointers to objects.
Definition: commontypes.h:28
#define mStartDeclComposerClassWithInit(mod, cmdkey, parentclass, callerclass)
Definition: cmdcomposer.h:143
BufferStringSet actclicktags_
Definition: treecommands.h:48
Definition: uitreeview.h:194
uiTreeView & actlview_
Definition: treecommands.h:44
Definition: cmdrecorder.h:33
virtual bool isVisualCommand() const
Definition: treecommands.h:60
Definition: cmdcomposer.h:50
Definition: uitreeview.h:29
#define mStartDeclCmdClassNoActNoEntry(mod, cmdkey, parentclass)
Definition: command.h:120
#define mEndDeclComposerClass
Definition: cmdcomposer.h:147
Definition: command.h:154
uiTreeViewItem & actitem_
Definition: treecommands.h:45
Definition: treecommands.h:20

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