In file graphics2D/TclCamera2D.h:

namespace yav class TclCamera2D : public TclSon, public TclSceneObject

2D Camera interface using a TCL canvas widget

Inheritance:


Public Classes

enum CAMERA_STYLE
the different possibilities for laying out the camera widget

Public Methods

void init (const TclString& p, bool menu, TclCamera2D::CAMERA_STYLE style, const TclString &menuWidget=EMPTY_STRING)
constructors common code
Camera2D* getClient (void) const
returns camera2D client
TclScene2D* getScene (void) const
returns camera scene
virtual void startComputation ()
modifies the computation button and activates the corresponding scene
virtual void stopComputation ()
modifies the computation button and desactivates the corresponding scene
virtual void resize (void)
resizes camera widget to actual size
const TclString& getWindow (void)
returns camera TCL window name
int canvasCall (int argc, char **argv)
calls associated canvas callback procedure
TclString getCanvas (void) const
returns associated canvas name
const TclString& getColor (void) const
returns background color
const TclString& getColor2 (void) const
returns secondary background color
virtual void bindMouseMotion (bool on)
bind mouse motion if on == true
virtual void applyObjectSelection (Data2D *obj)
selects a new object
virtual void applyObjectUnselection (Data2D *obj)
unselects an object
virtual void drawBoundingBox (Data2D *obj) const
draw object bounding box
virtual void grab (const TclString& filename)
dump camera window content in an xwd file
int destroyCmd (int argc, char **)
-destroy TCL command option
int resizeCmd (int argc, char **)
-resize TCL command option
int redrawCmd (int argc, char **)
-redraw TCL command option
int focusCmd (int argc, char **)
-focus TCL command option
int bgcolorCmd (int argc, char **)
-bgcolor TCL command option
int selectCmd (int argc, char **)
-select TCL command option
int showBoundingBoxCmd (int argc, char **)
-showBoundingBox TCL command option
int boundingBoxWidthCmd (int argc, char **)
-boundingBoxWidth TCL command option
int boundingBoxColorCmd (int argc, char **)
-boundingBoxColor TCL command option
int canvasCmd (int argc, char **)
-canvas TCL command option
int menuCmd (int argc, char **)
-canvas TCL command option
int sceneCmd (int argc, char **)
-scene TCL command option
int widthCmd (int argc, char **)
-width TCL command option
int heightCmd (int argc, char **)
-height TCL command option
int scaleCmd (int argc, char **)
-scale TCL command option
int translateCmd (int argc, char **)
-translate TCL command option
int buttonRelease1Cmd (int argc, char **)
-buttonRelease1 TCL command option
int buttonRelease2Cmd (int argc, char **)
-buttonRelease2 TCL command option
int buttonRelease3Cmd (int argc, char **)
-buttonRelease3 TCL command option
int buttonPress1Cmd (int argc, char **)
-buttonPress1 TCL command option
int buttonPress2Cmd (int argc, char **)
-buttonPress2 TCL command option
int buttonPress3Cmd (int argc, char **)
-buttonPress3 TCL command option
int ctrlButtonRelease1Cmd (int argc, char **)
-ctrlButtonRelease1 TCL command option
int ctrlButtonRelease2Cmd (int argc, char **)
-ctrlButtonRelease2 TCL command option
int ctrlButtonRelease3Cmd (int argc, char **)
-ctrlButtonRelease3 TCL command option
int ctrlButtonPress1Cmd (int argc, char **)
-ctrlButtonPress1 TCL command option
int ctrlButtonPress2Cmd (int argc, char **)
-ctrlButtonPress2 TCL command option
int ctrlButtonPress3Cmd (int argc, char **)
-ctrlButtonPress3 TCL command option
int shiftButtonRelease1Cmd (int argc, char **)
-shiftButtonRelease1 TCL command option
int shiftButtonRelease2Cmd (int argc, char **)
-shiftButtonRelease2 TCL command option
int shiftButtonRelease3Cmd (int argc, char **)
-shiftButtonRelease3 TCL command option
int shiftButtonPress1Cmd (int argc, char **)
-shiftButtonPress1 TCL command option
int shiftButtonPress2Cmd (int argc, char **)
-shiftButtonPress2 TCL command option
int shiftButtonPress3Cmd (int argc, char **)
-shiftButtonPress3 TCL command option
int mouseMotionCmd (int argc, char **)
-mouseMotion TCL command option
int setMoveCmd (int argc, char **)
-setMove TCL command option
int keyUpCmd (int argc, char **)
-keyUp TCL command option
int keyDownCmd (int argc, char **)
-keyDown TCL command option
int keyRightCmd (int argc, char **)
-keyRight TCL command option
int keyLeftCmd (int argc, char **)
-keyLeft TCL command option
int recordCmd (int argc, char **argv)
-record TCL command option
static int CanvasCmd (TclObject *cd, Tcl_Interp *interp, int argc, char **argv)
executes TCL canvas command
static int create (TclModule *m, int argc, char **argv)
creates a new camera
static int list (TclModule *m, int argc, char **argv)
build a list of all available cameras

