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

Zinc.cpp File Reference

#include "Zinc.hpp"
#include "ZincInternal.hpp"
#include <iostream>
#include <sstream>
#include <tk.h>

Defines

#define EVENT_COUNT   5
#define WIDGETCB_COUNT   3
#define ITEMCB_COUNT   4
#define z_tcl_call2(fct, msg)

Functions

int tclCallback (ClientData client_data, Tcl_Interp *interp, int argc, Tcl_Obj *CONST args[]) __attribute__((cdecl))
 Z_DEFINE_ZOPT (render)
 the "-render" option

 Z_DEFINE_ZOPT (firstend)
 the "-firstend" option

 Z_DEFINE_ZOPT (lastend)
 the "-lastend" option

 Z_DEFINE_ZOPT (position)
 the "-position" option

 Z_DEFINE_ZOPT (tags)
 the "-tags" option

 Z_DEFINE_ZOPT (backcolor)
 the "-backcolor" option

 Z_DEFINE_ZOPT (forecolor)
 the "-forecolor" option

 Z_DEFINE_ZOPT (height)
 the "-height" option

 Z_DEFINE_ZOPT (borderwidth)
 the "-borderwidth" option

 Z_DEFINE_ZOPT (closed)
 the "-closed" option

 Z_DEFINE_ZOPT (composealpha)
 the "-composealpha" option

 Z_DEFINE_ZOPT (composerotation)
 the "-composerotation" option

 Z_DEFINE_ZOPT (composescale)
 the "-composescale" option

 Z_DEFINE_ZOPT (extent)
 the "-extent" option

 Z_DEFINE_ZOPT (fillcolor)
 the "-fillcolor" option

 Z_DEFINE_ZOPT (filled)
 the "-filled" option

 Z_DEFINE_ZOPT (fillpattern)
 the "-fillpattern" option

 Z_DEFINE_ZOPT (linecolor)
 the "-linecolor" option

 Z_DEFINE_ZOPT (linepattern)
 the "-linepattern" option

 Z_DEFINE_ZOPT (linestyle)
 the "-linestyle" option

 Z_DEFINE_ZOPT (linewidth)
 the "-linewidth" option

 Z_DEFINE_ZOPT (pieslice)
 the "-pieslice" option

 Z_DEFINE_ZOPT (priority)
 the "-priority" option

 Z_DEFINE_ZOPT (sensitive)
 the "-sensitive" option

 Z_DEFINE_ZOPT (startangle)
 the "-startangle" option

 Z_DEFINE_ZOPT (tile)
 the "-tile" option

 Z_DEFINE_ZOPT (visible)
 the "-visible" option

 Z_DEFINE_ZOPT (capstyle)
 the "-capstyle" option

 Z_DEFINE_ZOPT (fillrule)
 the "-fillrule" option

 Z_DEFINE_ZOPT (joinstyle)
 the "-joinstyle" option

 Z_DEFINE_ZOPT (marker)
 the "-marker" option

 Z_DEFINE_ZOPT (relief)
 the "-relief" option

 Z_DEFINE_ZOPT (smoothrelief)
 the "-smoothrelief" option

 Z_DEFINE_ZOPT (alpha)
 the "-alpha" option

 Z_DEFINE_ZOPT (atomic)
 the "-atomic" option

 Z_DEFINE_ZOPT (clip)
 the "-clip" option

 Z_DEFINE_ZOPT (anchor)
 the "-anchor" option

 Z_DEFINE_ZOPT (color)
 the "-color" option

 Z_DEFINE_ZOPT (connecteditem)
 the "-connecteditem" option

 Z_DEFINE_ZOPT (connectionanchor)
 the "-connectionanchor" option

 Z_DEFINE_ZOPT (image)
 the "-image" option

 Z_DEFINE_ZOPT (mask)
 the "-mask" option

 Z_DEFINE_ZOPT (alignment)
 the "-alignment" option

 Z_DEFINE_ZOPT (font)
 the "-font" option

 Z_DEFINE_ZOPT (overstriked)
 the "-overstriked" option

 Z_DEFINE_ZOPT (spacing)
 the "-spacing" option

 Z_DEFINE_ZOPT (text)
 the "-text" option

 Z_DEFINE_ZOPT (underlined)
 the "-underlined" option

 Z_DEFINE_ZOPT (width)
 the "-width" option

 Z_DEFINE_ZFCT (device)
 function constants

 Z_DEFINE_ZFCT (add)
 the "add" function

 Z_DEFINE_ZFCT (bind)
 the "bind" function

 Z_DEFINE_ZFCT (bbox)
 the "bbox" function

 Z_DEFINE_ZFCT (cget)
 the "cget" function

 Z_DEFINE_ZFCT (chggroup)
 the "chggroup" function

 Z_DEFINE_ZFCT (clone)
 the "clone" function

 Z_DEFINE_ZFCT (configure)
 the "configure" function

 Z_DEFINE_ZFCT (contour)
 the "contour" function

 Z_DEFINE_ZFCT (coords)
 the "coords" function

 Z_DEFINE_ZFCT (dtag)
 the "dtag" function

 Z_DEFINE_ZFCT (focus)
 the "focus" function

 Z_DEFINE_ZFCT (gettags)
 the "gettags" function

 Z_DEFINE_ZFCT (gname)
 the "gname" function

 Z_DEFINE_ZFCT (group)
 the "group" function

 Z_DEFINE_ZFCT (itemconfigure)
 the "itemconfigure" function

 Z_DEFINE_ZFCT (itemcget)
 the "itemcget" function

 Z_DEFINE_ZFCT (lower)
 the "lower" function

 Z_DEFINE_ZFCT (raise)
 the "raise" function

 Z_DEFINE_ZFCT (remove)
 the "remove" function

 Z_DEFINE_ZFCT (rotate)
 the "rotate" function

 Z_DEFINE_ZFCT (scale)
 the "scale" function

 Z_DEFINE_ZFCT (skew)
 the "skew" function

 Z_DEFINE_ZFCT (tget)
 the "tget" function

 Z_DEFINE_ZFCT (translate)
 the "translate" function

 Z_DEFINE_ZFCT (transform)
 the "transform" function

 Z_DEFINE_ZFCT (treset)
 the "treset" function

 Z_DEFINE_ZFCT (tset)
 the "tset" function

 Z_DEFINE_ZFCT (type)
 the "type" function

 Z_DEFINE_ZITM (add)
 the "add" constant

 Z_DEFINE_ZITM (arc)
 the "arc" constant

 Z_DEFINE_ZITM (curve)
 the "curve" constant

 Z_DEFINE_ZITM (icon)
 the "icon" constant

 Z_DEFINE_ZITM (group)
 the "group" constant

 Z_DEFINE_ZITM (rectangle)
 the "rectangle" constant

 Z_DEFINE_ZITM (text)
 the "text" constant

 Z_DEFINE_ZITM (withtag)
 the "withtag" constant


