15 #include "generalmod.h" 32 virtual const char* text()
const = 0;
33 virtual int getIntValue()
const = 0;
34 virtual double getDValue()
const = 0;
35 virtual float getFValue()
const = 0;
36 virtual bool getBoolValue()
const = 0;
38 virtual void setText(
const char*) = 0;
39 virtual void setValue(
const char* s);
40 virtual void setValue(
int) = 0;
41 virtual void setValue(
double) = 0;
42 virtual void setValue(
float) = 0;
43 virtual void setValue(
bool) = 0;
45 virtual void setReadOnly(
bool =
true ) = 0;
46 virtual bool isReadOnly()
const = 0;
49 virtual void addItem(
const uiString&);
53 bool notifyValueChanging(
const CallBack& cb );
57 bool notifyValueChanged(
const CallBack& cb );
60 bool notifyUpdateRequested(
const CallBack& cb );
65 virtual void setToolTip(
const uiString&) = 0;
70 virtual bool notifyValueChanging_(
const CallBack&) =0;
72 virtual bool notifyValueChanged_(
const CallBack&) =0;
73 virtual bool notifyUpdateRequested_(
const CallBack&) =0;
87 virtual const char*
text()
const 88 {
return Conv::to<const char*>( getvalue_() ); }
90 {
return Conv::to<int>( getvalue_() ); }
92 {
return Conv::to<double>( getvalue_() );}
94 {
return Conv::to<float>( getvalue_() ); }
96 {
return Conv::to<bool>( getvalue_() ); }
99 { setvalue_( Conv::to<T>(s) ); }
103 { setvalue_( Conv::to<T>(i) ); }
105 { setvalue_( Conv::to<T>(d) ); }
107 { setvalue_( Conv::to<T>(f) ); }
109 { setvalue_( Conv::to<T>(b) ); }
112 { setvalue_(
mUdf(T)); }
118 virtual void setvalue_( T v ) = 0;
119 virtual T getvalue_()
const = 0;
#define mExpClass(module)
Definition: commondefs.h:160
Definition: uistring.h:89
Set of BufferString objects.
Definition: bufstringset.h:28
Specification of input characteristics.
Definition: datainpspec.h:89
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
#define mClass(module)
Definition: commondefs.h:164
CallBacks object-oriented (object + method).
Definition: callback.h:57