In file graphics2D/TclScale.h:

namespace yav class TclScale : public TclSon, public TclObject, public ScaleCamera

C++ representation of a TCL scale

Inheritance:


Public Methods

void setLabel (const TclString& lab)
set scale label
void configureToMax (void)
set bounds of the scale to min/max of all managed scalables
void setBounds (double min, double max)
set scale bounds
virtual void command (double val)
TCL slider moved: call update command if needed
virtual void set (double val)
set a new value to scale
virtual void to (double val)
set a new value to scale but do not call scale command
virtual double get (void) const
returns scale value
virtual void checkValue (void)
checks if the current value is between the min and max value; if not then set the value to (min+max)/2
virtual void on (void)
activates scale, overloads Activate::on
virtual void dying (const Scalable *elt)
callback function for a DPList element being removed
virtual void operator+= (Scalable *inrv) throw(DPList<Scalable>::NullPointer, DPList<Scalable>::AlreadyInList)
adds a new viewer to scale object
virtual void operator-= (Scalable *inrv) throw(DPList<Scalable>::NotFound)
removes a viewer from a scale object
virtual unsigned int getRef (void) const
fix ambigous AutoLink::getRef method call
static TclScale* getHead (void)
fix ambigous AutoLink::getHead method call
virtual TclScale* following (void) const
fix ambigous AutoLink::following method call
virtual const std::type_info& getType (void) const
returns scale type
int destroyCmd (int argc, char **argv)
-destroy TCL option
int widgetCmd (int argc, char **argv)
- TCL option
int getCmd (int argc, char **argv)
-name TCL option
int setCmd (int argc, char **argv)
-get TCL option
int commandCmd (int argc, char **argv)
-set TCL option
int activateCmd (int argc, char **argv)
-activate TCL option
int fromCmd (int argc, char **argv)
-from TCL option
int toCmd (int argc, char **argv)
-to TCL option
int maxStepsCmd (int argc, char **argv)
-maxSteps TCL option
int resolutionCmd (int argc, char **argv)
-resolution TCL option
static int scalablesCmd (TclModule *m, int argc, char **argv)
TCL scalables command
int objectsCmd (int argc, char **argv)
TCL -objects option
int addCmd (int argc, char **argv)
TCL -add option
int removeCmd (int argc, char **argv)
TCL -remove option
int dieCmd (int argc, char **argv)
TCL -die option

Public

constructor
TclScale (const std::type_info& type, const TclString& scaleName, TclModule *module, TclString menu="graphics2D::scalePopupMenu")
builds a scale object from an existing TCL scale
TclScale (const std::type_info &type, const TclString& scaleName, TclModule *module, std::list<Scalable *>& list, TclString menu="graphics2D::scalePopupMenu")
builds a scale object from an existing TCL scale manage given list of scalables
TclScale (const std::type_info &type, const TclString& scaleName, TclModule *module, Scalable *elt, TclString menu="graphics2D::scalePopupMenu")
builds a scale object from an existing TCL scale manage a given scalable
destructor
virtual ~TclScale ()
destroys associated TCL scale

Protected Fields

double max
max scale value
double min
min scale value
double value
scale value
unsigned int maxSteps
maximum number of steps when activated
bool firstupdate
has the scale already been updated ?

Protected Methods

virtual void activation (void)
Activation callback: activates scale up and down
virtual void update (double val) const
callback function for scales when slider moved

Private Fields

bool dieWhenEmpty
indicates whether this scale should kill itself when its DPList becomes empty
short int activationDir
activation direction

Private Methods

void init (const std::type_info& type, TclString menu)
init tcl commands

Inherited from ScaleCamera:

Public Methods

virtual void reset(Scalable *cam, const TclString& lab)
const DPList <Scalable> & getObjects(void) const

Documentation

C++ representation of a TCL scale
double max
max scale value

double min
min scale value

double value
scale value

unsigned int maxSteps
maximum number of steps when activated

constructor

