OpendTect-6_4  6.4
visselman.h
Go to the documentation of this file.
1 #ifndef visselman_h
2 #define visselman_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kris Tingdahl
9  Date: Jan 2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 
17 #include "visbasemod.h"
18 #include "callback.h"
19 #include "sets.h"
20 
21 class SoSelection;
22 class SoNode;
23 class SoPath;
24 
25 namespace Threads { class Mutex; }
26 
27 namespace visBase
28 {
29 
30 class Scene;
31 class DataObject;
32 class DataManager;
33 class Selectable;
34 
45 {
46 public:
48  virtual ~SelectionManager();
49 
50  void setAllowMultiple(bool yn);
51  bool allowMultiple() const { return allowmultiple_; }
52 
53  void select(int id,bool keepoldsel=false)
54  { select( id, keepoldsel, true ); }
55  void deSelect(int id) { deSelect( id, true ); }
56  void deSelectAll() { deSelectAll( true ); }
57  void updateSel(int id) { updateSel( id, true ); }
58 
59  const TypeSet<int>& selected() const { return selectedids_; }
60 
64 
65  // for implementing pick-based reselection
67 
68  void fillPar(IOPar&,TypeSet<int>&) const {}
69  void usePar(const IOPar&) {}
70 
71 protected:
72  void select(int id,bool keep,bool lock);
73  void deSelect(int id,bool lock);
74  void deSelectAll(bool lock);
75  void updateSel(int id,bool lock);
76 
80 };
81 
82 } // namespace visBase
83 
84 #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
bool allowMultiple() const
Definition: visselman.h:51
const TypeSet< int > & selected() const
Definition: visselman.h:59
CNotifier< SelectionManager, int > selnotifier
Definition: visselman.h:61
void deSelect(int id)
Definition: visselman.h:55
void select(int id, bool keepoldsel=false)
Definition: visselman.h:53
CNotifier< SelectionManager, int > reselnotifier
Definition: visselman.h:66
interface to threads that should be portable.
Definition: atomic.h:28
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
SelectionManager handles DataObject that can be selected. If an object can be selected, it has to register himself with regSelObject. At registration it has to give two objects, first of all, he gives the object that outside users will associate him with when they want to add their CB to detect his selection.
Definition: visselman.h:44
void fillPar(IOPar &, TypeSet< int > &) const
Definition: visselman.h:68
void updateSel(int id)
Definition: visselman.h:57
void deSelectAll()
Definition: visselman.h:56
CNotifier< SelectionManager, int > deselnotifier
Definition: visselman.h:62
Definition: visannot.h:43
CNotifier< SelectionManager, int > updateselnotifier
Definition: visselman.h:63
Threads::Mutex & mutex_
Definition: visselman.h:79
Is a lock that allows a thread to have exlusive rights to something.
Definition: thread.h:43
Notifier with automatic capsule creation.
Definition: callback.h:395
void usePar(const IOPar &)
Definition: visselman.h:69
TypeSet< int > selectedids_
Definition: visselman.h:77
bool allowmultiple_
Definition: visselman.h:78

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