Public

Exception class
class UnableToCreate : public Exception
unable to create camera widget
Constructor
TclCamera2D (TclModule* m, TclScene2D *scn, const TclString& p = EMPTY_STRING, bool menu = true, CAMERA_STYLE style = CAMERA, unsigned int w = DEFAULT_CAMERA2D_WIDTH, unsigned int h = DEFAULT_CAMERA2D_HEIGHT, double scale = DEFAULT_CAMERA_SCALE, const char *color = "#E8E0D2", const char *subcolor = "#D8D0C2", const std::type_info& info = typeid(TclCamera2D), Camera2D *cam = 0, const TclString &menuWidget=EMPTY_STRING) throw(UnableToCreate)
builds and display a new camera
TclCamera2D (const TclCamera2D& cam)
forbids copy construction
Desstructor
virtual ~TclCamera2D ()
Destroy TclCamera2D object and associated TCL canvas

Protected Fields

TclString window
name of widget window
TclString menuName
name of the menu widget
ClientData canvas
associated canvas TCL ClientData
Tcl_CmdProc* canvasProc
associated canvas TCL command
TclString color
camera window color
TclString subcolor
camera window secondary color

Protected Methods

void setWindow (const TclString& name)
set camera TCL window name

Documentation

2D Camera interface using a TCL canvas widget
enum CAMERA_STYLE
the different possibilities for laying out the camera widget

Exception class

class UnableToCreate: public Exception
unable to create camera widget

Constructor

TclCamera2D(TclModule* m, TclScene2D *scn, const TclString& p = EMPTY_STRING, bool menu = true, CAMERA_STYLE style = CAMERA, unsigned int w = DEFAULT_CAMERA2D_WIDTH, unsigned int h = DEFAULT_CAMERA2D_HEIGHT, double scale = DEFAULT_CAMERA_SCALE, const char *color = "#E8E0D2", const char *subcolor = "#D8D0C2", const std::type_info& info = typeid(TclCamera2D), Camera2D *cam = 0, const TclString &menuWidget=EMPTY_STRING) throw(UnableToCreate)
builds and display a new camera
Throws:
UnableToCreate TCL widget creation failed
Parameters:
m - module the camera is created in
scn - scene the camera visualize
p - TCL parent window name for camera widget
menu - boolean indicating if the objects should install or uninstall their menus
style - the way the camera widget should appear on the screen
width - camera width in pixels
height - camera height in pixels
scale - camera scale factor

TclCamera2D(const TclCamera2D& cam)
forbids copy construction

Desstructor

virtual ~TclCamera2D()
Destroy TclCamera2D object and associated TCL canvas

TclString window
name of widget window

TclString menuName
name of the menu widget

ClientData canvas
associated canvas TCL ClientData

Tcl_CmdProc* canvasProc
associated canvas TCL command

TclString color
camera window color

TclString subcolor
camera window secondary color

void init(const TclString& p, bool menu, TclCamera2D::CAMERA_STYLE style, const TclString &menuWidget=EMPTY_STRING)
constructors common code
Parameters:
p - TCL parent window name for camera widget
menu - Tcl name of the menu widget

Camera2D* getClient(void) const
returns camera2D client

TclScene2D* getScene(void) const
returns camera scene

virtual void startComputation()
modifies the computation button and activates the corresponding scene

virtual void stopComputation()
modifies the computation button and desactivates the corresponding scene

virtual void resize(void)
resizes camera widget to actual size

const TclString& getWindow(void)
returns camera TCL window name

int canvasCall(int argc, char **argv)
calls associated canvas callback procedure
Parameters:
argc - number of arguments
argv - arguments array

TclString getCanvas(void) const
returns associated canvas name

const TclString& getColor(void) const
returns background color

const TclString& getColor2(void) const
returns secondary background color

