21 #ifndef FXDATATARGET_H 22 #define FXDATATARGET_H 74 long onCmdValue(
FXObject*,FXSelector,
void*);
75 long onUpdValue(
FXObject*,FXSelector,
void*);
76 long onCmdOption(
FXObject*,FXSelector,
void*);
77 long onUpdOption(
FXObject*,FXSelector,
void*);
98 ID_OPTION=ID_VALUE+10001,
99 ID_LAST=ID_OPTION+10000
104 FXDataTarget():data(nullptr),target(nullptr),message(0),type(DT_VOID){}
110 FXDataTarget(FXbool& value,
FXObject* tgt=
nullptr,FXSelector sel=0):data(&value),target(tgt),message(sel),type(DT_BOOL){}
113 FXDataTarget(FXchar& value,
FXObject* tgt=
nullptr,FXSelector sel=0):data(&value),target(tgt),message(sel),type(DT_CHAR){}
116 FXDataTarget(FXuchar& value,
FXObject* tgt=
nullptr,FXSelector sel=0):data(&value),target(tgt),message(sel),type(DT_UCHAR){}
119 FXDataTarget(FXshort& value,
FXObject* tgt=
nullptr,FXSelector sel=0):data(&value),target(tgt),message(sel),type(DT_SHORT){}
122 FXDataTarget(FXushort& value,
FXObject* tgt=
nullptr,FXSelector sel=0):data(&value),target(tgt),message(sel),type(DT_USHORT){}
125 FXDataTarget(FXint& value,
FXObject* tgt=
nullptr,FXSelector sel=0):data(&value),target(tgt),message(sel),type(DT_INT){}
128 FXDataTarget(FXuint& value,
FXObject* tgt=
nullptr,FXSelector sel=0):data(&value),target(tgt),message(sel),type(DT_UINT){}
131 FXDataTarget(FXlong& value,
FXObject* tgt=
nullptr,FXSelector sel=0):data(&value),target(tgt),message(sel),type(DT_LONG){}
134 FXDataTarget(FXulong& value,
FXObject* tgt=
nullptr,FXSelector sel=0):data(&value),target(tgt),message(sel),type(DT_ULONG){}
137 FXDataTarget(FXfloat& value,
FXObject* tgt=
nullptr,FXSelector sel=0):data(&value),target(tgt),message(sel),type(DT_FLOAT){}
140 FXDataTarget(FXdouble& value,
FXObject* tgt=
nullptr,FXSelector sel=0):data(&value),target(tgt),message(sel),type(DT_DOUBLE){}
171 void connect(FXbool& value){ data=&value; type=DT_BOOL; }
174 void connect(FXchar& value){ data=&value; type=DT_CHAR; }
177 void connect(FXuchar& value){ data=&value; type=DT_UCHAR; }
180 void connect(FXshort& value){ data=&value; type=DT_SHORT; }
183 void connect(FXushort& value){ data=&value; type=DT_USHORT; }
186 void connect(FXint& value){ data=&value; type=DT_INT; }
189 void connect(FXuint& value){ data=&value; type=DT_UINT; }
192 void connect(FXlong& value){ data=&value; type=DT_LONG; }
195 void connect(FXulong& value){ data=&value; type=DT_ULONG; }
198 void connect(FXfloat& value){ data=&value; type=DT_FLOAT; }
201 void connect(FXdouble& value){ data=&value; type=DT_DOUBLE; }
208 void connect(
FXObject* tgt,FXSelector sel){ data=
nullptr; target=tgt; message=sel; type=DT_VOID; }
211 void connect(FXbool& value,
FXObject* tgt,FXSelector sel){ data=&value; target=tgt; message=sel; type=DT_BOOL; }
214 void connect(FXchar& value,
FXObject* tgt,FXSelector sel){ data=&value; target=tgt; message=sel; type=DT_CHAR; }
217 void connect(FXuchar& value,
FXObject* tgt,FXSelector sel){ data=&value; target=tgt; message=sel; type=DT_UCHAR; }
220 void connect(FXshort& value,
FXObject* tgt,FXSelector sel){ data=&value; target=tgt; message=sel; type=DT_SHORT; }
223 void connect(FXushort& value,
FXObject* tgt,FXSelector sel){ data=&value; target=tgt; message=sel; type=DT_USHORT; }
226 void connect(FXint& value,
FXObject* tgt,FXSelector sel){ data=&value; target=tgt; message=sel; type=DT_INT; }
229 void connect(FXuint& value,
FXObject* tgt,FXSelector sel){ data=&value; target=tgt; message=sel; type=DT_UINT; }
232 void connect(FXlong& value,
FXObject* tgt,FXSelector sel){ data=&value; target=tgt; message=sel; type=DT_LONG; }
235 void connect(FXulong& value,
FXObject* tgt,FXSelector sel){ data=&value; target=tgt; message=sel; type=DT_ULONG; }
238 void connect(FXfloat& value,
FXObject* tgt,FXSelector sel){ data=&value; target=tgt; message=sel; type=DT_FLOAT; }
241 void connect(FXdouble& value,
FXObject* tgt,FXSelector sel){ data=&value; target=tgt; message=sel; type=DT_DOUBLE; }
FXDataTarget(FXuint &value, FXObject *tgt=nullptr, FXSelector sel=0)
Associate with unsigned int variable.
Definition: FXDataTarget.h:128
void connect(FXfloat &value, FXObject *tgt, FXSelector sel)
Associate with float variable; also set target and message.
Definition: FXDataTarget.h:238
void connect(FXuchar &value)
Associate with unsigned character variable.
Definition: FXDataTarget.h:177
void setSelector(FXSelector sel)
Set the message identifier for this data target.
Definition: FXDataTarget.h:154
void connect(FXString &value, FXObject *tgt, FXSelector sel)
Associate with string variable; also set target and message.
Definition: FXDataTarget.h:244
A Data Target allows a widget to be directly connected with a associated variable, without any additional "glue code".
Definition: FXDataTarget.h:63
void connect(FXdouble &value)
Associate with double variable.
Definition: FXDataTarget.h:201
FXDataTarget(FXulong &value, FXObject *tgt=nullptr, FXSelector sel=0)
Associate with unsigned long variable.
Definition: FXDataTarget.h:134
FXDataTarget(FXObject *tgt, FXSelector sel)
Associate with nothing.
Definition: FXDataTarget.h:107
void connect(FXuint &value, FXObject *tgt, FXSelector sel)
Associate with unsigned int variable; also set target and message.
Definition: FXDataTarget.h:229
void connect(FXuint &value)
Associate with unsigned int variable.
Definition: FXDataTarget.h:189
void connect(FXObject *tgt, FXSelector sel)
Associate with nothing; also set target and message.
Definition: FXDataTarget.h:208
void connect(FXlong &value, FXObject *tgt, FXSelector sel)
Associate with long variable; also set target and message.
Definition: FXDataTarget.h:232
FXuint getType() const
Return type of data its connected to.
Definition: FXDataTarget.h:161
FXDataTarget(FXushort &value, FXObject *tgt=nullptr, FXSelector sel=0)
Associate with unsigned short variable.
Definition: FXDataTarget.h:122
void connect(FXushort &value)
Associate with unsigned short variable.
Definition: FXDataTarget.h:183
void connect(FXshort &value)
Associate with signed short variable.
Definition: FXDataTarget.h:180
FXDataTarget(FXshort &value, FXObject *tgt=nullptr, FXSelector sel=0)
Associate with signed short variable.
Definition: FXDataTarget.h:119
void connect(FXint &value, FXObject *tgt, FXSelector sel)
Associate with int variable; also set target and message.
Definition: FXDataTarget.h:226
void connect(FXlong &value)
Associate with long variable.
Definition: FXDataTarget.h:192
void connect()
Associate with nothing.
Definition: FXDataTarget.h:168
void connect(FXdouble &value, FXObject *tgt, FXSelector sel)
Associate with double variable; also set target and message.
Definition: FXDataTarget.h:241
FXSelector getSelector() const
Get the message identifier for this data target.
Definition: FXDataTarget.h:157
void setTarget(FXObject *t)
Set the message target object for this data target.
Definition: FXDataTarget.h:147
void connect(FXuchar &value, FXObject *tgt, FXSelector sel)
Associate with unsigned character variable; also set target and message.
Definition: FXDataTarget.h:217
void connect(FXString &value)
Associate with string variable.
Definition: FXDataTarget.h:204
FXObject * getTarget() const
Get the message target object for this data target, if any.
Definition: FXDataTarget.h:150
void connect(FXulong &value, FXObject *tgt, FXSelector sel)
Associate with unsigned long variable; also set target and message.
Definition: FXDataTarget.h:235
void connect(FXshort &value, FXObject *tgt, FXSelector sel)
Associate with signed short variable; also set target and message.
Definition: FXDataTarget.h:220
FXDataTarget(FXuchar &value, FXObject *tgt=nullptr, FXSelector sel=0)
Associate with unsigned character variable.
Definition: FXDataTarget.h:116
FXDataTarget(FXbool &value, FXObject *tgt=nullptr, FXSelector sel=0)
Associate with character variable.
Definition: FXDataTarget.h:110
FXDataTarget(FXchar &value, FXObject *tgt=nullptr, FXSelector sel=0)
Associate with character variable.
Definition: FXDataTarget.h:113
FXDataTarget()
Associate with nothing.
Definition: FXDataTarget.h:104
Definition: FX4Splitter.h:28
void connect(FXulong &value)
Associate with unsigned long variable.
Definition: FXDataTarget.h:195
FXDataTarget(FXdouble &value, FXObject *tgt=nullptr, FXSelector sel=0)
Associate with double variable.
Definition: FXDataTarget.h:140
void connect(FXchar &value)
Associate with character variable.
Definition: FXDataTarget.h:174
void connect(FXfloat &value)
Associate with float variable.
Definition: FXDataTarget.h:198
void connect(FXushort &value, FXObject *tgt, FXSelector sel)
Associate with unsigned short variable; also set target and message.
Definition: FXDataTarget.h:223
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:138
void connect(FXint &value)
Associate with int variable.
Definition: FXDataTarget.h:186
FXDataTarget(FXlong &value, FXObject *tgt=nullptr, FXSelector sel=0)
Associate with long variable.
Definition: FXDataTarget.h:131
void * getData() const
Return pointer to data its connected to.
Definition: FXDataTarget.h:164
FXDataTarget(FXfloat &value, FXObject *tgt=nullptr, FXSelector sel=0)
Associate with float variable.
Definition: FXDataTarget.h:137
void connect(FXbool &value, FXObject *tgt, FXSelector sel)
Associate with character variable; also set target and message.
Definition: FXDataTarget.h:211
void connect(FXchar &value, FXObject *tgt, FXSelector sel)
Associate with character variable; also set target and message.
Definition: FXDataTarget.h:214
FXDataTarget(FXint &value, FXObject *tgt=nullptr, FXSelector sel=0)
Associate with int variable.
Definition: FXDataTarget.h:125
FXDataTarget(FXString &value, FXObject *tgt=nullptr, FXSelector sel=0)
Associate with string variable.
Definition: FXDataTarget.h:143
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42
void connect(FXbool &value)
Associate with FXbool variable.
Definition: FXDataTarget.h:171