OpendTect  6.3
objectfinder.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: January 2009
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "uicmddrivermod.h"
14 #include "sets.h"
15 
16 class FileMultiString;
17 class uiMainWin;
18 class BufferStringSet;
19 class CallBacker;
20 
21 namespace CmdDrive
22 {
23 
24 class WildcardManager;
25 
26 mExpClass(uiCmdDriver) ObjectFinder
27 {
28 public:
29  ObjectFinder(const uiMainWin&,bool casesensitive=true,
30  WildcardManager* =0);
31 
32  enum NodeTag { Everything, AllToolbars, AllDockWins,
33  CurWinTopGrp, UiObjNode,
34  ToolbarBase=1000, DockWinBase=2000 };
35 
36  bool findNodes(NodeTag,ObjectSet<const CallBacker>* nodelist,
37  const char* searchexpr=0) const;
38  bool findNodes(const CallBacker* root,
40  const char* searchexpr=0,
41  bool visonly=true) const;
42  bool findNodes(NodeTag,const CallBacker* root,
44  const char* searchexpr=0) const;
45 
46  bool selectNodes(ObjectSet<const CallBacker>& nodesfound,
47  const FileMultiString& keys,
48  int* unfoundkeyidx=0) const;
49 
50  static int deleteGreys(ObjectSet<const CallBacker>& objsfound,
51  bool yn=true);
52 
53  static void getAliases( const CallBacker& entity,
54  BufferStringSet& aliases );
55 
56  bool getAncestor(NodeTag& curtag,
57  const CallBacker*& curnode) const;
58 
59 protected:
60 
61  bool isKeyInTree(NodeTag,const CallBacker* root,
62  const char* searchexpr) const;
63 
64  int toolBarIndex(const CallBacker* entity ) const;
65  int dockWinIndex(const CallBacker* entity ) const;
66 
69 
71 };
72 
73 
74 }; // namespace CmdDrive
#define mExpClass(module)
Definition: commondefs.h:157
NodeTag
Definition: objectfinder.h:32
User interface main window.
Definition: uimainwin.h:34
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
WildcardManager * wcm_
Definition: objectfinder.h:70
Command Drive
Definition: canvascommands.h:20
Definition: searchkey.h:55
Set of BufferString objects.
Definition: bufstringset.h:25
Definition: objectfinder.h:33
bool casesensitive_
Definition: objectfinder.h:68
SeparString with backquotes as separators, use in most ascii files.
Definition: separstr.h:131
Definition: objectfinder.h:26
const uiMainWin & curwin_
Definition: objectfinder.h:67

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