OpendTect-6_4  6.4
inputcommands.h
Go to the documentation of this file.
1 #ifndef inputcommands_h
2 #define inputcommands_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Jaap Glas
9  Date: February 2009
10  RCS: $Id$
11  ________________________________________________________________________
12 
13 -*/
14 
15 #include "uicmddrivermod.h"
16 #include "command.h"
17 #include "cmdcomposer.h"
18 
19 #include "uilineedit.h"
20 #include "uislider.h"
21 #include "uispinbox.h"
22 
23 
24 class uiComboBox;
25 
26 
27 namespace CmdDrive
28 {
29 
31 
32 #define mDeclInputActivator( typ, objclass ) \
33 \
34  mExpClass(uiCmdDriver) typ##Activator: public Activator \
35  { \
36  public: \
37  typ##Activator(const objclass& obj,const char* txt=0, \
38  bool enter=true) \
39  : actobj_( const_cast<objclass&>(obj) ) \
40  , actbuf_(txt), acttxt_(txt ? actbuf_.buf() : 0) \
41  , actenter_(enter) \
42  {} \
43  void actCB(CallBacker*); \
44  protected: \
45  objclass& actobj_; \
46  BufferString actbuf_; \
47  const char* acttxt_; \
48  bool actenter_; \
49  };
50 
54 
55 
57 
58 mExpClass(uiCmdDriver) SpinActivator: public Activator
59 {
60 public:
61  SpinActivator(const uiSpinBox&,int nrsteps);
62  void actCB(CallBacker*);
63 protected:
65  int actsteps_;
66 };
67 
68 
70 
71 mExpClass(uiCmdDriver) SliderActivator: public Activator
72 {
73 public:
74  SliderActivator(const uiSlider&,float fraction);
75  void actCB(CallBacker*);
76 protected:
78  float actfrac_;
79 };
80 
81 
85 
86 
89 
90 mStartDeclComposerClassWithInit( uiCmdDriver, Input, CmdComposer, uiLineEdit )
91 protected:
92  float textchanged_;
94 
95 mStartDeclComposerClassWithInit( uiCmdDriver, Spin, CmdComposer, uiSpinBox )
96 protected:
97  int pendingsteps_;
98  float pendinginput_;
100 
101 
102 }; // namespace CmdDrive
103 
104 #endif
#define mEndDeclCmdClass
Definition: command.h:152
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
#define mStartDeclCmdClass(mod, cmdkey, parentclass)
Definition: command.h:148
Definition: uislider.h:42
Command Drive
Definition: canvascommands.h:22
uiSpinBox & actspin_
Definition: inputcommands.h:64
Definition: command.h:186
int actsteps_
Definition: inputcommands.h:65
Definition: inputcommands.h:58
Combo box.
Definition: uicombobox.h:32
Definition: inputcommands.h:71
#define mDeclInputActivator(typ, objclass)
Definition: inputcommands.h:32
FixedString Input()
Definition: keystrs.h:74
#define mStartDeclComposerClassWithInit(mod, cmdkey, parentclass, callerclass)
Definition: cmdcomposer.h:145
Definition: uislider.h:28
Definition: cmdcomposer.h:52
float actfrac_
Definition: inputcommands.h:78
Definition: uispinbox.h:24
#define mEndDeclComposerClass
Definition: cmdcomposer.h:149
Definition: command.h:162
Definition: command.h:156
uiSlider & actslider_
Definition: inputcommands.h:77
Definition: uilineedit.h:51
#define mStartDeclComposerClass(mod, cmdkey, parentclass, callerclass)
Definition: cmdcomposer.h:131

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