OpendTect  6.3
inputcommands.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: February 2009
9  ________________________________________________________________________
10 
11 -*/
12 
13 #include "uicmddrivermod.h"
14 #include "command.h"
15 #include "cmdcomposer.h"
16 
17 #include "uilineedit.h"
18 #include "uislider.h"
19 #include "uispinbox.h"
20 
21 
22 class uiComboBox;
23 
24 
25 namespace CmdDrive
26 {
27 
29 
30 #define mDeclInputActivator( typ, objclass ) \
31 \
32  mExpClass(uiCmdDriver) typ##Activator: public Activator \
33  { \
34  public: \
35  typ##Activator(const objclass& obj,const char* txt=0, \
36  bool enter=true) \
37  : actobj_( const_cast<objclass&>(obj) ) \
38  , actbuf_(txt), acttxt_(txt ? actbuf_.buf() : 0) \
39  , actenter_(enter) \
40  {} \
41  void actCB(CallBacker*); \
42  protected: \
43  objclass& actobj_; \
44  BufferString actbuf_; \
45  const char* acttxt_; \
46  bool actenter_; \
47  };
48 
52 
53 
55 
56 mExpClass(uiCmdDriver) SpinActivator: public Activator
57 {
58 public:
59  SpinActivator(const uiSpinBox&,int nrsteps);
60  void actCB(CallBacker*);
61 protected:
63  int actsteps_;
64 };
65 
66 
68 
69 mExpClass(uiCmdDriver) SliderActivator: public Activator
70 {
71 public:
72  SliderActivator(const uiSlider&,float fraction);
73  void actCB(CallBacker*);
74 protected:
76  float actfrac_;
77 };
78 
79 
83 
84 
87 
88 mStartDeclComposerClassWithInit( uiCmdDriver, Input, CmdComposer, uiLineEdit )
89 protected:
90  float textchanged_;
92 
93 mStartDeclComposerClassWithInit( uiCmdDriver, Spin, CmdComposer, uiSpinBox )
94 protected:
95  int pendingsteps_;
96  float pendinginput_;
98 
99 
100 }; // namespace CmdDrive
#define mEndDeclCmdClass
Definition: command.h:150
#define mExpClass(module)
Definition: commondefs.h:157
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
#define mStartDeclCmdClass(mod, cmdkey, parentclass)
Definition: command.h:146
Definition: uislider.h:40
Command Drive
Definition: canvascommands.h:20
uiSpinBox & actspin_
Definition: inputcommands.h:62
Definition: command.h:184
int actsteps_
Definition: inputcommands.h:63
Definition: inputcommands.h:56
Combo box.
Definition: uicombobox.h:30
Definition: inputcommands.h:69
#define mDeclInputActivator(typ, objclass)
Definition: inputcommands.h:30
FixedString Input()
Definition: keystrs.h:72
#define mStartDeclComposerClassWithInit(mod, cmdkey, parentclass, callerclass)
Definition: cmdcomposer.h:143
Definition: uislider.h:26
Definition: cmdcomposer.h:50
float actfrac_
Definition: inputcommands.h:76
Definition: uispinbox.h:22
#define mEndDeclComposerClass
Definition: cmdcomposer.h:147
Definition: command.h:160
Definition: command.h:154
uiSlider & actslider_
Definition: inputcommands.h:75
Definition: uilineedit.h:49
#define mStartDeclComposerClass(mod, cmdkey, parentclass, callerclass)
Definition: cmdcomposer.h:129

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