A data target allows a valuator widget such as an FXSlider or FXTextField to be directly connected with a
variable in the program. Whenever the valuator control changes, the
variable connected through the data target is automatically updated;
conversely, whenever the program changes a variable, all the connected
valuator widgets will be updated to reflect this new value on the display.
Data targets also allow connecting FXRadioButtons, FXMenuCommands, and so
on to a variable. In this case, the new value of the connected variable is
computed by subtracting +FXDataTarget::ID_OPTION+ from the message
identifier.
Events
The following messages are sent by FXDataTarget to its target:
SEL_COMMAND: | Sent after the data target processes a SEL_COMMAND message itself
|
SEL_CHANGED: | Sent after the data target processes a SEL_CHANGED message itself
|
Message identifiers
ID_VALUE: | Causes the FXDataTarget to ask sender for
value
|
ID_OPTION: | ID_OPTION+i will set the value to i, where
-10000 <= i <= 10000
|