Variables

Tcl_Obj * DEFAULT_GROUP_OBJ = Tcl_NewIntObj (DEFAULT_GROUP)
const char * lineStylesStrings []
Tcl_Obj * lineStyles []
const char * capStylesStrings []
Tcl_Obj * capStyles []
const char * fillRulesStrings []
Tcl_Obj * fillRules []
const char * joinStylesStrings []
Tcl_Obj * joinStyles []
const char * reliefsStrings []
Tcl_Obj * reliefs []
const char * alignmentsStrings []
Tcl_Obj * alignments []
const char * anchorsStrings []
Tcl_Obj * anchors []
const char * itemTypeStrings []


Define Documentation

#define EVENT_COUNT   5
 

How To call Zinc or Tcl functions:

All arguments of the function are Tcl_Obj. To accelerate their call, there is a pool of preconstructed Tcl_Obj and some often used constant Tcl_Obj. p1 and p2 are tables of pointers to be used for arguments. Fill p1 using either predefined objects like ZITM_* or a pool objet that you can fill with the value you want. Ex : p1[1] = ZFCT_add; Macros have been defined to fill and use a pool object Ex : p1[2] = Z_INT_POOL(1, 200); Do not use twice the same pool index for the same function call. p2 is used to construct and argument which is a list of Tcl_Obj. To call the function use z_tcl_call which automaticly handle error return codes or z_command to call a Zinc command which handle all arguments too.

