OpendTect-6_4  6.4
objectfinder.h
Go to the documentation of this file.
1 #ifndef objectfinder_h
2 #define objectfinder_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Jaap Glas
9  Date: January 2009
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uicmddrivermod.h"
16 #include "sets.h"
17 
18 class FileMultiString;
19 class uiMainWin;
20 class BufferStringSet;
21 class CallBacker;
22 
23 namespace CmdDrive
24 {
25 
26 class WildcardManager;
27 
28 mExpClass(uiCmdDriver) ObjectFinder
29 {
30 public:
31  ObjectFinder(const uiMainWin&,bool casesensitive=true,
32  WildcardManager* =0);
33 
34  enum NodeTag { Everything, AllToolbars, AllDockWins,
35  CurWinTopGrp, UiObjNode,
36  ToolbarBase=1000, DockWinBase=2000 };
37 
38  bool findNodes(NodeTag,ObjectSet<const CallBacker>* nodelist,
39  const char* searchexpr=0) const;
40  bool findNodes(const CallBacker* root,
42  const char* searchexpr=0,
43  bool visonly=true) const;
44  bool findNodes(NodeTag,const CallBacker* root,
46  const char* searchexpr=0) const;
47 
48  bool selectNodes(ObjectSet<const CallBacker>& nodesfound,
49  const FileMultiString& keys,
50  int* unfoundkeyidx=0) const;
51 
52  static int deleteGreys(ObjectSet<const CallBacker>& objsfound,
53  bool yn=true);
54 
55  static void getAliases( const CallBacker& entity,
56  BufferStringSet& aliases );
57 
58  bool getAncestor(NodeTag& curtag,
59  const CallBacker*& curnode) const;
60 
61 protected:
62 
63  bool isKeyInTree(NodeTag,const CallBacker* root,
64  const char* searchexpr) const;
65 
66  int toolBarIndex(const CallBacker* entity ) const;
67  int dockWinIndex(const CallBacker* entity ) const;
68 
71 
73 };
74 
75 
76 }; // namespace CmdDrive
77 
78 
79 #endif
#define mExpClass(module)
Definition: commondefs.h:160
NodeTag
Definition: objectfinder.h:34
User interface main window.
Definition: uimainwin.h:36
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
WildcardManager * wcm_
Definition: objectfinder.h:72
Command Drive
Definition: canvascommands.h:22
Definition: searchkey.h:57
Set of BufferString objects.
Definition: bufstringset.h:28
Definition: objectfinder.h:35
bool casesensitive_
Definition: objectfinder.h:70
SeparString with backquotes as separators, use in most ascii files.
Definition: separstr.h:119
Definition: objectfinder.h:28
const uiMainWin & curwin_
Definition: objectfinder.h:69

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