OpendTect-6_4  6.4
useraction.h
Go to the documentation of this file.
1 #ifndef useraction_h
2 #define useraction_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: K. Tingdahl
9  Date: Dec 2007
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "generalmod.h"
16 #include "callback.h"
17 #include "bufstring.h"
18 
19 mClass(General) UserAction : public CallBacker
20 {
21 public:
22  mExpClass(General) Setup
23  {
24  public:
25  Setup();
26 
27  mDefSetupMemb(bool,checkable);
28  mDefSetupMemb(bool,checked);
29  mDefSetupMemb(bool,enabled);
30  mDefSetupMemb(bool,visible);
32  mDefSetupMemb(BufferString,icontxt);
34  mDefSetupMemb(BufferString,tooltip);
35  };
36  UserAction( const UserAction::Setup& );
37  UserAction( const UserAction& );
38 
40 
41  int id_;
42 
44 };
45 
46 
48 {
49 public:
50  virtual ~UserActionGroup();
51  virtual void addAction(UserAction*,bool manage=false);
52  virtual bool canAddGroup() const;
53  virtual void addGroup(UserActionGroup*,bool manage=false);
54 
55  virtual void removeAll();
56 
57 protected:
60 
63 };
64 
65 
67 {
68 public:
69  int visID() const;
70 
73  bool isHandled() const;
79  void setHandled(bool);
85 protected:
86  UserActionHandler(int visid);
87  int getFreeID();
88 
89  int freeid_;
90  int visid_;
91  bool ishandled_;
92 };
93 
94 #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
Notifier< UserAction > change_
Definition: useraction.h:43
FixedString Setup()
Definition: keystrs.h:116
BoolTypeSet actionsownership_
Definition: useraction.h:59
Definition: useraction.h:66
Definition: useraction.h:22
bool ishandled_
Definition: useraction.h:91
Definition: useraction.h:47
int visid_
Definition: useraction.h:90
int id_
Definition: useraction.h:41
void removeAll()
ObjectSet< UserActionGroup > groups_
Definition: useraction.h:61
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
Definition: useraction.h:19
Setup setup_
Definition: useraction.h:39
int freeid_
Definition: useraction.h:89
CNotifier< UserActionHandler, int > handlenotifier
Definition: useraction.h:72
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Notifier< UserActionHandler > createnotifier
Definition: useraction.h:71
BoolTypeSet groupsowership_
Definition: useraction.h:62
#define mClass(module)
Definition: commondefs.h:164
ObjectSet< UserAction > actions_
Definition: useraction.h:58

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