#define ITEMCB_COUNT   4
 

#define WIDGETCB_COUNT   3
 

#define z_tcl_call2 fct,
msg   ) 
 

Value:

{                          \
    int result = (fct);      \
    if (result != TCL_OK)    \
    {                        \
      Tcl_AppendResult (Zinc::interp, msg, NULL); \
      return TCL_ERROR;      \
    }                        \
  }


Function Documentation

int tclCallback ClientData  client_data,
Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  args[]
 

Real callback used by zinc TCL

Parameters:
client_data the Zinc object
interp current interpreter
argc number of arguments
args table of arguments

Z_DEFINE_ZFCT type   ) 
 

the "type" function

Z_DEFINE_ZFCT tset   ) 
 

the "tset" function

Z_DEFINE_ZFCT treset   ) 
 

the "treset" function

Z_DEFINE_ZFCT transform   ) 
 

the "transform" function

Z_DEFINE_ZFCT translate   ) 
 

the "translate" function

Z_DEFINE_ZFCT tget   ) 
 

the "tget" function

Z_DEFINE_ZFCT skew   ) 
 

the "skew" function

Z_DEFINE_ZFCT scale   ) 
 

the "scale" function

Z_DEFINE_ZFCT rotate   ) 
 

the "rotate" function

Z_DEFINE_ZFCT remove   ) 
 

the "remove" function

Z_DEFINE_ZFCT raise   ) 
 

the "raise" function

Z_DEFINE_ZFCT lower   ) 
 

the "lower" function

Z_DEFINE_ZFCT itemcget   ) 
 

the "itemcget" function

Z_DEFINE_ZFCT itemconfigure   ) 
 

the "itemconfigure" function

Z_DEFINE_ZFCT group   ) 
 

the "group" function

Z_DEFINE_ZFCT gname   ) 
 

the "gname" function

Z_DEFINE_ZFCT gettags   ) 
 

the "gettags" function

Z_DEFINE_ZFCT focus   ) 
 

the "focus" function

Z_DEFINE_ZFCT dtag   ) 
 

the "dtag" function

Z_DEFINE_ZFCT coords   ) 
 

the "coords" function

Z_DEFINE_ZFCT contour   ) 
 

the "contour" function

Z_DEFINE_ZFCT configure   ) 
 

the "configure" function

Z_DEFINE_ZFCT clone   ) 
 

the "clone" function

Z_DEFINE_ZFCT chggroup   ) 
 

the "chggroup" function

Z_DEFINE_ZFCT cget   ) 
 

the "cget" function

Z_DEFINE_ZFCT bbox   ) 
 

the "bbox" function

Z_DEFINE_ZFCT bind   ) 
 

the "bind" function

Z_DEFINE_ZFCT add   ) 
 

the "add" function

Z_DEFINE_ZFCT device   ) 
 

function constants

Z_DEFINE_ZITM withtag   ) 
 

the "withtag" constant

Z_DEFINE_ZITM text   ) 
 

the "text" constant

Z_DEFINE_ZITM rectangle   ) 
 

the "rectangle" constant

Z_DEFINE_ZITM group   ) 
 

the "group" constant

Z_DEFINE_ZITM icon   ) 
 

the "icon" constant

Z_DEFINE_ZITM curve   ) 
 

the "curve" constant

Z_DEFINE_ZITM arc   ) 
 

the "arc" constant

Z_DEFINE_ZITM add   ) 
 

the "add" constant

