Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXDataTarget Class Reference

A Data Target allows a valuator widget such as a Slider or Text Field to be directly connected with a variable in the program. More...

#include <FXDataTarget.h>

Inheritance diagram for FX::FXDataTarget:

FX::FXObject List of all members.

Public Types

enum  {
  ID_VALUE = 1,
  ID_OPTION = ID_VALUE+10001,
  ID_LAST = ID_OPTION+10000
}

Public Member Functions

 FXDataTarget (FXObject *tgt=NULL, FXSelector sel=0)
 FXDataTarget (FXchar &value, FXObject *tgt=NULL, FXSelector sel=0)
 FXDataTarget (FXuchar &value, FXObject *tgt=NULL, FXSelector sel=0)
 FXDataTarget (FXshort &value, FXObject *tgt=NULL, FXSelector sel=0)
 FXDataTarget (FXushort &value, FXObject *tgt=NULL, FXSelector sel=0)
 FXDataTarget (FXint &value, FXObject *tgt=NULL, FXSelector sel=0)
 FXDataTarget (FXuint &value, FXObject *tgt=NULL, FXSelector sel=0)
 FXDataTarget (FXlong &value, FXObject *tgt=NULL, FXSelector sel=0)
 FXDataTarget (FXulong &value, FXObject *tgt=NULL, FXSelector sel=0)
 FXDataTarget (FXfloat &value, FXObject *tgt=NULL, FXSelector sel=0)
 FXDataTarget (FXdouble &value, FXObject *tgt=NULL, FXSelector sel=0)
 FXDataTarget (FXString &value, FXObject *tgt=NULL, FXSelector sel=0)
void setTarget (FXObject *t)
FXObjectgetTarget () const
void setSelector (FXSelector sel)
FXSelector getSelector () const
FXuint getType () const
void * getData () const
void connect ()
void connect (FXchar &value)
void connect (FXuchar &value)
void connect (FXshort &value)
void connect (FXushort &value)
void connect (FXint &value)
void connect (FXuint &value)
void connect (FXlong &value)
void connect (FXulong &value)
void connect (FXfloat &value)
void connect (FXdouble &value)
void connect (FXString &value)
virtual ~FXDataTarget ()

Detailed Description

A Data Target allows a valuator widget such as a Slider or Text Field 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 Radio Buttons, Menu Commands, and so on to a variable. In this case, the new value of the connected variable is computed by subtracting ID_OPTION from the message ID.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
ID_VALUE  Will cause the FXDataTarget to ask sender for value.
ID_OPTION  ID_OPTION+i will set the value to i where -10000<=i<=10000.


Constructor & Destructor Documentation

FX::FXDataTarget::FXDataTarget FXObject tgt = NULL,
FXSelector  sel = 0
[inline]
 

Associate with nothing.

FX::FXDataTarget::FXDataTarget FXchar &  value,
FXObject tgt = NULL,
FXSelector  sel = 0
[inline]
 

Associate with character variable.

FX::FXDataTarget::FXDataTarget FXuchar &  value,
FXObject tgt = NULL,
FXSelector  sel = 0
[inline]
 

Associate with unsigned character variable.

FX::FXDataTarget::FXDataTarget FXshort &  value,
FXObject tgt = NULL,
FXSelector  sel = 0
[inline]
 

Associate with signed short variable.

FX::FXDataTarget::FXDataTarget FXushort &  value,
FXObject tgt = NULL,
FXSelector  sel = 0
[inline]
 

Associate with unsigned short variable.

FX::FXDataTarget::FXDataTarget FXint &  value,
FXObject tgt = NULL,
FXSelector  sel = 0
[inline]
 

Associate with int variable.

FX::FXDataTarget::FXDataTarget FXuint &  value,
FXObject tgt = NULL,
FXSelector  sel = 0
[inline]
 

Associate with unsigned int variable.

FX::FXDataTarget::FXDataTarget FXlong &  value,
FXObject tgt = NULL,
FXSelector  sel = 0
[inline]
 

Associate with long variable.

FX::FXDataTarget::FXDataTarget FXulong &  value,
FXObject tgt = NULL,
FXSelector  sel = 0
[inline]
 

Associate with unsigned long variable.

FX::FXDataTarget::FXDataTarget FXfloat &  value,
FXObject tgt = NULL,
FXSelector  sel = 0
[inline]
 

Associate with float variable.

FX::FXDataTarget::FXDataTarget FXdouble &  value,
FXObject tgt = NULL,
FXSelector  sel = 0
[inline]
 

Associate with double variable.

FX::FXDataTarget::FXDataTarget FXString value,
FXObject tgt = NULL,
FXSelector  sel = 0
[inline]
 

Associate with string variable.

virtual FX::FXDataTarget::~FXDataTarget  )  [virtual]
 

Destroy.


Member Function Documentation

void FX::FXDataTarget::setTarget FXObject t  )  [inline]
 

Set the message target object for this data target.

FXObject* FX::FXDataTarget::getTarget  )  const [inline]
 

Get the message target object for this data target, if any.

void FX::FXDataTarget::setSelector FXSelector  sel  )  [inline]
 

Set the message identifier for this data target.

FXSelector FX::FXDataTarget::getSelector  )  const [inline]
 

Get the message identifier for this data target.

FXuint FX::FXDataTarget::getType  )  const [inline]
 

Return type of data its connected to.

void* FX::FXDataTarget::getData  )  const [inline]
 

Return pointer to data its connected to.

void FX::FXDataTarget::connect  )  [inline]
 

Associate with nothing.

void FX::FXDataTarget::connect FXchar &  value  )  [inline]
 

Associate with character variable.

void FX::FXDataTarget::connect FXuchar &  value  )  [inline]
 

Associate with unsigned character variable.

void FX::FXDataTarget::connect FXshort &  value  )  [inline]
 

Associate with signed short variable.

void FX::FXDataTarget::connect FXushort &  value  )  [inline]
 

Associate with unsigned short variable.

void FX::FXDataTarget::connect FXint &  value  )  [inline]
 

Associate with int variable.

void FX::FXDataTarget::connect FXuint &  value  )  [inline]
 

Associate with unsigned int variable.

void FX::FXDataTarget::connect FXlong &  value  )  [inline]
 

Associate with long variable.

void FX::FXDataTarget::connect FXulong &  value  )  [inline]
 

Associate with unsigned long variable.

void FX::FXDataTarget::connect FXfloat &  value  )  [inline]
 

Associate with float variable.

void FX::FXDataTarget::connect FXdouble &  value  )  [inline]
 

Associate with double variable.

void FX::FXDataTarget::connect FXString value  )  [inline]
 

Associate with string variable.

Copyright © 1997-2005 Jeroen van der Zijp