TclScale(const std::type_info& type, const TclString& scaleName, TclModule *module, TclString menu="graphics2D::scalePopupMenu")
builds a scale object from an existing TCL scale
Parameters:
type - dynamic type
scaleName - TCL scale name (TCL scale must exist)
module - module this Scale is created in
menu - the pop-up menu associated with the scale

TclScale(const std::type_info &type, const TclString& scaleName, TclModule *module, std::list<Scalable *>& list, TclString menu="graphics2D::scalePopupMenu")
builds a scale object from an existing TCL scale manage given list of scalables
Parameters:
type - dynamic object type
module - module this SliceScale is created in
scaleName - TCL scale name
list - scenes this scale commands
menu - the pop-up menu associated with the scale

TclScale(const std::type_info &type, const TclString& scaleName, TclModule *module, Scalable *elt, TclString menu="graphics2D::scalePopupMenu")
builds a scale object from an existing TCL scale manage a given scalable
Parameters:
type - dynamic object type
module - module this SliceScale is created in
scaleName - TCL scale name
elt - scalable this scale commands
menu - the pop-up menu associated with the scale

destructor

virtual ~TclScale()
destroys associated TCL scale

void setLabel(const TclString& lab)
set scale label
Parameters:
lab - new scale label

void configureToMax(void)
set bounds of the scale to min/max of all managed scalables

void setBounds(double min, double max)
set scale bounds
Parameters:
min - scale min value
max - scale min value

virtual void command(double val)
TCL slider moved: call update command if needed
Parameters:
val - TCL slider value

virtual void set(double val)
set a new value to scale
Parameters:
val - new scale value

virtual void to(double val)
set a new value to scale but do not call scale command
Parameters:
val - new scale value

virtual double get(void) const
returns scale value

virtual void checkValue(void)
checks if the current value is between the min and max value; if not then set the value to (min+max)/2

virtual void on(void)
activates scale, overloads Activate::on

virtual void dying(const Scalable *elt)
callback function for a DPList element being removed
Parameters:
elt - element being removed

virtual void operator+=(Scalable *inrv) throw(DPList<Scalable>::NullPointer, DPList<Scalable>::AlreadyInList)
adds a new viewer to scale object
Parameters:
inrv - viewer to command

virtual void operator-=(Scalable *inrv) throw(DPList<Scalable>::NotFound)
removes a viewer from a scale object
Parameters:
inrv - viewer to release

virtual unsigned int getRef(void) const
fix ambigous AutoLink::getRef method call

static TclScale* getHead(void)
fix ambigous AutoLink::getHead method call

virtual TclScale* following(void) const
fix ambigous AutoLink::following method call

virtual const std::type_info& getType(void) const
returns scale type

int destroyCmd(int argc, char **argv)
-destroy TCL option

int widgetCmd(int argc, char **argv)
- TCL option

int getCmd(int argc, char **argv)
-name TCL option

int setCmd(int argc, char **argv)
-get TCL option

int commandCmd(int argc, char **argv)
-set TCL option

int activateCmd(int argc, char **argv)
-activate TCL option

int fromCmd(int argc, char **argv)
-from TCL option

int toCmd(int argc, char **argv)
-to TCL option

int maxStepsCmd(int argc, char **argv)
-maxSteps TCL option

int resolutionCmd(int argc, char **argv)
-resolution TCL option

static int scalablesCmd(TclModule *m, int argc, char **argv)
TCL scalables command

int objectsCmd(int argc, char **argv)
TCL -objects option

int addCmd(int argc, char **argv)
TCL -add option

int removeCmd(int argc, char **argv)
TCL -remove option

int dieCmd(int argc, char **argv)
TCL -die option

bool dieWhenEmpty
indicates whether this scale should kill itself when its DPList becomes empty

void init(const std::type_info& type, TclString menu)
init tcl commands

bool firstupdate
has the scale already been updated ?

virtual void activation(void)
Activation callback: activates scale up and down

virtual void update(double val) const
callback function for scales when slider moved

short int activationDir
activation direction


Direct child classes:
SliceScale

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de