Z_DEFINE_ZOPT width   ) 
 

the "-width" option

Z_DEFINE_ZOPT underlined   ) 
 

the "-underlined" option

Z_DEFINE_ZOPT text   ) 
 

the "-text" option

Z_DEFINE_ZOPT spacing   ) 
 

the "-spacing" option

Z_DEFINE_ZOPT overstriked   ) 
 

the "-overstriked" option

Z_DEFINE_ZOPT font   ) 
 

the "-font" option

Z_DEFINE_ZOPT alignment   ) 
 

the "-alignment" option

Z_DEFINE_ZOPT mask   ) 
 

the "-mask" option

Z_DEFINE_ZOPT image   ) 
 

the "-image" option

Z_DEFINE_ZOPT connectionanchor   ) 
 

the "-connectionanchor" option

Z_DEFINE_ZOPT connecteditem   ) 
 

the "-connecteditem" option

Z_DEFINE_ZOPT color   ) 
 

the "-color" option

Z_DEFINE_ZOPT anchor   ) 
 

the "-anchor" option

Z_DEFINE_ZOPT clip   ) 
 

the "-clip" option

Z_DEFINE_ZOPT atomic   ) 
 

the "-atomic" option

Z_DEFINE_ZOPT alpha   ) 
 

the "-alpha" option

Z_DEFINE_ZOPT smoothrelief   ) 
 

the "-smoothrelief" option

Z_DEFINE_ZOPT relief   ) 
 

the "-relief" option

Z_DEFINE_ZOPT marker   ) 
 

the "-marker" option

Z_DEFINE_ZOPT joinstyle   ) 
 

the "-joinstyle" option

Z_DEFINE_ZOPT fillrule   ) 
 

the "-fillrule" option

Z_DEFINE_ZOPT capstyle   ) 
 

the "-capstyle" option

Z_DEFINE_ZOPT visible   ) 
 

the "-visible" option

Z_DEFINE_ZOPT tile   ) 
 

the "-tile" option

Z_DEFINE_ZOPT startangle   ) 
 

the "-startangle" option

Z_DEFINE_ZOPT sensitive   ) 
 

the "-sensitive" option

Z_DEFINE_ZOPT priority   ) 
 

the "-priority" option

Z_DEFINE_ZOPT pieslice   ) 
 

the "-pieslice" option

Z_DEFINE_ZOPT linewidth   ) 
 

the "-linewidth" option

Z_DEFINE_ZOPT linestyle   ) 
 

the "-linestyle" option

Z_DEFINE_ZOPT linepattern   ) 
 

the "-linepattern" option

Z_DEFINE_ZOPT linecolor   ) 
 

the "-linecolor" option

Z_DEFINE_ZOPT fillpattern   ) 
 

the "-fillpattern" option

Z_DEFINE_ZOPT filled   ) 
 

the "-filled" option

Z_DEFINE_ZOPT fillcolor   ) 
 

the "-fillcolor" option

Z_DEFINE_ZOPT extent   ) 
 

the "-extent" option

Z_DEFINE_ZOPT composescale   ) 
 

the "-composescale" option

Z_DEFINE_ZOPT composerotation   ) 
 

the "-composerotation" option

Z_DEFINE_ZOPT composealpha   ) 
 

the "-composealpha" option

Z_DEFINE_ZOPT closed   ) 
 

the "-closed" option

Z_DEFINE_ZOPT borderwidth   ) 
 

the "-borderwidth" option

Z_DEFINE_ZOPT height   ) 
 

the "-height" option

Z_DEFINE_ZOPT forecolor   ) 
 

the "-forecolor" option

Z_DEFINE_ZOPT backcolor   ) 
 

the "-backcolor" option

Z_DEFINE_ZOPT tags   ) 
 

the "-tags" option

Z_DEFINE_ZOPT position   ) 
 

the "-position" option

Z_DEFINE_ZOPT lastend   ) 
 

the "-lastend" option

