OpendTect  6.6
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  RCS: $Id$
10  ________________________________________________________________________
11 
12 -*/
13 
14 #include "uicmddrivermod.h"
15 #include "command.h"
16 #include "cmdcomposer.h"
17 
18 #include "uilineedit.h"
19 #include "uislider.h"
20 #include "uispinbox.h"
21 
22 
23 class uiComboBox;
24 
25 
26 namespace CmdDrive
27 {
28 
30 
31 #define mDeclInputActivator( typ, objclass ) \
32 \
33  mExpClass(uiCmdDriver) typ##Activator: public Activator \
34  { \
35  public: \
36  typ##Activator(const objclass& obj,const char* txt=0, \
37  bool enter=true) \
38  : actobj_( const_cast<objclass&>(obj) ) \
39  , actbuf_(txt), acttxt_(txt ? actbuf_.buf() : 0) \
40  , actenter_(enter) \
41  {} \
42  void actCB(CallBacker*); \
43  protected: \
44  objclass& actobj_; \
45  BufferString actbuf_; \
46  const char* acttxt_; \
47  bool actenter_; \
48  };
49 
53 
54 
56 
57 mExpClass(uiCmdDriver) SpinActivator: public Activator
58 {
59 public:
60  SpinActivator(const uiSpinBox&,int nrsteps);
61  void actCB(CallBacker*);
62 protected:
64  int actsteps_;
65 };
66 
67 
69 
70 mExpClass(uiCmdDriver) SliderActivator: public Activator
71 {
72 public:
73  SliderActivator(const uiSlider&,float fraction);
74  void actCB(CallBacker*);
75 protected:
77  float actfrac_;
78 };
79 
80 
84 
85 
88 
90 protected:
91  float textchanged_;
93 
95 protected:
99 
100 
101 }; // namespace CmdDrive
102 
sKey::Input
FixedString Input()
Definition: keystrs.h:81
uiLineEdit
Definition: uilineedit.h:100
cmdcomposer.h
CmdDrive::SliderActivator
Definition: inputcommands.h:71
CmdDrive::UiObjectCmd
Definition: command.h:155
mEndDeclCmdClass
#define mEndDeclCmdClass
Definition: command.h:151
uiComboBox
Combo box.
Definition: uicombobox.h:32
CmdDrive::SpinCmdComposer::pendinginput_
float pendinginput_
Definition: inputcommands.h:97
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
CmdDrive::SpinActivator::SpinActivator
SpinActivator(const uiSpinBox &, int nrsteps)
CmdDrive::SliderActivator::actCB
void actCB(CallBacker *)
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
CmdDrive::SliderActivator::actfrac_
float actfrac_
Definition: inputcommands.h:77
CmdDrive::mStartDeclCmdClass
mStartDeclCmdClass(CmdDriver, Wheel, UiObjectCmd) mEndDeclCmdClass class WheelActivator mStartDeclCmdClass(CmdDriver, GetWheel, UiObjQuestionCmd) mEndDeclCmdClass mStartDeclComposerClassWithInit(CmdDriver
uilineedit.h
command.h
CmdDrive::CmdComposer
Definition: cmdcomposer.h:52
CmdDrive::SpinActivator::actspin_
uiSpinBox & actspin_
Definition: inputcommands.h:63
mEndDeclComposerClass
#define mEndDeclComposerClass
Definition: cmdcomposer.h:148
mDeclInputActivator
#define mDeclInputActivator(typ, objclass)
Definition: inputcommands.h:31
CmdDrive::InputCmdComposer::textchanged_
float textchanged_
Definition: inputcommands.h:91
uispinbox.h
uiSlider
Definition: uislider.h:42
uislider.h
CmdDrive::SpinActivator::actsteps_
int actsteps_
Definition: inputcommands.h:64
mStartDeclComposerClassWithInit
#define mStartDeclComposerClassWithInit(mod, cmdkey, parentclass, callerclass)
Definition: cmdcomposer.h:144
uiSpinBox
Definition: uispinbox.h:24
mStartDeclComposerClass
#define mStartDeclComposerClass(mod, cmdkey, parentclass, callerclass)
Definition: cmdcomposer.h:130
CmdDrive::SpinActivator
Definition: inputcommands.h:58
CmdDrive
Command Drive
Definition: canvascommands.h:22
uiSliderObj
Definition: uislider.h:28
CmdDrive::SliderActivator::actslider_
uiSlider & actslider_
Definition: inputcommands.h:76
CmdDrive::SliderActivator::SliderActivator
SliderActivator(const uiSlider &, float fraction)
CmdDrive::SpinCmdComposer::pendingsteps_
int pendingsteps_
Definition: inputcommands.h:96
CmdDrive::UiObjQuestionCmd
Definition: command.h:161
CmdDrive::SpinActivator::actCB
void actCB(CallBacker *)
CmdDrive::Activator
Definition: command.h:186

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