13 #include "generalmod.h" 30 virtual const char* text()
const = 0;
31 virtual int getIntValue()
const = 0;
32 virtual od_int64 getInt64Value()
const = 0;
33 virtual double getDValue()
const = 0;
34 virtual float getFValue()
const = 0;
35 virtual bool getBoolValue()
const = 0;
37 virtual void setText(
const char*) = 0;
38 virtual void setValue(
const char* s);
39 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;
84 virtual const char*
text()
const 85 {
return Conv::to<const char*>( getvalue_() ); }
87 {
return Conv::to<int>( getvalue_() ); }
89 {
return Conv::to<od_int64>( getvalue_() ); }
91 {
return Conv::to<double>( getvalue_() );}
93 {
return Conv::to<float>( getvalue_() ); }
95 {
return Conv::to<bool>( getvalue_() ); }
98 { setvalue_( Conv::to<T>(s) ); }
102 { setvalue_( Conv::to<T>(i) ); }
104 { setvalue_( Conv::to<T>(i) ); }
106 { setvalue_( Conv::to<T>(d) ); }
108 { setvalue_( Conv::to<T>(f) ); }
110 { setvalue_( Conv::to<T>(b) ); }
113 { setvalue_(
mUdf(T)); }
119 virtual void setvalue_( T v ) = 0;
120 virtual T getvalue_()
const = 0;
#define mExpClass(module)
Definition: commondefs.h:157
#define od_int64
Definition: plftypes.h:34
Definition: uistring.h:88
Set of BufferString objects.
Definition: bufstringset.h:25
Specification of input characteristics.
Definition: datainpspec.h:88
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:270
#define mClass(module)
Definition: commondefs.h:161
CallBacks object-oriented (object + method).
Definition: callback.h:62