virtual void bindMouseMotion(bool on)
bind mouse motion if on == true

virtual void applyObjectSelection(Data2D *obj)
selects a new object
Parameters:
obj - selected object

virtual void applyObjectUnselection(Data2D *obj)
unselects an object
Parameters:
obj - unselected object

virtual void drawBoundingBox(Data2D *obj) const
draw object bounding box
Parameters:
obj - object whose bounding box should be drawn

virtual void grab(const TclString& filename)
dump camera window content in an xwd file
Parameters:
filename - dump file name

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

int resizeCmd(int argc, char **)
-resize TCL command option

int redrawCmd(int argc, char **)
-redraw TCL command option

int focusCmd(int argc, char **)
-focus TCL command option

int bgcolorCmd(int argc, char **)
-bgcolor TCL command option

int selectCmd(int argc, char **)
-select TCL command option

int showBoundingBoxCmd(int argc, char **)
-showBoundingBox TCL command option

int boundingBoxWidthCmd(int argc, char **)
-boundingBoxWidth TCL command option

int boundingBoxColorCmd(int argc, char **)
-boundingBoxColor TCL command option

int canvasCmd(int argc, char **)
-canvas TCL command option

int menuCmd(int argc, char **)
-canvas TCL command option

int sceneCmd(int argc, char **)
-scene TCL command option

int widthCmd(int argc, char **)
-width TCL command option

int heightCmd(int argc, char **)
-height TCL command option

int scaleCmd(int argc, char **)
-scale TCL command option

int translateCmd(int argc, char **)
-translate TCL command option

int buttonRelease1Cmd(int argc, char **)
-buttonRelease1 TCL command option

int buttonRelease2Cmd(int argc, char **)
-buttonRelease2 TCL command option

int buttonRelease3Cmd(int argc, char **)
-buttonRelease3 TCL command option

int buttonPress1Cmd(int argc, char **)
-buttonPress1 TCL command option

int buttonPress2Cmd(int argc, char **)
-buttonPress2 TCL command option

int buttonPress3Cmd(int argc, char **)
-buttonPress3 TCL command option

int ctrlButtonRelease1Cmd(int argc, char **)
-ctrlButtonRelease1 TCL command option

int ctrlButtonRelease2Cmd(int argc, char **)
-ctrlButtonRelease2 TCL command option

int ctrlButtonRelease3Cmd(int argc, char **)
-ctrlButtonRelease3 TCL command option

int ctrlButtonPress1Cmd(int argc, char **)
-ctrlButtonPress1 TCL command option

int ctrlButtonPress2Cmd(int argc, char **)
-ctrlButtonPress2 TCL command option

int ctrlButtonPress3Cmd(int argc, char **)
-ctrlButtonPress3 TCL command option

int shiftButtonRelease1Cmd(int argc, char **)
-shiftButtonRelease1 TCL command option

int shiftButtonRelease2Cmd(int argc, char **)
-shiftButtonRelease2 TCL command option

int shiftButtonRelease3Cmd(int argc, char **)
-shiftButtonRelease3 TCL command option

int shiftButtonPress1Cmd(int argc, char **)
-shiftButtonPress1 TCL command option

int shiftButtonPress2Cmd(int argc, char **)
-shiftButtonPress2 TCL command option

int shiftButtonPress3Cmd(int argc, char **)
-shiftButtonPress3 TCL command option

int mouseMotionCmd(int argc, char **)
-mouseMotion TCL command option

int setMoveCmd(int argc, char **)
-setMove TCL command option

int keyUpCmd(int argc, char **)
-keyUp TCL command option

int keyDownCmd(int argc, char **)
-keyDown TCL command option

int keyRightCmd(int argc, char **)
-keyRight TCL command option

int keyLeftCmd(int argc, char **)
-keyLeft TCL command option

int recordCmd(int argc, char **argv)
-record TCL command option

static int CanvasCmd(TclObject *cd, Tcl_Interp *interp, int argc, char **argv)
executes TCL canvas command
Parameters:
cd - calling object pointer
interp - TCL interpretor for command
argc - number of arguments
argv - arguments

static int create(TclModule *m, int argc, char **argv)
creates a new camera
Parameters:
m - module to create camera in
argc - command line number of arguments
argv - command line arguments

static int list(TclModule *m, int argc, char **argv)
build a list of all available cameras

void setWindow(const TclString& name)
set camera TCL window name
Parameters:
name - TCL window name


Direct child classes:
TclSliceCamera

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