Z_DEFINE_ZOPT firstend   ) 
 

the "-firstend" option

Z_DEFINE_ZOPT render   ) 
 

the "-render" option


Variable Documentation

Tcl_Obj* alignments[]
 

Initial value:

{
  Tcl_NewStringObj ("left", -1),
  Tcl_NewStringObj ("right", -1),
  Tcl_NewStringObj ("center", -1),
}

const char* alignmentsStrings[]
 

Initial value:

{ "left", "right", "center" }

Tcl_Obj* anchors[]
 

Initial value:

{
  Tcl_NewStringObj ("nw", -1),
  Tcl_NewStringObj ("n", -1),
  Tcl_NewStringObj ("ne", -1),
  Tcl_NewStringObj ("e", -1),
  Tcl_NewStringObj ("se", -1),
  Tcl_NewStringObj ("s", -1),
  Tcl_NewStringObj ("sw", -1),
  Tcl_NewStringObj ("w", -1),
  Tcl_NewStringObj ("center", -1),
}

const char* anchorsStrings[]
 

Initial value:

{ "nw", "n", "ne", "e", "se", "s", "sw", "w", "center" }

Tcl_Obj* capStyles[]
 

Initial value:

{
  Tcl_NewStringObj ("butt", -1),
  Tcl_NewStringObj ("projecting", -1),
  Tcl_NewStringObj ("round", -1),
}

const char* capStylesStrings[]
 

Initial value:

{ "butt", "projecting", "round" }

Tcl_Obj* DEFAULT_GROUP_OBJ = Tcl_NewIntObj (DEFAULT_GROUP) [static]
 

Tcl_Obj* fillRules[]
 

Initial value:

{
  Tcl_NewStringObj ("odd", -1),
  Tcl_NewStringObj ("nonzero", -1),
  Tcl_NewStringObj ("positive", -1),
  Tcl_NewStringObj ("negative", -1),
  Tcl_NewStringObj ("abs_geq_2", -1),
}

const char* fillRulesStrings[]
 

Initial value:

{ "odd", "nonzero", "positive", "negative", "abs_geq_2" }

const char* itemTypeStrings[]
 

Initial value:

{
  "group",
  "arc",
  "text",
  "rectangle",
  "curve",
  "icon",
  NULL
}

Tcl_Obj* joinStyles[]
 

Initial value:

{
  Tcl_NewStringObj ("bevel", -1),
  Tcl_NewStringObj ("miter", -1),
  Tcl_NewStringObj ("round", -1),
}

const char* joinStylesStrings[]
 

Initial value:

{ "bevel", "miter", "round" }

Tcl_Obj* lineStyles[]
 

Initial value:

{
  Tcl_NewStringObj ("simple", -1),
  Tcl_NewStringObj ("dashed", -1),
  Tcl_NewStringObj ("mixed", -1),
  Tcl_NewStringObj ("dotted", -1),
}

const char* lineStylesStrings[]
 

Initial value:

{ "simple", "dashed", "mixed", "dotted" }

Tcl_Obj* reliefs[]
 

Initial value:

{
  Tcl_NewStringObj ("flat", -1),
  Tcl_NewStringObj ("raised", -1),
  Tcl_NewStringObj ("sunken", -1),
  Tcl_NewStringObj ("ridge", -1),
  Tcl_NewStringObj ("groove", -1),
  Tcl_NewStringObj ("roundraised", -1),
  Tcl_NewStringObj ("roundsunken", -1),
  Tcl_NewStringObj ("roundridge", -1),
  Tcl_NewStringObj ("roundgroove", -1),
  Tcl_NewStringObj ("raisedrule", -1),
  Tcl_NewStringObj ("sunkenrule", -1),
}

const char* reliefsStrings[]
 

Initial value:

{ "flat", "raised", "sunken", "ridge", "groove", "roundraised",
  "roundsunken", "roundridge", "roundgroove", "raisedrule", "sunkenrule" }


Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by doxygen 1.3.3