From 960cdf29197bc3f5922110cf26627aa9709ac79b Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Fri, 10 Jun 2005 10:29:11 +0000 Subject: This commit was manufactured by cvs2svn to create branch 'bogue40'. --- zinclib.d/Copyright | 25 - zinclib.d/INSTALL | 47 - zinclib.d/Makefile | 173 - zinclib.d/README | 61 - zinclib.d/doc/HOWTO | 56 - zinclib.d/doc/html/ZincExtern_8hpp-source.html | 45 - zinclib.d/doc/html/ZincExtern_8hpp.html | 136 - zinclib.d/doc/html/ZincInternal_8hpp-source.html | 86 - zinclib.d/doc/html/ZincInternal_8hpp.html | 535 -- zinclib.d/doc/html/ZincObjects_8cpp.html | 21 - zinclib.d/doc/html/ZincObjects_8hpp-source.html | 100 - zinclib.d/doc/html/ZincObjects_8hpp.html | 35 - zinclib.d/doc/html/ZincPath_8cpp.html | 93 - zinclib.d/doc/html/ZincPath_8hpp-source.html | 64 - zinclib.d/doc/html/ZincPath_8hpp.html | 26 - zinclib.d/doc/html/ZincTypes_8hpp-source.html | 163 - zinclib.d/doc/html/ZincTypes_8hpp.html | 561 -- zinclib.d/doc/html/Zinc_8cpp.html | 3595 ---------- zinclib.d/doc/html/Zinc_8hpp-source.html | 434 -- zinclib.d/doc/html/Zinc_8hpp.html | 102 - zinclib.d/doc/html/annotated.html | 23 - zinclib.d/doc/html/classZinc-members.html | 191 - zinclib.d/doc/html/classZinc.html | 7569 -------------------- zinclib.d/doc/html/classZincBitmap-members.html | 22 - zinclib.d/doc/html/classZincBitmap.html | 177 - zinclib.d/doc/html/classZincBitmap.png | Bin 359 -> 0 bytes zinclib.d/doc/html/classZincException-members.html | 18 - zinclib.d/doc/html/classZincException.html | 177 - zinclib.d/doc/html/classZincFont-members.html | 16 - zinclib.d/doc/html/classZincFont.html | 79 - zinclib.d/doc/html/classZincImage-members.html | 21 - zinclib.d/doc/html/classZincImage.html | 140 - zinclib.d/doc/html/classZincImage.png | Bin 358 -> 0 bytes zinclib.d/doc/html/classZincItem-members.html | 18 - zinclib.d/doc/html/classZincItem.html | 159 - zinclib.d/doc/html/classZincItem.png | Bin 510 -> 0 bytes zinclib.d/doc/html/classZincPath-members.html | 23 - zinclib.d/doc/html/classZincPath.html | 501 -- zinclib.d/doc/html/classes.html | 15 - zinclib.d/doc/html/doxygen.css | 160 - zinclib.d/doc/html/doxygen.png | Bin 2352 -> 0 bytes zinclib.d/doc/html/files.html | 24 - zinclib.d/doc/html/functions.html | 278 - zinclib.d/doc/html/functions_func.html | 238 - zinclib.d/doc/html/functions_rela.html | 19 - zinclib.d/doc/html/functions_vars.html | 40 - zinclib.d/doc/html/globals.html | 166 - zinclib.d/doc/html/globals_defs.html | 34 - zinclib.d/doc/html/globals_enum.html | 27 - zinclib.d/doc/html/globals_eval.html | 87 - zinclib.d/doc/html/globals_func.html | 28 - zinclib.d/doc/html/globals_type.html | 22 - zinclib.d/doc/html/globals_vars.html | 40 - zinclib.d/doc/html/hierarchy.html | 25 - zinclib.d/doc/html/index.html | 15 - zinclib.d/doc/html/structZincEvent-members.html | 19 - zinclib.d/doc/html/structZincEvent.html | 142 - zinclib.d/doxyConfig | 1109 --- zinclib.d/gen.pl | 275 - zinclib.d/makefile.vc | 89 - zinclib.d/src/Zinc.cpp | 4540 ------------ zinclib.d/src/Zinc.hpp | 1365 ---- zinclib.d/src/ZincExtern.hpp | 74 - zinclib.d/src/ZincInternal.hpp | 182 - zinclib.d/src/ZincObjects.cpp | 201 - zinclib.d/src/ZincObjects.hpp | 198 - zinclib.d/src/ZincPath.cpp | 415 -- zinclib.d/src/ZincPath.hpp | 162 - zinclib.d/src/ZincTypes.hpp | 188 - zinclib.d/test/Makefile | 36 - zinclib.d/test/itemconf.cpp | 436 -- zinclib.d/test/items.cpp | 213 - zinclib.d/test/paper-grey.gif | Bin 1540 -> 0 bytes zinclib.d/test/paper.gif | Bin 1529 -> 0 bytes zinclib.d/test/runtests.sh | 17 - zinclib.d/test/test.cpp | 187 - zinclib.d/test/test.svg | 40 - zinclib.d/test/widget.cpp | 204 - 78 files changed, 26802 deletions(-) delete mode 100644 zinclib.d/Copyright delete mode 100644 zinclib.d/INSTALL delete mode 100644 zinclib.d/Makefile delete mode 100644 zinclib.d/README delete mode 100644 zinclib.d/doc/HOWTO delete mode 100644 zinclib.d/doc/html/ZincExtern_8hpp-source.html delete mode 100644 zinclib.d/doc/html/ZincExtern_8hpp.html delete mode 100644 zinclib.d/doc/html/ZincInternal_8hpp-source.html delete mode 100644 zinclib.d/doc/html/ZincInternal_8hpp.html delete mode 100644 zinclib.d/doc/html/ZincObjects_8cpp.html delete mode 100644 zinclib.d/doc/html/ZincObjects_8hpp-source.html delete mode 100644 zinclib.d/doc/html/ZincObjects_8hpp.html delete mode 100644 zinclib.d/doc/html/ZincPath_8cpp.html delete mode 100644 zinclib.d/doc/html/ZincPath_8hpp-source.html delete mode 100644 zinclib.d/doc/html/ZincPath_8hpp.html delete mode 100644 zinclib.d/doc/html/ZincTypes_8hpp-source.html delete mode 100644 zinclib.d/doc/html/ZincTypes_8hpp.html delete mode 100644 zinclib.d/doc/html/Zinc_8cpp.html delete mode 100644 zinclib.d/doc/html/Zinc_8hpp-source.html delete mode 100644 zinclib.d/doc/html/Zinc_8hpp.html delete mode 100644 zinclib.d/doc/html/annotated.html delete mode 100644 zinclib.d/doc/html/classZinc-members.html delete mode 100644 zinclib.d/doc/html/classZinc.html delete mode 100644 zinclib.d/doc/html/classZincBitmap-members.html delete mode 100644 zinclib.d/doc/html/classZincBitmap.html delete mode 100644 zinclib.d/doc/html/classZincBitmap.png delete mode 100644 zinclib.d/doc/html/classZincException-members.html delete mode 100644 zinclib.d/doc/html/classZincException.html delete mode 100644 zinclib.d/doc/html/classZincFont-members.html delete mode 100644 zinclib.d/doc/html/classZincFont.html delete mode 100644 zinclib.d/doc/html/classZincImage-members.html delete mode 100644 zinclib.d/doc/html/classZincImage.html delete mode 100644 zinclib.d/doc/html/classZincImage.png delete mode 100644 zinclib.d/doc/html/classZincItem-members.html delete mode 100644 zinclib.d/doc/html/classZincItem.html delete mode 100644 zinclib.d/doc/html/classZincItem.png delete mode 100644 zinclib.d/doc/html/classZincPath-members.html delete mode 100644 zinclib.d/doc/html/classZincPath.html delete mode 100644 zinclib.d/doc/html/classes.html delete mode 100644 zinclib.d/doc/html/doxygen.css delete mode 100644 zinclib.d/doc/html/doxygen.png delete mode 100644 zinclib.d/doc/html/files.html delete mode 100644 zinclib.d/doc/html/functions.html delete mode 100644 zinclib.d/doc/html/functions_func.html delete mode 100644 zinclib.d/doc/html/functions_rela.html delete mode 100644 zinclib.d/doc/html/functions_vars.html delete mode 100644 zinclib.d/doc/html/globals.html delete mode 100644 zinclib.d/doc/html/globals_defs.html delete mode 100644 zinclib.d/doc/html/globals_enum.html delete mode 100644 zinclib.d/doc/html/globals_eval.html delete mode 100644 zinclib.d/doc/html/globals_func.html delete mode 100644 zinclib.d/doc/html/globals_type.html delete mode 100644 zinclib.d/doc/html/globals_vars.html delete mode 100644 zinclib.d/doc/html/hierarchy.html delete mode 100644 zinclib.d/doc/html/index.html delete mode 100644 zinclib.d/doc/html/structZincEvent-members.html delete mode 100644 zinclib.d/doc/html/structZincEvent.html delete mode 100644 zinclib.d/doxyConfig delete mode 100644 zinclib.d/gen.pl delete mode 100644 zinclib.d/makefile.vc delete mode 100644 zinclib.d/src/Zinc.cpp delete mode 100644 zinclib.d/src/Zinc.hpp delete mode 100644 zinclib.d/src/ZincExtern.hpp delete mode 100644 zinclib.d/src/ZincInternal.hpp delete mode 100644 zinclib.d/src/ZincObjects.cpp delete mode 100644 zinclib.d/src/ZincObjects.hpp delete mode 100644 zinclib.d/src/ZincPath.cpp delete mode 100644 zinclib.d/src/ZincPath.hpp delete mode 100644 zinclib.d/src/ZincTypes.hpp delete mode 100644 zinclib.d/test/Makefile delete mode 100644 zinclib.d/test/itemconf.cpp delete mode 100644 zinclib.d/test/items.cpp delete mode 100644 zinclib.d/test/paper-grey.gif delete mode 100644 zinclib.d/test/paper.gif delete mode 100644 zinclib.d/test/runtests.sh delete mode 100644 zinclib.d/test/test.cpp delete mode 100644 zinclib.d/test/test.svg delete mode 100644 zinclib.d/test/widget.cpp (limited to 'zinclib.d') diff --git a/zinclib.d/Copyright b/zinclib.d/Copyright deleted file mode 100644 index 73ea09b..0000000 --- a/zinclib.d/Copyright +++ /dev/null @@ -1,25 +0,0 @@ -This software is the property of IntuiLab SA, France. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/zinclib.d/INSTALL b/zinclib.d/INSTALL deleted file mode 100644 index bd128e0..0000000 --- a/zinclib.d/INSTALL +++ /dev/null @@ -1,47 +0,0 @@ -Zinclib compilation and installation -==================================== - -If you want to use zinclib in your application, compile it and -read the 'README' - - -Compilation ------------ -A Makefile is provided for unix, macosX and mingw. A makefile.vc -is provided to compile with visual C++. -Before compiling zinclib, you need Tcl and Tk headers installed. -They must be in a standard include path (/usr/include). -All compilation is done into a tmp directory. Compilation produces -a zinclib.o file. This file can then be used in your application -as described into 'REAMDE' - -To compile zinclib : - make - - -Installation ------------- -Installing zinclib consists in copying headers and object files into -the IntuiKit source hierarchy in order to use it in IntuiKit. - -To install zinclib into Intuikit sources to use it as a library : - make install - - -Tests ------ -Tests check that zinclib doesn't containy any know bug. -Tests consist in using zinclib to display items. There is not yet -any automated check. This means that tests will display their window -and closing them will go to next test. -Before compiling tests you need : - -- tcl/tk >= 8.4 -- TkZinc compiled for tcl usage and installed as done by IntuiKit's ThirdParty -- Tkimg compiled and installed on your system, see ThirdParty/README for more informations - -To run tests : - make test - - - diff --git a/zinclib.d/Makefile b/zinclib.d/Makefile deleted file mode 100644 index 3a9d9d9..0000000 --- a/zinclib.d/Makefile +++ /dev/null @@ -1,173 +0,0 @@ -######################################## -# Makefile for zinclib # -######################################## - -# default -all: zinclib - - - - - -###################################################################### -# IntuiKit common Makefile # -# # -# This software is the property of IntuiLab SA, France. # -# # -# Contributors: # -# Benoit Peccatte # -# # -###################################################################### - -## remove when no more in development -DEBUG :=1 - -################################## -# Default GNU compilation options -################################## -CXX := g++ -GCC := g++ -LIBEXT := .so -EXE := -DELFILES := - -PROFILE = -MACRO = -LIBDIR = ./lib -INCLUDE = -isystem ./include -LDFLAGS = $(PROFILE) -L$(LIBDIR) -CXXFLAGS = -Wall -fpermissive $(MACRO) $(PROFILE) $(INCLUDE) -INCLUDES = -fno-rtti -LIBLDFLAGS = -shared $(LDFLAGS) -Wl,-export-dynamic -LIBCXXFLAGS = -fPIC $(CXXFLAGS) - - -################################### -# Automatic architecture detection -################################### -ifndef ARCH -ARCH := $(shell uname -s) -endif - -# linux -ifeq ($(ARCH),Linux) -LIBEXT := .so -MACRO += -DLINUX -LDFLAGS += -ldl -endif - -# MacOSX -ifeq ($(ARCH),Darwin) -LIBEXT := .dylib -MACRO += -DMACOSX_BSD -LDFLAGS += -ldl -LIBLDFLAGS = -Wl,-single_module -dynamiclib $(LDFLAGS) -endif - -# Windows cross compile -ifeq ($(ARCH),win32) -CXX := i386-mingw32msvc-g++ -GCC := i386-mingw32msvc-gcc -LIBEXT := .dll -EXE := .exe -MACRO += -DWIN32 -LDFLAGS += -L$(EXPAT_HOME) -endif - -# native windows 2K, XP -ifeq ($(ARCH),MINGW32_NT-5.1) -LIBEXT := .dll -EXE := .exe -MACRO += -DWIN32 -endif - - - -################### -# Options handling -################### - -##### DEBUG options -ifdef DEBUG -CXXFLAGS += -g -endif - -##### Profiling options -ifdef PROF -PROFILE = -pg -fprofile-arcs -ftest-coverage -DELFILES += *.gcov *.bb *.bbg *.da gmon.out -endif - -##### Purify coverage options -ifdef COV -GCC := purecov $(GCC) -DELFILES += *.pcv -endif - -##### Purify options -ifdef PURIFY -GCC := purify -view-file=pure.pv $(GCC) -DELFILES += .pure* *_pure_* pure.pv -endif - -##### Options to display more warnings -ifdef VERBOSE -CXXFLAGS += -Wctor-dtor-privacy -Wnon-virtual-dtor -CXXFLAGS += -Wold-style-cast -Woverloaded-virtual -CXXFLAGS += -Wsign-promo -Wsynth -Wsynth -pedantic -Wchar-subscripts -CXXFLAGS += -Wcomment -Wimplicit -Wmissing-braces -Wparentheses -CXXFLAGS += -Wreturn-type -Wswitch -Wtrigraphs -Wunused -CXXFLAGS += -Wreorder -Wunknown-pragmas -W -Wsign-compare -CXXFLAGS += -Wfloat-equal -Wundef -Wlarger-than-1000 -CXXFLAGS += -Wpointer-arith -Wcast-qual -Wcast-align -CXXFLAGS += -Wstrict-prototypes -Wmissing-prototypes -CXXFLAGS += -Wmissing-noreturn -Wmissing-format-attribute -Wpacked -CXXFLAGS += -Wredundant-decls -Wunreachable-code -Winline -CXXFLAGS += -Wdisabled-optimization -Wconversion -Wshadow -CXXFLAGS += -O0 -ifeq ($(VERBOSE),2) -CXXFLAGS += -Wpadded -Wabi -Weffc++ -Waggregate-return -Wwrite-strings -endif -endif - -##### Optimization options -ifdef OPTIMIZE -CXXFLAGS += -O$(OPTIMIZE) -Wuninitialized -endif - -######################################################### -# END OF IntuiKit Common # -######################################################### - -# specific options -LDFLAGS += -ltcl8.4 -ltk8.4 -lTkZinc - -# easy target -zinclib: tmp/zinclib.o - -tmp/zinclib.o: tmp/ZincObjects.o tmp/ZincPath.o tmp/Zinc.o - ld -r -o $@ $^ - -# generic target -tmp/%.o: src/%.cpp - @mkdir -p tmp - $(CXX) $(LIBCXXFLAGS) -o $@ -c $< - -clean: - rm -f tmp/*.o $(PROFFILES) - -# documentation -doc: - cd src; doxygen ../doxyConfig - mkdir -p doc - rm -rf doc/html - mv src/docs/* doc - rmdir src/docs - -# tests -test: - cd test; $(MAKE) - cd test; ./runtests.sh - -.PHONY: test doc - diff --git a/zinclib.d/README b/zinclib.d/README deleted file mode 100644 index cae13b1..0000000 --- a/zinclib.d/README +++ /dev/null @@ -1,61 +0,0 @@ -Zinclib -======= - -Zinclib is a library that is made to use TkZinc into C++ code. It is -a .o file that can be included directly into your executable. - -Zinclib has been contributed by IntuiLab (www.intuilab.com) to the open software -community and is available as open software under the same licence as Zinc. - - -Directory structure -------------------- - -- src : contains C++ sources of Zinclib - -- tmp : will contain temporary compilation file and the final zinclib.o - -- test : contains Zinclib tests' sources - -- doc : contains doxygen generated documentation and some examples of - Zinclib usage - -- gen.pl is a file that have been used to generate some of the c++ -source from TkZinc source. - - -Code ----- - -API documentation is available into the doc directory as doxygen -files. To use Zinclib in your own code, the 'HOWTO' file explains the -basic on getting Zinclib working. - - -Compilation with zinclib ------------------------- - -Before using zinclib into your application you need : - -- tcl/tk >= 8.4 -- TkZinc compiled for tcl usage and installed -- zinclib.o made as described into 'INSTALL' - -zinclib is a .o file because this is the easiest way to compile and -use. This may change. To use a .o file just add it to your link -command during the compilation of your applicaion. - -To link with zinklib you will need to add these option to your linker : - - -ltcl -ltk -lTkZinc zinclib.o - - -Notes : - -- On some plateforms it can be -ltcl8.4 and -ltk8.4 if the linker - doesn't find tcl and tk. -- You need to have tkzinc compiled for TCL under the name libTkZinc. - in your library search path. - -- this software is still in its first release, e.g. this installation process - is still incomplete. \ No newline at end of file diff --git a/zinclib.d/doc/HOWTO b/zinclib.d/doc/HOWTO deleted file mode 100644 index 6d41c5b..0000000 --- a/zinclib.d/doc/HOWTO +++ /dev/null @@ -1,56 +0,0 @@ -How to use zinclib -================== - -Required lines --------------- - -To use zinclib in you code you need to include zinclib : - - #include "Zinc.hpp" - -Then you must load the tcl interpreter and the zinc library : - - Zinc::load (argv[0]); - - -Zinc usage ----------- - -First create a zinc widget. Each widget has its own windows and -instantly visible. - - Zinc* zn = new Zinc (ZINC_BACKEND_OPENGL); - - -All available functions are in Zinc.hpp and ZincPath.hpp -You can change and read properties of the widget with set and get -commands. Ex : - - zn->setWidth (640); - - -To draw in the widget, you need to create items uning itemCreate -functions. The parent group can be NULL, in which case, the default -one will be used. - - ZincItem* item = zn->itemCreateRectangle (NULL, 10, 10, 100, 100); - -To change item property, use itemSet functions. - - zn->itemSetFilled (item, true); - -To remove an item use itemRemove - - zn->itemRemove (item); - -Don't forget do delete item returned by itemCreate. This is different -from removing it from zinc. Usualy, delete item is called after -removing it, but you can delete it whenever you want. - - -Many zinc function can take a tag as an argument. To use such a tag, -create it using createTag. - - ZincItem* tag = zn->createTag ("tag"); - zn->itemSetFilled (tag, true); - diff --git a/zinclib.d/doc/html/ZincExtern_8hpp-source.html b/zinclib.d/doc/html/ZincExtern_8hpp-source.html deleted file mode 100644 index 312422e..0000000 --- a/zinclib.d/doc/html/ZincExtern_8hpp-source.html +++ /dev/null @@ -1,45 +0,0 @@ - - -IntuiKit: ZincExtern.hpp Source File - - - - -

ZincExtern.hpp

Go to the documentation of this file.
00001 
-00015 #include <tcl.h>
-00016 
-00017 #ifndef ZINC_EXTERN
-00018 #define ZINC_EXTERN
-00019 
-00020 
-00021 // those are function have been created within a C compiler
-00022 extern "C"
-00023 {
-00024 
-00025   //The TkZinc function that initialises tkzinc
-00026   int Tkzinc_Init(Tcl_Interp *interp);
-00027 
-00028   //The TkZinc function that creates a zinc object
-00029   int ZincObjCmd(ClientData client_data,    // Main window associated with interpreter.
-00030                  Tcl_Interp *interp,        // Current interpreter. 
-00031                  int        argc,           // Number of arguments.
-00032                  Tcl_Obj   *CONST  args[]); // Argument objects.
-00033 
-00034   //The TkZinc function that is called by tcl when calling ".zinc fct ..."
-00035   typedef int (*WidgetObjCmd)
-00036                    (ClientData client_data,   // Information about the widget.
-00037                     Tcl_Interp *interp,       // Current interpreter.
-00038                     int        argc,          // Number of arguments.
-00039                     Tcl_Obj    *CONST args[]) // Argument objects.
-00040           __attribute__((cdecl));
-00041 
-00042 }
-00043 
-00044 #endif
-00045 
-

Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/ZincExtern_8hpp.html b/zinclib.d/doc/html/ZincExtern_8hpp.html deleted file mode 100644 index ea35217..0000000 --- a/zinclib.d/doc/html/ZincExtern_8hpp.html +++ /dev/null @@ -1,136 +0,0 @@ - - -IntuiKit: ZincExtern.hpp File Reference - - - - -

ZincExtern.hpp File Reference

-

-#include <tcl.h>
- -

-Go to the source code of this file. - - - - - - - - - -

Typedefs

typedef int(* WidgetObjCmd )(ClientData client_data, Tcl_Interp *interp, int argc, Tcl_Obj *CONST args[]) __attribute__((cdecl))

Functions

int Tkzinc_Init (Tcl_Interp *interp)
int ZincObjCmd (ClientData client_data, Tcl_Interp *interp, int argc, Tcl_Obj *CONST args[])
-


Typedef Documentation

-

- - - - -
- - -
typedef int(* WidgetObjCmd)(ClientData client_data, Tcl_Interp *interp, int argc, Tcl_Obj *CONST args[]) __attribute__((cdecl)) -
-
- - - - - -
-   - - -

-

-


Function Documentation

-

- - - - -
- - - - - - - - - - -
int Tkzinc_Init Tcl_Interp *  interp  ) 
-
- - - - - -
-   - - -

-ZincExtern.hpp zinclib

-This software is the property of IntuiLab SA, France. See at the end of the file for the complete copyright notice

-Here we create TkZinc library headers since they don't exist

-08/03/05

-Contributors: Benoit Peccatte <peccatte@intuilab.com>

-

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

-

-


Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/ZincInternal_8hpp-source.html b/zinclib.d/doc/html/ZincInternal_8hpp-source.html deleted file mode 100644 index 0d7a8b9..0000000 --- a/zinclib.d/doc/html/ZincInternal_8hpp-source.html +++ /dev/null @@ -1,86 +0,0 @@ - - -IntuiKit: ZincInternal.hpp Source File - - - - -

ZincInternal.hpp

Go to the documentation of this file.
00001 
-00017 #include <string>
-00018 
-00019 #include "ZincObjects.hpp"
-00020 #ifndef BAZAR
-00021 #define BAZAR
-00022 
-00023 #define MAX_NUM_LENGTH 32
-00024 
-00025 // The base name of the TCL function that serve for callbacks
-00026 #define Z_TCLCB "zincTclCb"
-00027 
-00038 // make a boolean object
-00039 #define Z_BOO_POOL(no, value) ( Tcl_SetBooleanObj (pool[no], value), pool[no] )
-00040 // make an integer object
-00041 #define Z_INT_POOL(no, value) ( Tcl_SetIntObj (pool[no], value), pool[no] )
-00042 // make a double object
-00043 #define Z_DBL_POOL(no, value) ( Tcl_SetDoubleObj (pool[no], value), pool[no] )
-00044 // make a string object
-00045 #define Z_STR_POOL(no, value, length) ( Tcl_SetStringObj (pool[no],       \
-00046                                                           value, length), \
-00047                                         pool[no] )
-00048 
-00057 #define Z_LST_POOL(no, value, size) ( Tcl_SetListObj (pool[no], size, value),\
-00058                                       pool[no] )
-00059 
-00068 #define Z_CLEANLIST(no) Tcl_SetIntObj (pool[no], 0)
-00069 
-00070 
-00076 //create an option object (value prefixed by '-')
-00077 #define Z_DEFINE_ZOPT(string) Tcl_Obj* ZOPT_##string = Tcl_NewStringObj ("-" #string, -1);
-00078 //create a function object
-00079 #define Z_DEFINE_ZFCT(string) Tcl_Obj* ZFCT_##string = Tcl_NewStringObj (#string, -1);
-00080 //create an item object
-00081 #define Z_DEFINE_ZITM(string) Tcl_Obj* ZITM_##string = Tcl_NewStringObj (#string, -1);
-00082 
-00089 #define Z_PARENTGROUP(parentGroup)  \
-00090   ( (parentGroup != NULL) ? parentGroup->object : DEFAULT_GROUP_OBJ );
-00091 
-00097 inline std::string itos (int integer)
-00098 {
-00099   char tmp[MAX_NUM_LENGTH];
-00100   // use standard function to convert
-00101   if (snprintf (tmp, MAX_NUM_LENGTH, "%d", integer) < 0)
-00102   {
-00103     throw ZincException ("Error converting integer", __FILE__, __LINE__ );
-00104   }
-00105   return std::string (tmp);
-00106 }
-00107 
-00113 inline std::string ltos (long l)
-00114 {
-00115   char tmp[MAX_NUM_LENGTH];
-00116   // use standard function to convert
-00117   if (snprintf (tmp, MAX_NUM_LENGTH, "%ld", l) < 0)
-00118   {
-00119     throw ZincException ("Error converting long", __FILE__, __LINE__ );
-00120   }
-00121   return std::string (tmp);
-00122 }
-00123 
-00129 inline std::string dtos (double d)
-00130 {
-00131   char tmp[MAX_NUM_LENGTH];
-00132   // use standard function to convert
-00133   if (snprintf (tmp, MAX_NUM_LENGTH, "%f", d) < 0)
-00134   {
-00135     throw ZincException ("Error converting double", __FILE__, __LINE__ );
-00136   }
-00137   return std::string (tmp);
-00138 }
-00139 
-00156 #endif
-

Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/ZincInternal_8hpp.html b/zinclib.d/doc/html/ZincInternal_8hpp.html deleted file mode 100644 index 84befd3..0000000 --- a/zinclib.d/doc/html/ZincInternal_8hpp.html +++ /dev/null @@ -1,535 +0,0 @@ - - -IntuiKit: ZincInternal.hpp File Reference - - - - -

ZincInternal.hpp File Reference

-

-#include <string>
-#include "ZincObjects.hpp"
- -

-Go to the source code of this file. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Defines

#define MAX_NUM_LENGTH   32
#define Z_TCLCB   "zincTclCb"
#define Z_BOO_POOL(no, value)   ( Tcl_SetBooleanObj (pool[no], value), pool[no] )
#define Z_INT_POOL(no, value)   ( Tcl_SetIntObj (pool[no], value), pool[no] )
#define Z_DBL_POOL(no, value)   ( Tcl_SetDoubleObj (pool[no], value), pool[no] )
#define Z_STR_POOL(no, value, length)
#define Z_LST_POOL(no, value, size)
#define Z_CLEANLIST(no)   Tcl_SetIntObj (pool[no], 0)
#define Z_DEFINE_ZOPT(string)   Tcl_Obj* ZOPT_##string = Tcl_NewStringObj ("-" #string, -1);
#define Z_DEFINE_ZFCT(string)   Tcl_Obj* ZFCT_##string = Tcl_NewStringObj (#string, -1);
#define Z_DEFINE_ZITM(string)   Tcl_Obj* ZITM_##string = Tcl_NewStringObj (#string, -1);
#define Z_PARENTGROUP(parentGroup)   ( (parentGroup != NULL) ? parentGroup->object : DEFAULT_GROUP_OBJ );

Functions

std::string itos (int integer)
std::string ltos (long l)
std::string dtos (double d)
-


Define Documentation

-

- - - - -
- - -
#define MAX_NUM_LENGTH   32 -
-
- - - - - -
-   - - -

-ZincInternal.hpp zinclib

-This software is the property of IntuiLab SA, France. See at the end of the file for the complete copyright notice

-Here we defines macros and constants that are only used within Zinclib code

-08/03/05

-Contributors: Benoit Peccatte <peccatte@intuilab.com> David Thevenin <thevenin@intuilab.com>

-

- - - - -
- - - - - - - - - - -
#define Z_BOO_POOLno,
value   )    ( Tcl_SetBooleanObj (pool[no], value), pool[no] ) -
-
- - - - - -
-   - - -

-These are macro for shortness and readability of code. They take one Tcl_Obj from the pool and put one value into it. This object is returned. They all have the same signature.

-

Parameters:
- - - -
no the id of the Tcl_Obj to take within the pool (max is ZINC_POOL_COUNT-1)
value the value to put in the extracted object
-
-
Returns:
the object from the pool
-
-

- - - - -
- - - - - - - -
#define Z_CLEANLISTno   )    Tcl_SetIntObj (pool[no], 0) -
-
- - - - - -
-   - - -

-Clear a list object. Tcl_Obj used in a list object have a refcount incremented and as such can't be reused for anything else. To free those object you need to clean the list object after use.

-

Parameters:
- - -
no the id of a Tcl_Obj within the pool which contains a list to clear
-
-
-

- - - - -
- - - - - - - - - - -
#define Z_DBL_POOLno,
value   )    ( Tcl_SetDoubleObj (pool[no], value), pool[no] ) -
-
- - - - - -
-   - - -

-

-

- - - - -
- - - - - - - -
#define Z_DEFINE_ZFCTstring   )    Tcl_Obj* ZFCT_##string = Tcl_NewStringObj (#string, -1); -
-
- - - - - -
-   - - -

-

-

- - - - -
- - - - - - - -
#define Z_DEFINE_ZITMstring   )    Tcl_Obj* ZITM_##string = Tcl_NewStringObj (#string, -1); -
-
- - - - - -
-   - - -

-

-

- - - - -
- - - - - - - -
#define Z_DEFINE_ZOPTstring   )    Tcl_Obj* ZOPT_##string = Tcl_NewStringObj ("-" #string, -1); -
-
- - - - - -
-   - - -

-Create a constant Tcl_Obj that can be reused as a parameter later

-string define the name and the value ov the object

-

- - - - -
- - - - - - - - - - -
#define Z_INT_POOLno,
value   )    ( Tcl_SetIntObj (pool[no], value), pool[no] ) -
-
- - - - - -
-   - - -

-

-

- - - - -
- - - - - - - - - - - - - -
#define Z_LST_POOLno,
value,
size   )  -
-
- - - - - -
-   - - -

-Value:

( Tcl_SetListObj (pool[no], size, value),\
-                                      pool[no] )
-
Make a list object

-

Parameters:
- - - - -
no the id of the Tcl_Obj to take within the pool
value a table of pointer to Tcl_Obj to put in the list
size the number objects in the table
-
-
Returns:
the list object from the pool
-
-

- - - - -
- - - - - - - -
#define Z_PARENTGROUPparentGroup   )    ( (parentGroup != NULL) ? parentGroup->object : DEFAULT_GROUP_OBJ ); -
-
- - - - - -
-   - - -

-Macro to return a parentGroup Tcl_Obj. If a NULL is group given, it returns the default one.

-

Parameters:
- - -
parentGroup the parent group to take
-
-
-

- - - - -
- - - - - - - - - - - - - -
#define Z_STR_POOLno,
value,
length   )  -
-
- - - - - -
-   - - -

-Value:

( Tcl_SetStringObj (pool[no],       \
-                                                          value, length), \
-                                        pool[no] )
-
-

- - - - -
- - -
#define Z_TCLCB   "zincTclCb" -
-
- - - - - -
-   - - -

-

-


Function Documentation

-

- - - - -
- - - - - - - - - - -
std::string dtos double  d  )  [inline]
-
- - - - - -
-   - - -

-Convert a double to a string

-

Parameters:
- - -
double the integer to convert
-
-
-

- - - - -
- - - - - - - - - - -
std::string itos int  integer  )  [inline]
-
- - - - - -
-   - - -

-Convert an integer to a string

-

Parameters:
- - -
integer the integer to convert
-
-
-

- - - - -
- - - - - - - - - - -
std::string ltos long  l  )  [inline]
-
- - - - - -
-   - - -

-Convert a long to a string

-

Parameters:
- - -
l the long to convert
-
-
-


Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/ZincObjects_8cpp.html b/zinclib.d/doc/html/ZincObjects_8cpp.html deleted file mode 100644 index ca16fa0..0000000 --- a/zinclib.d/doc/html/ZincObjects_8cpp.html +++ /dev/null @@ -1,21 +0,0 @@ - - -IntuiKit: ZincObjects.cpp File Reference - - - - -

ZincObjects.cpp File Reference

-

-#include "ZincInternal.hpp"
-#include "ZincObjects.hpp"
-#include "Zinc.hpp"
- - -
-


Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/ZincObjects_8hpp-source.html b/zinclib.d/doc/html/ZincObjects_8hpp-source.html deleted file mode 100644 index 2c65309..0000000 --- a/zinclib.d/doc/html/ZincObjects_8hpp-source.html +++ /dev/null @@ -1,100 +0,0 @@ - - -IntuiKit: ZincObjects.hpp Source File - - - - -

ZincObjects.hpp

Go to the documentation of this file.
00001 
-00016 #include "ZincTypes.hpp"
-00017 
-00018 #include <exception>
-00019 #include <string>
-00020 #include <tcl.h>
-00021 
-00022 #ifndef ZINC_OBJECTS
-00023 #define ZINC_OBJECTS
-00024 
-00025 // Object representing a zinc item
-00026 class ZincItem
-00027 {
-00028 protected:
-00032   ZincItem ();
-00033 
-00034 public:
-00035   Tcl_Obj *object;  //the object we are storing
-00036 
-00042   ZincItem (Tcl_Obj *obj);
-00043 
-00047   virtual ~ZincItem ();
-00048 };
-00049 
-00050 // Object representing a zinc image
-00051 class ZincImage : public ZincItem
-00052 {
-00056   ZincImage ();
-00057 
-00058   bool madeFromInternal;
-00059 
-00060 public:
-00066   ZincImage (Tcl_Obj *obj);
-00067 
-00073   ZincImage (Tcl_Obj *obj, bool internal);
-00074 
-00078   virtual ~ZincImage ();
-00079 };
-00080 
-00081 // Object representing a zinc bitmap
-00082 class ZincBitmap : public ZincItem
-00083 {
-00087   ZincBitmap ();
-00088 
-00089   bool madeFromInternal;
-00090 
-00091 public:
-00097   ZincBitmap (Tcl_Obj *obj);
-00098 
-00104   ZincBitmap (Tcl_Obj *obj, bool internal);
-00105 
-00111   ZincBitmap (String name);
-00112   
-00116   virtual ~ZincBitmap ();
-00117 };
-00118 
-00119 // Object representing a zinc font
-00120 class ZincFont
-00121 {
-00125   ZincFont ();
-00126 
-00127 public:
-00128   String name;
-00129 
-00133   ZincFont (const char *font);
-00134 
-00135 };
-00136 
-00140 class ZincException : public std::exception
-00141 {
-00142 
-00143 private:
-00144   String msg;   // the exception message
-00145   String file;  // file where exception have been caught
-00146   int line;     // line where exception have been caught
-00147 
-00148 public:
-00154   ZincException (String msg, char *file, int lineNo);
-00155 
-00161   ZincException (const ZincException &exception);
-00162 
-00166   virtual ~ZincException () throw();
-00167 
-00173   const char* what () const throw ();
-00174 };
-00175 
-00176 #endif
-

Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/ZincObjects_8hpp.html b/zinclib.d/doc/html/ZincObjects_8hpp.html deleted file mode 100644 index 117e12c..0000000 --- a/zinclib.d/doc/html/ZincObjects_8hpp.html +++ /dev/null @@ -1,35 +0,0 @@ - - -IntuiKit: ZincObjects.hpp File Reference - - - - -

ZincObjects.hpp File Reference

-

-#include "ZincTypes.hpp"
-#include <exception>
-#include <string>
-#include <tcl.h>
- -

-Go to the source code of this file. - - - - - - - - - - - - -

Compounds

class  ZincBitmap
class  ZincException
class  ZincFont
class  ZincImage
class  ZincItem
-


Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/ZincPath_8cpp.html b/zinclib.d/doc/html/ZincPath_8cpp.html deleted file mode 100644 index 8b65024..0000000 --- a/zinclib.d/doc/html/ZincPath_8cpp.html +++ /dev/null @@ -1,93 +0,0 @@ - - -IntuiKit: ZincPath.cpp File Reference - - - - -

ZincPath.cpp File Reference

-

-#include "Zinc.hpp"
-#include "ZincInternal.hpp"
-#include <math.h>
- - - - - - - - -

Functions

double modulo (double d, double m)

Variables

const double convertRatio = atan2 (1., 1.) * 4. / 180.
-


Function Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - -
double modulo double  d,
double  m
[inline]
-
- - - - - -
-   - - -

-Calculate d m for doubles this is because the C works only for integers

-


Variable Documentation

-

- - - - -
- - -
const double convertRatio = atan2 (1., 1.) * 4. / 180. -
-
- - - - - -
-   - - -

-Path.cpp zinclib

-This software is the property of IntuiLab SA, France. See at the end of the file for the complete copyright notice

-Here we defines The ZincPath object

-08/03/05

-Contributors: Benoit Peccatte <peccatte@intuilab.com>

-


Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/ZincPath_8hpp-source.html b/zinclib.d/doc/html/ZincPath_8hpp-source.html deleted file mode 100644 index c79af5f..0000000 --- a/zinclib.d/doc/html/ZincPath_8hpp-source.html +++ /dev/null @@ -1,64 +0,0 @@ - - -IntuiKit: ZincPath.hpp Source File - - - - -

ZincPath.hpp

Go to the documentation of this file.
00001 
-00015 #include "ZincTypes.hpp"
-00016 
-00017 #include <list>
-00018 #include <tcl.h>
-00019 
-00020 #ifndef ZINC_PATH
-00021 #define ZINC_PATH
-00022 
-00023 class ZincPath
-00024 {
-00025   double firstX, firstY;     //first point's coordinate
-00026   double lastX, lastY;       //last point's coordinate
-00027   Tcl_Obj* path;             //list of points
-00028 
-00035   inline void addPoint (double x, double y, bool c);
-00036 
-00051   void convertFromSvg (double x0, double y0, double &rx, double &ry, double &phi,
-00052                        bool larcgeArc, bool sweep, double x, double y,
-00053                        double &cx, double &cy, double &theta, double &delta);
-00054 
-00055 
-00056 public:
-00062   ZincPath (double x, double y);
-00063 
-00069   ~ZincPath ();
-00070 
-00071   /******************************************
-00072        ZincPath manipulation
-00073   ******************************************/
-00077   void close ();
-00078 
-00084   void lineTo (double x, double y);
-00085 
-00094   void curveTo (double cx1, double cy1, double cx2, double cy2,
-00095                 double x, double y);
-00096 
-00104   void cubicBezierTo (double cx1, double cy1, double cx2, double cy2,
-00105                       double x, double y);
-00106 
-00114   void quadraticBezierTo (double cx, double cy, double x, double y);
-00115 
-00126   void arcTo (double rx, double ry, double xAxisRotation, bool largeArc,
-00127               bool sweepFlag, double x, double y);
-00128   
-00135   Tcl_Obj* getTable ();
-00136 
-00137 };
-00138 
-00139 #endif
-00140 
-

Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/ZincPath_8hpp.html b/zinclib.d/doc/html/ZincPath_8hpp.html deleted file mode 100644 index 53d85ab..0000000 --- a/zinclib.d/doc/html/ZincPath_8hpp.html +++ /dev/null @@ -1,26 +0,0 @@ - - -IntuiKit: ZincPath.hpp File Reference - - - - -

ZincPath.hpp File Reference

-

-#include "ZincTypes.hpp"
-#include <list>
-#include <tcl.h>
- -

-Go to the source code of this file. - - - - -

Compounds

class  ZincPath
-


Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/ZincTypes_8hpp-source.html b/zinclib.d/doc/html/ZincTypes_8hpp-source.html deleted file mode 100644 index 4476d23..0000000 --- a/zinclib.d/doc/html/ZincTypes_8hpp-source.html +++ /dev/null @@ -1,163 +0,0 @@ - - -IntuiKit: ZincTypes.hpp Source File - - - - -

ZincTypes.hpp

Go to the documentation of this file.
00001 
-00015 #include <string>
-00016 
-00017 #ifndef ZINC_TYPES
-00018 #define ZINC_TYPES
-00019 
-00020 typedef std::string String;
-00021 
-00022 /**********************************
-00023    Predeclaration of Zinc types
-00024 **********************************/
-00025 class Zinc;
-00026 class ZincPath;
-00027 class ZincItem;
-00028 class ZincImage;
-00029 class ZincFont;
-00030 struct ZincEvent;
-00031 
-00032 /*******************************************************
-00033      Signature to use when binding with a callback
-00034 *******************************************************/
-00035 typedef void (*ZincItemCallback)
-00036              (Zinc *zinc,        // Information about the widget.
-00037               ZincItem *item,    // the item being evented
-00038               ZincEvent *event,  // event information
-00039               void *userData);   // user data provided with bind
-00040 
-00041 typedef void (*ZincWidgetCallback)
-00042              (Zinc *zinc,        // Information about the widget.
-00043               ZincEvent *event,  // event information
-00044               void *userData);   // user data provided with bind
-00045 
-00046 
-00047 /***********************************
-00048        Library constants
-00049 ***********************************/
-00050 
-00051 // Rendering model
-00052 const int ZINC_BACKEND_X11 = 0;
-00053 const int ZINC_BACKEND_OPENGL = 1;
-00054 
-00055 
-00056 /***********************************
-00057        Library enums
-00058 ***********************************/
-00059 
-00060 //Styles for line items
-00061 typedef enum
-00062 {
-00063   lineStyle_simple = 0,  
-00064   lineStyle_dashed,
-00065   lineStyle_mixed,
-00066   lineStyle_dotted
-00067 } lineStyle;
-00068 
-00069 //Styles for line cap
-00070 typedef enum
-00071 {
-00072   capStyle_butt = 0,
-00073   capStyle_projecting,
-00074   capStyle_round
-00075 } capStyle;
-00076 
-00077 //List of fill rules
-00078 typedef enum
-00079 {
-00080   fillRule_odd = 0 ,
-00081   fillRule_nonzero,
-00082   fillRule_positive,
-00083   fillRule_negative,
-00084   fillRule_abs_geq_2
-00085 } fillRule;
-00086 
-00087 //list of join style
-00088 typedef enum
-00089 {
-00090   joinStyle_bevel = 0,
-00091   joinStyle_miter,
-00092   joinStyle_round
-00093 } joinStyle;
-00094 
-00095 //list of reliefs
-00096 typedef enum
-00097 {
-00098   relief_flat = 0,
-00099   relief_raised,
-00100   relief_sunken,
-00101   relief_ridge,
-00102   relief_groove,
-00103   relief_roundraised,
-00104   relief_roundsunken,
-00105   relief_roundridge,
-00106   relief_roundgroove,
-00107   relief_raisedrule,
-00108   relief_sunkenrule
-00109 } relief;
-00110 
-00111 //List of alignments
-00112 typedef enum
-00113 {
-00114   alignment_left = 0,
-00115   alignment_right,
-00116   alignment_center
-00117 } alignment;
-00118 
-00119 //list of anchors
-00120 typedef enum
-00121 {
-00122   anchor_nw = 0,
-00123   anchor_n,
-00124   anchor_ne,
-00125   anchor_e,
-00126   anchor_se,
-00127   anchor_s,
-00128   anchor_sw,
-00129   anchor_w,
-00130   anchor_center
-00131 } anchor;
-00132 
-00133 //actions to take when calling contour
-00134 typedef enum
-00135 {
-00136   item_add_clockwise,
-00137   item_add_counterclockwise,
-00138   item_remove
-00139 } itemOperator;
-00140 
-00141 //list of possible itemtypes
-00142 typedef enum
-00143 {
-00144   item_group,
-00145   item_arc,
-00146   item_text,
-00147   item_rectangle,
-00148   item_curve,
-00149   item_icon
-00150 } itemType;
-00151 
-00152 //informations contained in an event
-00153 struct ZincEvent
-00154 {
-00155   int x,y;  // pointer position  none -> 0
-00156   int k;    // keycode           none -> 0
-00157   long t;   // timestamp         none -> 0
-00158   String K; // keysym            none -> "??"
-00159 };
-00160 
-00161 
-00162 
-00163 #endif
-

Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/ZincTypes_8hpp.html b/zinclib.d/doc/html/ZincTypes_8hpp.html deleted file mode 100644 index cc7a3ba..0000000 --- a/zinclib.d/doc/html/ZincTypes_8hpp.html +++ /dev/null @@ -1,561 +0,0 @@ - - -IntuiKit: ZincTypes.hpp File Reference - - - - -

ZincTypes.hpp File Reference

-

-#include <string>
- -

-Go to the source code of this file. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Compounds

struct  ZincEvent

Typedefs

typedef std::string String
typedef void(* ZincItemCallback )(Zinc *zinc, ZincItem *item, ZincEvent *event, void *userData)
typedef void(* ZincWidgetCallback )(Zinc *zinc, ZincEvent *event, void *userData)

Enumerations

enum  lineStyle { lineStyle_simple = 0, -lineStyle_dashed, -lineStyle_mixed, -lineStyle_dotted - }
enum  capStyle { capStyle_butt = 0, -capStyle_projecting, -capStyle_round - }
enum  fillRule {
-  fillRule_odd = 0, -fillRule_nonzero, -fillRule_positive, -fillRule_negative, -
-  fillRule_abs_geq_2 -
- }
enum  joinStyle { joinStyle_bevel = 0, -joinStyle_miter, -joinStyle_round - }
enum  relief {
-  relief_flat = 0, -relief_raised, -relief_sunken, -relief_ridge, -
-  relief_groove, -relief_roundraised, -relief_roundsunken, -relief_roundridge, -
-  relief_roundgroove, -relief_raisedrule, -relief_sunkenrule -
- }
enum  alignment { alignment_left = 0, -alignment_right, -alignment_center - }
enum  anchor {
-  anchor_nw = 0, -anchor_n, -anchor_ne, -anchor_e, -
-  anchor_se, -anchor_s, -anchor_sw, -anchor_w, -
-  anchor_center -
- }
enum  itemOperator { item_add_clockwise, -item_add_counterclockwise, -item_remove - }
enum  itemType {
-  item_group, -item_arc, -item_text, -item_rectangle, -
-  item_curve, -item_icon -
- }

Variables

const int ZINC_BACKEND_X11 = 0
const int ZINC_BACKEND_OPENGL = 1
-


Typedef Documentation

-

- - - - -
- - -
typedef std::string String -
-
- - - - - -
-   - - -

-ZincTypes.hpp zinclib

-This software is the property of IntuiLab SA, France. See at the end of the file for the complete copyright notice

-Here we defines types and constants that may be usefull for a zinclib user

-08/03/05

-Contributors: Benoit Peccatte <peccatte@intuilab.com>

-

- - - - -
- - -
typedef void(* ZincItemCallback)(Zinc *zinc, ZincItem *item, ZincEvent *event, void *userData) -
-
- - - - - -
-   - - -

-

-

- - - - -
- - -
typedef void(* ZincWidgetCallback)(Zinc *zinc, ZincEvent *event, void *userData) -
-
- - - - - -
-   - - -

-

-


Enumeration Type Documentation

-

- - - - -
- - -
enum alignment -
-
- - - - - -
-   - - -

-

Enumeration values:
- - - - -
alignment_left  -
alignment_right  -
alignment_center  -
-
-
-

- - - - -
- - -
enum anchor -
-
- - - - - -
-   - - -

-

Enumeration values:
- - - - - - - - - - -
anchor_nw  -
anchor_n  -
anchor_ne  -
anchor_e  -
anchor_se  -
anchor_s  -
anchor_sw  -
anchor_w  -
anchor_center  -
-
-
-

- - - - -
- - -
enum capStyle -
-
- - - - - -
-   - - -

-

Enumeration values:
- - - - -
capStyle_butt  -
capStyle_projecting  -
capStyle_round  -
-
-
-

- - - - -
- - -
enum fillRule -
-
- - - - - -
-   - - -

-

Enumeration values:
- - - - - - -
fillRule_odd  -
fillRule_nonzero  -
fillRule_positive  -
fillRule_negative  -
fillRule_abs_geq_2  -
-
-
-

- - - - -
- - -
enum itemOperator -
-
- - - - - -
-   - - -

-

Enumeration values:
- - - - -
item_add_clockwise  -
item_add_counterclockwise  -
item_remove  -
-
-
-

- - - - -
- - -
enum itemType -
-
- - - - - -
-   - - -

-

Enumeration values:
- - - - - - - -
item_group  -
item_arc  -
item_text  -
item_rectangle  -
item_curve  -
item_icon  -
-
-
-

- - - - -
- - -
enum joinStyle -
-
- - - - - -
-   - - -

-

Enumeration values:
- - - - -
joinStyle_bevel  -
joinStyle_miter  -
joinStyle_round  -
-
-
-

- - - - -
- - -
enum lineStyle -
-
- - - - - -
-   - - -

-

Enumeration values:
- - - - - -
lineStyle_simple  -
lineStyle_dashed  -
lineStyle_mixed  -
lineStyle_dotted  -
-
-
-

- - - - -
- - -
enum relief -
-
- - - - - -
-   - - -

-

Enumeration values:
- - - - - - - - - - - - -
relief_flat  -
relief_raised  -
relief_sunken  -
relief_ridge  -
relief_groove  -
relief_roundraised  -
relief_roundsunken  -
relief_roundridge  -
relief_roundgroove  -
relief_raisedrule  -
relief_sunkenrule  -
-
-
-


Variable Documentation

-

- - - - -
- - -
const int ZINC_BACKEND_OPENGL = 1 -
-
- - - - - -
-   - - -

-

-

- - - - -
- - -
const int ZINC_BACKEND_X11 = 0 -
-
- - - - - -
-   - - -

-

-


Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/Zinc_8cpp.html b/zinclib.d/doc/html/Zinc_8cpp.html deleted file mode 100644 index 7de8f8c..0000000 --- a/zinclib.d/doc/html/Zinc_8cpp.html +++ /dev/null @@ -1,3595 +0,0 @@ - - -IntuiKit: Zinc.cpp File Reference - - - - -

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_call2fct,
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
- - diff --git a/zinclib.d/doc/html/Zinc_8hpp-source.html b/zinclib.d/doc/html/Zinc_8hpp-source.html deleted file mode 100644 index 494e1ee..0000000 --- a/zinclib.d/doc/html/Zinc_8hpp-source.html +++ /dev/null @@ -1,434 +0,0 @@ - - -IntuiKit: Zinc.hpp Source File - - - - -

Zinc.hpp

Go to the documentation of this file.
00001 
-00016 #include "ZincTypes.hpp"
-00017 #include "ZincObjects.hpp"
-00018 #include "ZincPath.hpp"
-00019 #include "ZincExtern.hpp"
-00020 #include <tcl.h>
-00021 
-00022 #ifndef ZINC_HEADER
-00023 #define ZINC_HEADER
-00024 
-00025 
-00027 const int ZINC_POOL_COUNT   = 7;
-00029 const int  ZINC_PARAM_COUNT = 10;
-00030 
-00032 const int DEFAULT_GROUP = 1;
-00033 
-00037 class Zinc
-00038 {
-00039   friend class ZincPath;
-00040   
-00041 public:
-00042   Tcl_Obj *id;           
-00043   WidgetObjCmd objCmd;   
-00044   ClientData wi;         
-00045   String tclCb;          
-00046   int znId;              
-00047   String window;         
-00048 
-00049   static int znCount;                   
-00050   static Tcl_CmdInfo imgCmdInfo;        
-00051   static Tcl_CmdInfo fntCmdInfo;        
-00052   static Tcl_CmdInfo focCmdInfo;        
-00053   static Tcl_CmdInfo bndCmdInfo;        
-00054   static Tcl_Obj* pool[ZINC_POOL_COUNT];
-00055   static Tcl_Obj* p1[ZINC_PARAM_COUNT]; 
-00056   static Tcl_Obj* p2[ZINC_PARAM_COUNT]; 
-00057 
-00058 public:
-00059   static Tcl_Interp *interp;            
-00060 
-00066   Zinc (int renderingMode);
-00067 
-00071   ~Zinc ();
-00072 
-00078   void setTitle (String title);
-00079 
-00080 /*****************************************
-00081           WIDGET PROPERTIES
-00082 *****************************************/
-00083   
-00089   void setBackcolor (String value);
-00090 
-00096   String getBackcolor ();
-00097 
-00103   void setForecolor (String value);
-00104 
-00110   String getForecolor ();
-00111 
-00117   void setWidth (int value);
-00118 
-00124   int getWidth ();
-00125 
-00131   void setHeight (int value);
-00132 
-00138   int getHeight ();
-00139 
-00145   void setBorderwidth (int value);
-00146 
-00152   int getBorderwidth ();
-00153 
-00159   void setFont (ZincFont* value);
-00160 
-00166   ZincFont* getFont ();
-00167 
-00168 /*****************************************
-00169           WIDGET METHODS
-00170 *****************************************/
-00171 
-00179   void bbox (ZincItem* item, double bbox[4]);
-00180 
-00188   void relativeBbox (ZincItem* item, double bbox[4]);
-00189 
-00190 
-00197   void chggroup (ZincItem *item, ZincItem *parentGroup);
-00198 
-00205   ZincItem* clone (ZincItem *item);
-00206 
-00212   int contour (ZincItem *item);
-00213 
-00222   int contour (ZincItem *item, itemOperator flag, ZincItem *reference);
-00223 
-00232   int contour (ZincItem *item, bool add, ZincPath *contour);
-00233 
-00244   void coords (ZincItem *item, ZincPath *contour, bool add,
-00245                int contourIndex = -1, int coordIndex = -1);
-00246 
-00254   void coordsRemove (ZincItem *item, int coordIndex, int contourIndex = -1);
-00255 
-00262   void addTag (ZincItem *item, String tag);
-00263 
-00270   void dTag (ZincItem *item, String tag = String(""));
-00271 
-00280   int getTags (ZincItem *item, String*** tagList);
-00281 
-00287   void focus (ZincItem *item);
-00288 
-00295   bool isGname (String gname);
-00296 
-00303   void gname (String gradient, String gname);
-00304 
-00311   ZincItem* group (ZincItem *item);
-00312 
-00318   void lower (ZincItem *item);
-00319 
-00326   void lower (ZincItem *item, ZincItem *belowThis);
-00327 
-00333   void raise (ZincItem *item);
-00334 
-00341   void raise (ZincItem *item, ZincItem *aboveThis);
-00342 
-00349    itemType type (ZincItem *item);
-00350 
-00358   ZincItem* createTag(String tag);
-00359 
-00360 /*****************************************
-00361           ITEMS MANIPULATION
-00362 *****************************************/
-00368   void itemRemove (ZincItem *item);
-00369 
-00377   ZincItem *itemCreateGroup (ZincItem *parentGroup);
-00378 
-00386   ZincItem *itemCreateRectangle (ZincItem *parentGroup, double x, double y,
-00387                                 double width, double height);
-00388 
-00396   ZincItem *itemCreateArc (ZincItem *parentGroup, double x, double y,
-00397                            double width, double height);
-00398 
-00405   ZincItem *itemCreateText (ZincItem *parentGroup);
-00406 
-00414   ZincItem *itemCreateCurve (ZincItem *parentGroup, ZincPath *path);
-00415 
-00423   ZincItem *itemCreateIcon (ZincItem *parentGroup, ZincImage* image);
-00424 
-00425 
-00426 /**************************************************
-00427                     BINDING
-00428 **************************************************/
-00429 
-00438   void bind (String eventSpecification,
-00439              ZincWidgetCallback callBack, void *userData, bool add = false);
-00440 
-00446   void unbind (String eventSpecification);
-00447   
-00457   void itemBind (ZincItem *item, String eventSpecification,
-00458                  ZincItemCallback callBack, void *userData, bool add = false);
-00459 
-00466   void itemUnbind (ZincItem *item, String eventSpecification);
-00467 
-00468 /**************************************************
-00469            TRANSFORMATION METHODS
-00470 **************************************************/
-00471 
-00478   void itemTranslate (ZincItem * item, double dx, double dy);
-00479 
-00487   void itemTranslate (ZincItem * item, double x, double y, bool absolute);
-00488 
-00495   void itemRotate (ZincItem * item, double angle);
-00496 
-00504   void itemRotate (ZincItem * item, double angle, double x, double y);
-00505 
-00513   void itemRotate (ZincItem * item, double angle, bool degree);
-00514 
-00523   void itemRotate (ZincItem * item, double angle, double x, double y,
-00524                    bool degree);
-00525 
-00533   void itemScale (ZincItem * item, double ax, double ay);
-00534 
-00543   void itemScale (ZincItem * item, double ax, double ay, double cx, double cy);
-00544 
-00545   
-00553   void itemSkew (ZincItem * item, double sx, double sy);
-00554 
-00561   void itemSkewX (ZincItem * item, double sx);
-00562 
-00569   void itemSkewY (ZincItem * item, double sy);
-00570 
-00576   void itemResetTransformation (ZincItem * item);
-00577 
-00584   void itemSetTransformation (ZincItem * item,
-00585                               double a, double b, double c,
-00586                               double d, double e, double f);
-00587 
-00594   void itemGetTransformation (ZincItem * item,
-00595                               double *a, double *b, double *c,
-00596                               double *d, double *e, double *f);
-00597 
-00604   void itemMatrix (ZincItem * item,
-00605                    double a, double b, double c,
-00606                    double d, double e, double f);
-00607 
-00608 /*******************************************************
-00609              AUTOGENERATED METHODS (itemconfigure)
-00610 "code.hpp" in Tkzins/generic source from :
-00611    ./gen.pl Arc.c Attrs.c Color.c Curve.c Draw.c  Group.c
-00612         Image.c List.c Item.c Icon.c Rectangle.c tkZinc.c Text.c
-00613 *******************************************************/
-00614 
-00620   void itemSetClosed (ZincItem * item, bool value);
-00621 
-00627   bool itemGetClosed (ZincItem * item);
-00628 
-00634   void itemSetComposealpha (ZincItem * item, bool value);
-00635 
-00641   bool itemGetComposealpha (ZincItem * item);
-00642 
-00648   void itemSetComposerotation (ZincItem * item, bool value);
-00649 
-00655   bool itemGetComposerotation (ZincItem * item);
-00656 
-00662   void itemSetComposescale (ZincItem * item, bool value);
-00663 
-00669   bool itemGetComposescale (ZincItem * item);
-00670 
-00676   void itemSetExtent (ZincItem * item, unsigned int value);
-00677 
-00683   unsigned int itemGetExtent (ZincItem * item);
-00684 
-00690   void itemSetFillcolor (ZincItem * item, String value);
-00691 
-00697   String itemGetFillcolor (ZincItem * item);
-00698 
-00704   void itemSetFilled (ZincItem * item, bool value);
-00705 
-00711   bool itemGetFilled (ZincItem * item);
-00712 
-00718   void itemSetFillpattern (ZincItem * item, ZincBitmap * value);
-00719 
-00725   ZincBitmap * itemGetFillpattern (ZincItem * item);
-00726 
-00732   void itemSetLinecolor (ZincItem * item, String value);
-00733 
-00739   String itemGetLinecolor (ZincItem * item);
-00740 
-00746   void itemSetLinepattern (ZincItem * item, ZincBitmap * value);
-00747 
-00753   ZincBitmap * itemGetLinepattern (ZincItem * item);
-00754 
-00760   void itemSetLinestyle (ZincItem * item, lineStyle value);
-00761 
-00767   lineStyle itemGetLinestyle (ZincItem * item);
-00768 
-00774   void itemSetLinewidth (ZincItem * item, double value);
-00775 
-00781   double itemGetLinewidth (ZincItem * item);
-00782 
-00788   void itemSetPieslice (ZincItem * item, bool value);
-00789 
-00795   bool itemGetPieslice (ZincItem * item);
-00796 
-00802   void itemSetPriority (ZincItem * item, unsigned int value);
-00803 
-00809   unsigned int itemGetPriority (ZincItem * item);
-00810 
-00816   void itemSetSensitive (ZincItem * item, bool value);
-00817 
-00823   bool itemGetSensitive (ZincItem * item);
-00824 
-00830   void itemSetStartangle (ZincItem * item, unsigned int value);
-00831 
-00837   unsigned int itemGetStartangle (ZincItem * item);
-00838 
-00844   void itemSetTile (ZincItem * item, ZincBitmap * value);
-00845 
-00851   ZincBitmap * itemGetTile (ZincItem * item);
-00852 
-00858   void itemSetVisible (ZincItem * item, bool value);
-00859 
-00865   bool itemGetVisible (ZincItem * item);
-00866 
-00872   void itemSetCapstyle (ZincItem * item, capStyle value);
-00873 
-00879   capStyle itemGetCapstyle (ZincItem * item);
-00880 
-00886   void itemSetFillrule (ZincItem * item, fillRule value);
-00887 
-00893   fillRule itemGetFillrule (ZincItem * item);
-00894 
-00900   void itemSetJoinstyle (ZincItem * item, joinStyle value);
-00901 
-00907   joinStyle itemGetJoinstyle (ZincItem * item);
-00908 
-00914   void itemSetRelief (ZincItem * item, relief value);
-00915 
-00921   relief itemGetRelief (ZincItem * item);
-00922 
-00928   void itemSetSmoothrelief (ZincItem * item, bool value);
-00929 
-00935   bool itemGetSmoothrelief (ZincItem * item);
-00936 
-00942   void itemSetAlpha (ZincItem * item, unsigned int value);
-00943 
-00949   unsigned int itemGetAlpha (ZincItem * item);
-00950 
-00956   void itemSetAtomic (ZincItem * item, bool value);
-00957 
-00963   bool itemGetAtomic (ZincItem * item);
-00964 
-00970   void itemSetClip (ZincItem * item, ZincItem * value);
-00971 
-00977   ZincItem * itemGetClip (ZincItem * item);
-00978 
-00984   void itemSetAnchor (ZincItem * item, anchor value);
-00985 
-00991   anchor itemGetAnchor (ZincItem * item);
-00992 
-00998   void itemSetColor (ZincItem * item, String value);
-00999 
-01005   String itemGetColor (ZincItem * item);
-01006 
-01012   void itemSetConnecteditem (ZincItem * item, ZincItem * value);
-01013 
-01019   ZincItem * itemGetConnecteditem (ZincItem * item);
-01020 
-01026   void itemSetConnectionanchor (ZincItem * item, anchor value);
-01027 
-01033   anchor itemGetConnectionanchor (ZincItem * item);
-01034 
-01040   void itemSetImage (ZincItem * item, ZincImage * value);
-01041 
-01047   ZincImage * itemGetImage (ZincItem * item);
-01048 
-01054   void itemSetMask (ZincItem * item, ZincBitmap * value);
-01055 
-01061   ZincBitmap * itemGetMask (ZincItem * item);
-01062 
-01068   void itemSetAlignment (ZincItem * item, alignment value);
-01069 
-01075   alignment itemGetAlignment (ZincItem * item);
-01076 
-01082   void itemSetFont (ZincItem * item, ZincFont * value);
-01083 
-01089   ZincFont * itemGetFont (ZincItem * item);
-01090 
-01096   void itemSetOverstriked (ZincItem * item, bool value);
-01097 
-01103   bool itemGetOverstriked (ZincItem * item);
-01104 
-01110   void itemSetSpacing (ZincItem * item, short value);
-01111 
-01117   short itemGetSpacing (ZincItem * item);
-01118 
-01124   void itemSetText (ZincItem * item, String value);
-01125 
-01131   String itemGetText (ZincItem * item);
-01132 
-01138   void itemSetUnderlined (ZincItem * item, bool value);
-01139 
-01145   bool itemGetUnderlined (ZincItem * item);
-01146 
-01152   void itemSetWidth (ZincItem * item, unsigned short value);
-01153 
-01159   unsigned short itemGetWidth (ZincItem * item);
-01160 
-01161 
-01162 /*******************************************************
-01163              END OF AUTOGENERATED METHODS
-01164 *******************************************************/
-01165 
-01172   void itemSetFirstend (ZincItem * item, double a, double b, double c);
-01173   
-01180   void itemGetFirstend (ZincItem * item, double *a, double *b, double *c);
-01181 
-01188   void itemSetLastend (ZincItem * item, double a, double b, double c);
-01189 
-01196   void itemGetLastend (ZincItem * item, double *a, double *b, double *c);
-01197 
-01204   void itemSetPosition (ZincItem * item, double x, double y);
-01205 
-01212   void itemGetPosition (ZincItem * item, double *x, double *y);
-01213 
-01219   ZincImage* createImageFromFile (String image);
-01220 
-01226   ZincImage* createImageFromData (String image);
-01227 
-01233   ZincBitmap* createBitmapFromFile (String image);
-01234 
-01240   ZincBitmap* createBitmapFromData (String image);
-01241 
-01247   ZincBitmap* createBitmapFromName (String image);
-01248 
-01256   ZincImage* createImageFromAGGBuffer (int width, int height, unsigned char *aggBuffer);
-01257 
-01258 
-01271   ZincFont* createFont (String family, int size, int bold = -1,
-01272                         int italic = -1, int underline = -1,
-01273                         int overstrike = -1);
-01274  
-01281   int getFontAscent (ZincFont* font);
-01282 
-01289   int getImageWidth (ZincImage *image);
-01290   
-01297   int getImageHeight (ZincImage *image);
-01298   
-01299 /*******************************************************
-01300                 STATIC PROCEDURES
-01301 *******************************************************/
-01302 
-01308   static void loadZinc (char *argv0) throw (ZincException);
-01309 
-01313   static void zincMainLoop ();
-01314 
-01315 /*******************************************************
-01316                errors management
-01317 *******************************************************/
-01325   static void z_tcl_call (int result, char* p_msg) throw (ZincException);
-01326 
-01337   void z_command (int count, char* p_msg) throw (ZincException);
-01338 
-01339 };
-01340 
-01341 #endif
-

Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/Zinc_8hpp.html b/zinclib.d/doc/html/Zinc_8hpp.html deleted file mode 100644 index 39512d1..0000000 --- a/zinclib.d/doc/html/Zinc_8hpp.html +++ /dev/null @@ -1,102 +0,0 @@ - - -IntuiKit: Zinc.hpp File Reference - - - - -

Zinc.hpp File Reference

-

-#include "ZincTypes.hpp"
-#include "ZincObjects.hpp"
-#include "ZincPath.hpp"
-#include "ZincExtern.hpp"
-#include <tcl.h>
- -

-Go to the source code of this file. - - - - - - - - - - - -

Compounds

class  Zinc

Variables

const int ZINC_POOL_COUNT = 7
const int ZINC_PARAM_COUNT = 10
const int DEFAULT_GROUP = 1
-


Variable Documentation

-

- - - - -
- - -
const int DEFAULT_GROUP = 1 -
-
- - - - - -
-   - - -

-Defaults zinc group

-

- - - - -
- - -
const int ZINC_PARAM_COUNT = 10 -
-
- - - - - -
-   - - -

-maximum number of parameter in a zinc function

-

- - - - -
- - -
const int ZINC_POOL_COUNT = 7 -
-
- - - - - -
-   - - -

-Number of objects in the pool

-


Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/annotated.html b/zinclib.d/doc/html/annotated.html deleted file mode 100644 index ab2e917..0000000 --- a/zinclib.d/doc/html/annotated.html +++ /dev/null @@ -1,23 +0,0 @@ - - -IntuiKit: Annotated Index - - - - -

IntuiKit Compound List

Here are the classes, structs, unions and interfaces with brief descriptions: - - - - - - - - -
Zinc
ZincBitmap
ZincEvent
ZincException
ZincFont
ZincImage
ZincItem
ZincPath
-
Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZinc-members.html b/zinclib.d/doc/html/classZinc-members.html deleted file mode 100644 index 7fb0036..0000000 --- a/zinclib.d/doc/html/classZinc-members.html +++ /dev/null @@ -1,191 +0,0 @@ - - -IntuiKit: Member List - - - - -

Zinc Member List

This is the complete list of members for Zinc, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addTag(ZincItem *item, String tag)Zinc
bbox(ZincItem *item, double bbox[4])Zinc
bind(String eventSpecification, ZincWidgetCallback callBack, void *userData, bool add=false)Zinc
bndCmdInfoZinc [static]
chggroup(ZincItem *item, ZincItem *parentGroup)Zinc
clone(ZincItem *item)Zinc
contour(ZincItem *item)Zinc
contour(ZincItem *item, itemOperator flag, ZincItem *reference)Zinc
contour(ZincItem *item, bool add, ZincPath *contour)Zinc
coords(ZincItem *item, ZincPath *contour, bool add, int contourIndex=-1, int coordIndex=-1)Zinc
coordsRemove(ZincItem *item, int coordIndex, int contourIndex=-1)Zinc
createBitmapFromData(String image)Zinc
createBitmapFromFile(String image)Zinc
createBitmapFromName(String image)Zinc
createFont(String family, int size, int bold=-1, int italic=-1, int underline=-1, int overstrike=-1)Zinc
createImageFromAGGBuffer(int width, int height, unsigned char *aggBuffer)Zinc
createImageFromData(String image)Zinc
createImageFromFile(String image)Zinc
createTag(String tag)Zinc
dTag(ZincItem *item, String tag=String(""))Zinc
fntCmdInfoZinc [static]
focCmdInfoZinc [static]
focus(ZincItem *item)Zinc
getBackcolor()Zinc
getBorderwidth()Zinc
getFont()Zinc
getFontAscent(ZincFont *font)Zinc
getForecolor()Zinc
getHeight()Zinc
getImageHeight(ZincImage *image)Zinc
getImageWidth(ZincImage *image)Zinc
getTags(ZincItem *item, String ***tagList)Zinc
getWidth()Zinc
gname(String gradient, String gname)Zinc
group(ZincItem *item)Zinc
idZinc
imgCmdInfoZinc [static]
interpZinc [static]
isGname(String gname)Zinc
itemBind(ZincItem *item, String eventSpecification, ZincItemCallback callBack, void *userData, bool add=false)Zinc
itemCreateArc(ZincItem *parentGroup, double x, double y, double width, double height)Zinc
itemCreateCurve(ZincItem *parentGroup, ZincPath *path)Zinc
itemCreateGroup(ZincItem *parentGroup)Zinc
itemCreateIcon(ZincItem *parentGroup, ZincImage *image)Zinc
itemCreateRectangle(ZincItem *parentGroup, double x, double y, double width, double height)Zinc
itemCreateText(ZincItem *parentGroup)Zinc
itemGetAlignment(ZincItem *item)Zinc
itemGetAlpha(ZincItem *item)Zinc
itemGetAnchor(ZincItem *item)Zinc
itemGetAtomic(ZincItem *item)Zinc
itemGetCapstyle(ZincItem *item)Zinc
itemGetClip(ZincItem *item)Zinc
itemGetClosed(ZincItem *item)Zinc
itemGetColor(ZincItem *item)Zinc
itemGetComposealpha(ZincItem *item)Zinc
itemGetComposerotation(ZincItem *item)Zinc
itemGetComposescale(ZincItem *item)Zinc
itemGetConnecteditem(ZincItem *item)Zinc
itemGetConnectionanchor(ZincItem *item)Zinc
itemGetExtent(ZincItem *item)Zinc
itemGetFillcolor(ZincItem *item)Zinc
itemGetFilled(ZincItem *item)Zinc
itemGetFillpattern(ZincItem *item)Zinc
itemGetFillrule(ZincItem *item)Zinc
itemGetFirstend(ZincItem *item, double *a, double *b, double *c)Zinc
itemGetFont(ZincItem *item)Zinc
itemGetImage(ZincItem *item)Zinc
itemGetJoinstyle(ZincItem *item)Zinc
itemGetLastend(ZincItem *item, double *a, double *b, double *c)Zinc
itemGetLinecolor(ZincItem *item)Zinc
itemGetLinepattern(ZincItem *item)Zinc
itemGetLinestyle(ZincItem *item)Zinc
itemGetLinewidth(ZincItem *item)Zinc
itemGetMask(ZincItem *item)Zinc
itemGetOverstriked(ZincItem *item)Zinc
itemGetPieslice(ZincItem *item)Zinc
itemGetPosition(ZincItem *item, double *x, double *y)Zinc
itemGetPriority(ZincItem *item)Zinc
itemGetRelief(ZincItem *item)Zinc
itemGetSensitive(ZincItem *item)Zinc
itemGetSmoothrelief(ZincItem *item)Zinc
itemGetSpacing(ZincItem *item)Zinc
itemGetStartangle(ZincItem *item)Zinc
itemGetText(ZincItem *item)Zinc
itemGetTile(ZincItem *item)Zinc
itemGetTransformation(ZincItem *item, double *a, double *b, double *c, double *d, double *e, double *f)Zinc
itemGetUnderlined(ZincItem *item)Zinc
itemGetVisible(ZincItem *item)Zinc
itemGetWidth(ZincItem *item)Zinc
itemMatrix(ZincItem *item, double a, double b, double c, double d, double e, double f)Zinc
itemRemove(ZincItem *item)Zinc
itemResetTransformation(ZincItem *item)Zinc
itemRotate(ZincItem *item, double angle)Zinc
itemRotate(ZincItem *item, double angle, double x, double y)Zinc
itemRotate(ZincItem *item, double angle, bool degree)Zinc
itemRotate(ZincItem *item, double angle, double x, double y, bool degree)Zinc
itemScale(ZincItem *item, double ax, double ay)Zinc
itemScale(ZincItem *item, double ax, double ay, double cx, double cy)Zinc
itemSetAlignment(ZincItem *item, alignment value)Zinc
itemSetAlpha(ZincItem *item, unsigned int value)Zinc
itemSetAnchor(ZincItem *item, anchor value)Zinc
itemSetAtomic(ZincItem *item, bool value)Zinc
itemSetCapstyle(ZincItem *item, capStyle value)Zinc
itemSetClip(ZincItem *item, ZincItem *value)Zinc
itemSetClosed(ZincItem *item, bool value)Zinc
itemSetColor(ZincItem *item, String value)Zinc
itemSetComposealpha(ZincItem *item, bool value)Zinc
itemSetComposerotation(ZincItem *item, bool value)Zinc
itemSetComposescale(ZincItem *item, bool value)Zinc
itemSetConnecteditem(ZincItem *item, ZincItem *value)Zinc
itemSetConnectionanchor(ZincItem *item, anchor value)Zinc
itemSetExtent(ZincItem *item, unsigned int value)Zinc
itemSetFillcolor(ZincItem *item, String value)Zinc
itemSetFilled(ZincItem *item, bool value)Zinc
itemSetFillpattern(ZincItem *item, ZincBitmap *value)Zinc
itemSetFillrule(ZincItem *item, fillRule value)Zinc
itemSetFirstend(ZincItem *item, double a, double b, double c)Zinc
itemSetFont(ZincItem *item, ZincFont *value)Zinc
itemSetImage(ZincItem *item, ZincImage *value)Zinc
itemSetJoinstyle(ZincItem *item, joinStyle value)Zinc
itemSetLastend(ZincItem *item, double a, double b, double c)Zinc
itemSetLinecolor(ZincItem *item, String value)Zinc
itemSetLinepattern(ZincItem *item, ZincBitmap *value)Zinc
itemSetLinestyle(ZincItem *item, lineStyle value)Zinc
itemSetLinewidth(ZincItem *item, double value)Zinc
itemSetMask(ZincItem *item, ZincBitmap *value)Zinc
itemSetOverstriked(ZincItem *item, bool value)Zinc
itemSetPieslice(ZincItem *item, bool value)Zinc
itemSetPosition(ZincItem *item, double x, double y)Zinc
itemSetPriority(ZincItem *item, unsigned int value)Zinc
itemSetRelief(ZincItem *item, relief value)Zinc
itemSetSensitive(ZincItem *item, bool value)Zinc
itemSetSmoothrelief(ZincItem *item, bool value)Zinc
itemSetSpacing(ZincItem *item, short value)Zinc
itemSetStartangle(ZincItem *item, unsigned int value)Zinc
itemSetText(ZincItem *item, String value)Zinc
itemSetTile(ZincItem *item, ZincBitmap *value)Zinc
itemSetTransformation(ZincItem *item, double a, double b, double c, double d, double e, double f)Zinc
itemSetUnderlined(ZincItem *item, bool value)Zinc
itemSetVisible(ZincItem *item, bool value)Zinc
itemSetWidth(ZincItem *item, unsigned short value)Zinc
itemSkew(ZincItem *item, double sx, double sy)Zinc
itemSkewX(ZincItem *item, double sx)Zinc
itemSkewY(ZincItem *item, double sy)Zinc
itemTranslate(ZincItem *item, double dx, double dy)Zinc
itemTranslate(ZincItem *item, double x, double y, bool absolute)Zinc
itemUnbind(ZincItem *item, String eventSpecification)Zinc
loadZinc(char *argv0)Zinc [static]
lower(ZincItem *item)Zinc
lower(ZincItem *item, ZincItem *belowThis)Zinc
objCmdZinc
p1Zinc [static]
p2Zinc [static]
poolZinc [static]
raise(ZincItem *item)Zinc
raise(ZincItem *item, ZincItem *aboveThis)Zinc
relativeBbox(ZincItem *item, double bbox[4])Zinc
setBackcolor(String value)Zinc
setBorderwidth(int value)Zinc
setFont(ZincFont *value)Zinc
setForecolor(String value)Zinc
setHeight(int value)Zinc
setTitle(String title)Zinc
setWidth(int value)Zinc
tclCbZinc
type(ZincItem *item)Zinc
unbind(String eventSpecification)Zinc
wiZinc
windowZinc
z_command(int count, char *p_msg)Zinc
z_tcl_call(int result, char *p_msg)Zinc [static]
Zinc(int renderingMode)Zinc
zincMainLoop()Zinc [static]
ZincPath classZinc [friend]
znCountZinc [static]
znIdZinc
~Zinc()Zinc

Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZinc.html b/zinclib.d/doc/html/classZinc.html deleted file mode 100644 index 50f0263..0000000 --- a/zinclib.d/doc/html/classZinc.html +++ /dev/null @@ -1,7569 +0,0 @@ - - -IntuiKit: Zinc class Reference - - - - -

Zinc Class Reference

#include <Zinc.hpp> -

-List of all members.


Detailed Description

-This class contains a zinc widget and members to create and modify items -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

 Zinc (int renderingMode)
 ~Zinc ()
void setTitle (String title)
void setBackcolor (String value)
String getBackcolor ()
void setForecolor (String value)
String getForecolor ()
void setWidth (int value)
int getWidth ()
void setHeight (int value)
int getHeight ()
void setBorderwidth (int value)
int getBorderwidth ()
void setFont (ZincFont *value)
ZincFontgetFont ()
void bbox (ZincItem *item, double bbox[4])
void relativeBbox (ZincItem *item, double bbox[4])
void chggroup (ZincItem *item, ZincItem *parentGroup)
ZincItemclone (ZincItem *item)
int contour (ZincItem *item)
int contour (ZincItem *item, itemOperator flag, ZincItem *reference)
int contour (ZincItem *item, bool add, ZincPath *contour)
void coords (ZincItem *item, ZincPath *contour, bool add, int contourIndex=-1, int coordIndex=-1)
void coordsRemove (ZincItem *item, int coordIndex, int contourIndex=-1)
void addTag (ZincItem *item, String tag)
void dTag (ZincItem *item, String tag=String(""))
int getTags (ZincItem *item, String ***tagList)
void focus (ZincItem *item)
bool isGname (String gname)
void gname (String gradient, String gname)
ZincItemgroup (ZincItem *item)
void lower (ZincItem *item)
void lower (ZincItem *item, ZincItem *belowThis)
void raise (ZincItem *item)
void raise (ZincItem *item, ZincItem *aboveThis)
itemType type (ZincItem *item)
ZincItemcreateTag (String tag)
void itemRemove (ZincItem *item)
ZincItemitemCreateGroup (ZincItem *parentGroup)
ZincItemitemCreateRectangle (ZincItem *parentGroup, double x, double y, double width, double height)
ZincItemitemCreateArc (ZincItem *parentGroup, double x, double y, double width, double height)
ZincItemitemCreateText (ZincItem *parentGroup)
ZincItemitemCreateCurve (ZincItem *parentGroup, ZincPath *path)
ZincItemitemCreateIcon (ZincItem *parentGroup, ZincImage *image)
void bind (String eventSpecification, ZincWidgetCallback callBack, void *userData, bool add=false)
void unbind (String eventSpecification)
void itemBind (ZincItem *item, String eventSpecification, ZincItemCallback callBack, void *userData, bool add=false)
void itemUnbind (ZincItem *item, String eventSpecification)
void itemTranslate (ZincItem *item, double dx, double dy)
void itemTranslate (ZincItem *item, double x, double y, bool absolute)
void itemRotate (ZincItem *item, double angle)
void itemRotate (ZincItem *item, double angle, double x, double y)
void itemRotate (ZincItem *item, double angle, bool degree)
void itemRotate (ZincItem *item, double angle, double x, double y, bool degree)
void itemScale (ZincItem *item, double ax, double ay)
void itemScale (ZincItem *item, double ax, double ay, double cx, double cy)
void itemSkew (ZincItem *item, double sx, double sy)
void itemSkewX (ZincItem *item, double sx)
void itemSkewY (ZincItem *item, double sy)
void itemResetTransformation (ZincItem *item)
void itemSetTransformation (ZincItem *item, double a, double b, double c, double d, double e, double f)
void itemGetTransformation (ZincItem *item, double *a, double *b, double *c, double *d, double *e, double *f)
void itemMatrix (ZincItem *item, double a, double b, double c, double d, double e, double f)
void itemSetClosed (ZincItem *item, bool value)
bool itemGetClosed (ZincItem *item)
void itemSetComposealpha (ZincItem *item, bool value)
bool itemGetComposealpha (ZincItem *item)
void itemSetComposerotation (ZincItem *item, bool value)
bool itemGetComposerotation (ZincItem *item)
void itemSetComposescale (ZincItem *item, bool value)
bool itemGetComposescale (ZincItem *item)
void itemSetExtent (ZincItem *item, unsigned int value)
unsigned int itemGetExtent (ZincItem *item)
void itemSetFillcolor (ZincItem *item, String value)
String itemGetFillcolor (ZincItem *item)
void itemSetFilled (ZincItem *item, bool value)
bool itemGetFilled (ZincItem *item)
void itemSetFillpattern (ZincItem *item, ZincBitmap *value)
ZincBitmapitemGetFillpattern (ZincItem *item)
void itemSetLinecolor (ZincItem *item, String value)
String itemGetLinecolor (ZincItem *item)
void itemSetLinepattern (ZincItem *item, ZincBitmap *value)
ZincBitmapitemGetLinepattern (ZincItem *item)
void itemSetLinestyle (ZincItem *item, lineStyle value)
lineStyle itemGetLinestyle (ZincItem *item)
void itemSetLinewidth (ZincItem *item, double value)
double itemGetLinewidth (ZincItem *item)
void itemSetPieslice (ZincItem *item, bool value)
bool itemGetPieslice (ZincItem *item)
void itemSetPriority (ZincItem *item, unsigned int value)
unsigned int itemGetPriority (ZincItem *item)
void itemSetSensitive (ZincItem *item, bool value)
bool itemGetSensitive (ZincItem *item)
void itemSetStartangle (ZincItem *item, unsigned int value)
unsigned int itemGetStartangle (ZincItem *item)
void itemSetTile (ZincItem *item, ZincBitmap *value)
ZincBitmapitemGetTile (ZincItem *item)
void itemSetVisible (ZincItem *item, bool value)
bool itemGetVisible (ZincItem *item)
void itemSetCapstyle (ZincItem *item, capStyle value)
capStyle itemGetCapstyle (ZincItem *item)
void itemSetFillrule (ZincItem *item, fillRule value)
fillRule itemGetFillrule (ZincItem *item)
void itemSetJoinstyle (ZincItem *item, joinStyle value)
joinStyle itemGetJoinstyle (ZincItem *item)
void itemSetRelief (ZincItem *item, relief value)
relief itemGetRelief (ZincItem *item)
void itemSetSmoothrelief (ZincItem *item, bool value)
bool itemGetSmoothrelief (ZincItem *item)
void itemSetAlpha (ZincItem *item, unsigned int value)
unsigned int itemGetAlpha (ZincItem *item)
void itemSetAtomic (ZincItem *item, bool value)
bool itemGetAtomic (ZincItem *item)
void itemSetClip (ZincItem *item, ZincItem *value)
ZincItemitemGetClip (ZincItem *item)
void itemSetAnchor (ZincItem *item, anchor value)
anchor itemGetAnchor (ZincItem *item)
void itemSetColor (ZincItem *item, String value)
String itemGetColor (ZincItem *item)
void itemSetConnecteditem (ZincItem *item, ZincItem *value)
ZincItemitemGetConnecteditem (ZincItem *item)
void itemSetConnectionanchor (ZincItem *item, anchor value)
anchor itemGetConnectionanchor (ZincItem *item)
void itemSetImage (ZincItem *item, ZincImage *value)
ZincImageitemGetImage (ZincItem *item)
void itemSetMask (ZincItem *item, ZincBitmap *value)
ZincBitmapitemGetMask (ZincItem *item)
void itemSetAlignment (ZincItem *item, alignment value)
alignment itemGetAlignment (ZincItem *item)
void itemSetFont (ZincItem *item, ZincFont *value)
ZincFontitemGetFont (ZincItem *item)
void itemSetOverstriked (ZincItem *item, bool value)
bool itemGetOverstriked (ZincItem *item)
void itemSetSpacing (ZincItem *item, short value)
short itemGetSpacing (ZincItem *item)
void itemSetText (ZincItem *item, String value)
String itemGetText (ZincItem *item)
void itemSetUnderlined (ZincItem *item, bool value)
bool itemGetUnderlined (ZincItem *item)
void itemSetWidth (ZincItem *item, unsigned short value)
unsigned short itemGetWidth (ZincItem *item)
void itemSetFirstend (ZincItem *item, double a, double b, double c)
void itemGetFirstend (ZincItem *item, double *a, double *b, double *c)
void itemSetLastend (ZincItem *item, double a, double b, double c)
void itemGetLastend (ZincItem *item, double *a, double *b, double *c)
void itemSetPosition (ZincItem *item, double x, double y)
void itemGetPosition (ZincItem *item, double *x, double *y)
ZincImagecreateImageFromFile (String image)
ZincImagecreateImageFromData (String image)
ZincBitmapcreateBitmapFromFile (String image)
ZincBitmapcreateBitmapFromData (String image)
ZincBitmapcreateBitmapFromName (String image)
ZincImagecreateImageFromAGGBuffer (int width, int height, unsigned char *aggBuffer)
ZincFontcreateFont (String family, int size, int bold=-1, int italic=-1, int underline=-1, int overstrike=-1)
int getFontAscent (ZincFont *font)
int getImageWidth (ZincImage *image)
int getImageHeight (ZincImage *image)
void z_command (int count, char *p_msg) throw (ZincException)

Static Public Member Functions

void loadZinc (char *argv0) throw (ZincException)
void zincMainLoop ()
void z_tcl_call (int result, char *p_msg) throw (ZincException)

Public Attributes

Tcl_Obj * id
 the id of this object

WidgetObjCmd objCmd
 the command associated with this object

ClientData wi
 the zinc object itself

String tclCb
 name of the binding callback

int znId
 the znCount at creation time

String window
 the window which contains the widget


Static Public Attributes

int znCount = 0
 count to create unique ids

Tcl_CmdInfo imgCmdInfo
 the command associated with image

Tcl_CmdInfo fntCmdInfo
 the command associated with font

Tcl_CmdInfo focCmdInfo
 the command associated with fous

Tcl_CmdInfo bndCmdInfo
 the command associated with bind

Tcl_Obj * pool [ZINC_POOL_COUNT]
 a pool of tclobj ready to be used

Tcl_Obj * p1 [ZINC_PARAM_COUNT]
 table of pointeur use for parameters

Tcl_Obj * p2 [ZINC_PARAM_COUNT]
 table of pointeur use for parameters

Tcl_Interp * interp
 the tcl interpreter


Friends

class ZincPath
-


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - -
Zinc::Zinc int  renderingMode  ) 
-
- - - - - -
-   - - -

-The public constructor

-

Parameters:
- - -
renderingMode ZINC_BACKEND_X11 or ZINC_BACKEND_OPENGL
-
-
-

- - - - -
- - - - - - - - - -
Zinc::~Zinc  ) 
-
- - - - - -
-   - - -

-The public destructor

-


Member Function Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::addTag ZincItem item,
String  tag
-
- - - - - -
-   - - -

-Add a tag to an item

-

Parameters:
- - - -
item the item to add tag to
tag a tag to add
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::bbox ZincItem item,
double  bbox[4]
-
- - - - - -
-   - - -

-Get the bounding box of an item

-

Parameters:
- - - -
item the item to get bbox
bbox a table where we'll put the bounding box bbox[0] = x0, bbox[1] = y0, bbox[2] = xc, bbox[3] = yc
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::bind String  eventSpecification,
ZincWidgetCallback  callBack,
void *  userData,
bool  add = false
-
- - - - - -
-   - - -

-Bind a function to an event on the zinc widget

-

Parameters:
- - - - - -
eventSpecification tcl style event specicication
callBack the function which will be called back
userData data we will give back to the callback when called
add false to replace existing bind or true to add
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::chggroup ZincItem item,
ZincItem parentGroup
-
- - - - - -
-   - - -

-Change the group of an item

-

Parameters:
- - - -
item the item to move
parentGroup new group for the item
-
-
-

- - - - -
- - - - - - - - - - -
ZincItem * Zinc::clone ZincItem item  ) 
-
- - - - - -
-   - - -

-Clone an item

-

Parameters:
- - -
item the item to clone
-
-
Returns:
the cloned item
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
int Zinc::contour ZincItem item,
bool  add,
ZincPath contour
-
- - - - - -
-   - - -

-Set the contour of an item

-

Parameters:
- - - - -
item the item on which we set the contour
add true to add a path, false to remove
reference the new contour
-
-
Returns:
the number of contour
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
int Zinc::contour ZincItem item,
itemOperator  flag,
ZincItem reference
-
- - - - - -
-   - - -

-Set the contour of an item to the one of an other

-

Parameters:
- - - - -
item the item on which we set the contour
flag the operation to do on the contour
reference the item to set contour from
-
-
Returns:
the number of contour
-
-

- - - - -
- - - - - - - - - - -
int Zinc::contour ZincItem item  ) 
-
- - - - - -
-   - - -

-Get the number of contour of an item

-

Returns:
number of contour
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::coords ZincItem item,
ZincPath contour,
bool  add,
int  contourIndex = -1,
int  coordIndex = -1
-
- - - - - -
-   - - -

-Set or modify the coordinates of an item

-

Parameters:
- - - - - - -
item the item to modify
contour new coords for the item
add true to add coords, false to replace
contourIndex the contour do modify
coordIndex the coordinate to modify (WARNING, path must be one point if the is not the default)
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::coordsRemove ZincItem item,
int  coordIndex,
int  contourIndex = -1
-
- - - - - -
-   - - -

-Remove coords of an item

-

Parameters:
- - - - -
item the item to modify
coordIndex the coordinate to rmove
contourIndex the contour on which we remove
-
-
-

- - - - -
- - - - - - - - - - -
ZincBitmap * Zinc::createBitmapFromData String  image  ) 
-
- - - - - -
-   - - -

-Create a bitmap object base64 data

-

Parameters:
- - -
image the bitmap reference (a base64 String or binary data)
-
-
-

- - - - -
- - - - - - - - - - -
ZincBitmap * Zinc::createBitmapFromFile String  image  ) 
-
- - - - - -
-   - - -

-Create a bitmap object from a file

-

Parameters:
- - -
image the bitmap reference (a file name)
-
-
-

- - - - -
- - - - - - - - - - -
ZincBitmap * Zinc::createBitmapFromName String  image  ) 
-
- - - - - -
-   - - -

-Create a bitmap object using a predefined name

-

Parameters:
- - -
image the bitmap reference (a name)
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ZincFont * Zinc::createFont String  family,
int  size,
int  bold = -1,
int  italic = -1,
int  underline = -1,
int  overstrike = -1
-
- - - - - -
-   - - -

-Create a font object

-

Parameters:
- - - - - - - -
family the font mamily
size if a positive number, it is in points, if a negative number, its absolute value is a size in pixels.
bold 1 for a bold font, 0 for a normal font, -1 for unspecified
italic 1 an italic font, 0 for a roman font, -1 for unspecified
underline 1 for an underlined, 0 for a normal font, -1 for unspecified
overstrike 1 for an overstriked font, 0 for a normal font, -1 for unspecified
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
ZincImage * Zinc::createImageFromAGGBuffer int  width,
int  height,
unsigned char *  aggBuffer
-
- - - - - -
-   - - -

-Create an image object

-

Parameters:
- - - - -
width Width of image
height Height of image
aggBuffer An AGG buffer
-
-
-

- - - - -
- - - - - - - - - - -
ZincImage * Zinc::createImageFromData String  image  ) 
-
- - - - - -
-   - - -

-Create an image object using base64 data

-

Parameters:
- - -
image the image reference (a base64 String or binary data)
-
-
-

- - - - -
- - - - - - - - - - -
ZincImage * Zinc::createImageFromFile String  image  ) 
-
- - - - - -
-   - - -

-Create an image object from a file

-

Parameters:
- - -
image the image reference (a file name)
-
-
-

- - - - -
- - - - - - - - - - -
ZincItem * Zinc::createTag String  tag  ) 
-
- - - - - -
-   - - -

-Create a Zinc Tag that can be used in place of any item for zinc functions that must be called using tagOrId

-

Parameters:
- - -
tag the text of the tag
-
-
Returns:
a tag item
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::dTag ZincItem item,
String  tag = String("")
-
- - - - - -
-   - - -

-Remove a tag from an item

-

Parameters:
- - - -
item the item to remove tag from
tag a tag to remove (nothing to remove all tags)
-
-
-

- - - - -
- - - - - - - - - - -
void Zinc::focus ZincItem item  ) 
-
- - - - - -
-   - - -

-Set the focus to an item

-

Parameters:
- - -
item the item to set the focus to
-
-
-

- - - - -
- - - - - - - - - -
String Zinc::getBackcolor  ) 
-
- - - - - -
-   - - -

-Call zinc->cget ( -backcolor )

-

Returns:
backcolor value
-
-

- - - - -
- - - - - - - - - -
int Zinc::getBorderwidth  ) 
-
- - - - - -
-   - - -

-Call zinc->cget ( -borderwidth )

-

Returns:
borderwidth value
-
-

- - - - -
- - - - - - - - - -
ZincFont * Zinc::getFont  ) 
-
- - - - - -
-   - - -

-Call zinc->cget ( -font )

-

Returns:
font value
-
-

- - - - -
- - - - - - - - - - -
int Zinc::getFontAscent ZincFont font  ) 
-
- - - - - -
-   - - -

-Get font ascent

-

Parameters:
- - -
font the font
-
-
Returns:
the font ascent
-
-

- - - - -
- - - - - - - - - -
String Zinc::getForecolor  ) 
-
- - - - - -
-   - - -

-Call zinc->cget ( -forecolor )

-

Returns:
forecolor value
-
-

- - - - -
- - - - - - - - - -
int Zinc::getHeight  ) 
-
- - - - - -
-   - - -

-Call zinc->cget ( -height )

-

Returns:
height value
-
-

- - - - -
- - - - - - - - - - -
int Zinc::getImageHeight ZincImage image  ) 
-
- - - - - -
-   - - -

-Get Image height

-

Parameters:
- - -
ZincImage the image to get height from
-
-
Returns:
the height of the image
-
-

- - - - -
- - - - - - - - - - -
int Zinc::getImageWidth ZincImage image  ) 
-
- - - - - -
-   - - -

-Get Image width

-

Parameters:
- - -
ZincImage the image to get width from
-
-
Returns:
the width of the image
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
int Zinc::getTags ZincItem item,
String ***  tagList
-
- - - - - -
-   - - -

-List all tags of an item It's up to the caller to delete the resulting table and strings

-

Parameters:
- - - -
item the item to list tag from
lagList a pointer to a table of String containing tags
-
-
Returns:
the number of tags
-
-

- - - - -
- - - - - - - - - -
int Zinc::getWidth  ) 
-
- - - - - -
-   - - -

-Call zinc->cget ( -width )

-

Returns:
width value
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::gname String  gradient,
String  gname
-
- - - - - -
-   - - -

-Create a named gradient

-

Parameters:
- - - -
gradient a gradient
gname a gradient name
-
-
-

- - - - -
- - - - - - - - - - -
ZincItem * Zinc::group ZincItem item  ) 
-
- - - - - -
-   - - -

-Retreive the group of an item

-

Parameters:
- - -
item the item to get the group from
-
-
Returns:
the group
-
-

- - - - -
- - - - - - - - - - -
bool Zinc::isGname String  gname  ) 
-
- - - - - -
-   - - -

-Tell if the name is a gradient name

-

Parameters:
- - -
gname a gradient name
-
-
Returns:
true if the name is a gradient name, false otherwise
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemBind ZincItem item,
String  eventSpecification,
ZincItemCallback  callBack,
void *  userData,
bool  add = false
-
- - - - - -
-   - - -

-Bind a function to an event on an item

-

Parameters:
- - - - - - -
item the item on which to bind
eventSpecification tcl style event specicication
callBack the function which will be called back
userData data we will give back to the callback when called
add false to replace existing bind or true to add
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ZincItem * Zinc::itemCreateArc ZincItem parentGroup,
double  x,
double  y,
double  width,
double  height
-
- - - - - -
-   - - -

-Create an arc item

-

Parameters:
- - - -
parentGroup group where we'll put it
x y width height the coordinates of the new rectangle
-
-
Returns:
the arc item
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
ZincItem * Zinc::itemCreateCurve ZincItem parentGroup,
ZincPath path
-
- - - - - -
-   - - -

-Create a curve item

-

Parameters:
- - - -
parentGroup group where we'll put it
path the path to display
-
-
Returns:
the curve item
-
-

- - - - -
- - - - - - - - - - -
ZincItem * Zinc::itemCreateGroup ZincItem parentGroup  ) 
-
- - - - - -
-   - - -

-Create a group item

-

Parameters:
- - -
parentGroup group where we'll put the new group, if NULL we create in the defaults group
-
-
Returns:
the group item
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
ZincItem * Zinc::itemCreateIcon ZincItem parentGroup,
ZincImage image
-
- - - - - -
-   - - -

-Create an icon item

-

Parameters:
- - - -
parentGroup group where we'll put it
image a zincImage to display
-
-
Returns:
the icon item
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ZincItem * Zinc::itemCreateRectangle ZincItem parentGroup,
double  x,
double  y,
double  width,
double  height
-
- - - - - -
-   - - -

-Create a rectangle item

-

Parameters:
- - - -
parentGroup group where we'll put it
x y width height the coordinates of the new rectangle
-
-
Returns:
the rectangle item
-
-

- - - - -
- - - - - - - - - - -
ZincItem * Zinc::itemCreateText ZincItem parentGroup  ) 
-
- - - - - -
-   - - -

-Create a text item

-

Parameters:
- - -
parentGroup group where we'll put it
-
-
Returns:
the text item
-
-

- - - - -
- - - - - - - - - - -
alignment Zinc::itemGetAlignment ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -alignment )

Parameters:
- - -
item the item to get alignment from
-
-
Returns:
alignment value
-
-

- - - - -
- - - - - - - - - - -
unsigned int Zinc::itemGetAlpha ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -alpha )

Parameters:
- - -
item the item to get alpha from
-
-
Returns:
alpha value
-
-

- - - - -
- - - - - - - - - - -
anchor Zinc::itemGetAnchor ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -anchor )

Parameters:
- - -
item the item to get anchor from
-
-
Returns:
anchor value
-
-

- - - - -
- - - - - - - - - - -
bool Zinc::itemGetAtomic ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -atomic )

Parameters:
- - -
item the item to get atomic from
-
-
Returns:
atomic value
-
-

- - - - -
- - - - - - - - - - -
capStyle Zinc::itemGetCapstyle ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -capstyle )

Parameters:
- - -
item the item to get capstyle from
-
-
Returns:
capstyle value
-
-

- - - - -
- - - - - - - - - - -
ZincItem * Zinc::itemGetClip ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -clip )

Parameters:
- - -
item the item to get clip from
-
-
Returns:
clip value
-
-

- - - - -
- - - - - - - - - - -
bool Zinc::itemGetClosed ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -closed )

Parameters:
- - -
item the item to get closed from
-
-
Returns:
closed value
-
-

- - - - -
- - - - - - - - - - -
String Zinc::itemGetColor ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -color )

Parameters:
- - -
item the item to get color from
-
-
Returns:
color value
-
-

- - - - -
- - - - - - - - - - -
bool Zinc::itemGetComposealpha ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -composealpha )

Parameters:
- - -
item the item to get composealpha from
-
-
Returns:
composealpha value
-
-

- - - - -
- - - - - - - - - - -
bool Zinc::itemGetComposerotation ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -composerotation )

Parameters:
- - -
item the item to get composerotation from
-
-
Returns:
composerotation value
-
-

- - - - -
- - - - - - - - - - -
bool Zinc::itemGetComposescale ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -composescale )

Parameters:
- - -
item the item to get composescale from
-
-
Returns:
composescale value
-
-

- - - - -
- - - - - - - - - - -
ZincItem * Zinc::itemGetConnecteditem ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -connecteditem )

Parameters:
- - -
item the item to get connecteditem from
-
-
Returns:
connecteditem value
-
-

- - - - -
- - - - - - - - - - -
anchor Zinc::itemGetConnectionanchor ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -connectionanchor )

Parameters:
- - -
item the item to get connectionanchor from
-
-
Returns:
connectionanchor value
-
-

- - - - -
- - - - - - - - - - -
unsigned int Zinc::itemGetExtent ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -extent )

Parameters:
- - -
item the item to get extent from
-
-
Returns:
extent value
-
-

- - - - -
- - - - - - - - - - -
String Zinc::itemGetFillcolor ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -fillcolor )

Parameters:
- - -
item the item to get fillcolor from
-
-
Returns:
fillcolor value
-
-

- - - - -
- - - - - - - - - - -
bool Zinc::itemGetFilled ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -filled )

Parameters:
- - -
item the item to get filled from
-
-
Returns:
filled value
-
-

- - - - -
- - - - - - - - - - -
ZincBitmap * Zinc::itemGetFillpattern ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -fillpattern )

Parameters:
- - -
item the item to get fillpattern from
-
-
Returns:
fillpattern value
-
-

- - - - -
- - - - - - - - - - -
fillRule Zinc::itemGetFillrule ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -fillrule )

Parameters:
- - -
item the item to get fillrule from
-
-
Returns:
fillrule value
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemGetFirstend ZincItem item,
double *  a,
double *  b,
double *  c
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -firstend )

-

Parameters:
- - - -
item the item to get firstend from
a,b,c values used to sedwhere we'll put end
-
-
-

- - - - -
- - - - - - - - - - -
ZincFont * Zinc::itemGetFont ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -font )

Parameters:
- - -
item the item to get font from
-
-
Returns:
font value
-
-

- - - - -
- - - - - - - - - - -
ZincImage * Zinc::itemGetImage ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -image )

Parameters:
- - -
item the item to get image from
-
-
Returns:
image value
-
-

- - - - -
- - - - - - - - - - -
joinStyle Zinc::itemGetJoinstyle ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -joinstyle )

Parameters:
- - -
item the item to get joinstyle from
-
-
Returns:
joinstyle value
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemGetLastend ZincItem item,
double *  a,
double *  b,
double *  c
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -lastend )

-

Parameters:
- - - -
item the item to get lastend from
a,b,c values used to sedwhere we'll put end
-
-
-

- - - - -
- - - - - - - - - - -
String Zinc::itemGetLinecolor ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -linecolor )

Parameters:
- - -
item the item to get linecolor from
-
-
Returns:
linecolor value
-
-

- - - - -
- - - - - - - - - - -
ZincBitmap * Zinc::itemGetLinepattern ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -linepattern )

Parameters:
- - -
item the item to get linepattern from
-
-
Returns:
linepattern value
-
-

- - - - -
- - - - - - - - - - -
lineStyle Zinc::itemGetLinestyle ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -linestyle )

Parameters:
- - -
item the item to get linestyle from
-
-
Returns:
linestyle value
-
-

- - - - -
- - - - - - - - - - -
double Zinc::itemGetLinewidth ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -linewidth )

Parameters:
- - -
item the item to get linewidth from
-
-
Returns:
linewidth value
-
-

- - - - -
- - - - - - - - - - -
ZincBitmap * Zinc::itemGetMask ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -mask )

Parameters:
- - -
item the item to get mask from
-
-
Returns:
mask value
-
-

- - - - -
- - - - - - - - - - -
bool Zinc::itemGetOverstriked ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -overstriked )

Parameters:
- - -
item the item to get overstriked from
-
-
Returns:
overstriked value
-
-

- - - - -
- - - - - - - - - - -
bool Zinc::itemGetPieslice ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -pieslice )

Parameters:
- - -
item the item to get pieslice from
-
-
Returns:
pieslice value
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemGetPosition ZincItem item,
double *  x,
double *  y
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -position )

-

Parameters:
- - - -
item the item to get position from
x,y position
-
-
-

- - - - -
- - - - - - - - - - -
unsigned int Zinc::itemGetPriority ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -priority )

Parameters:
- - -
item the item to get priority from
-
-
Returns:
priority value
-
-

- - - - -
- - - - - - - - - - -
relief Zinc::itemGetRelief ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -relief )

Parameters:
- - -
item the item to get relief from
-
-
Returns:
relief value
-
-

- - - - -
- - - - - - - - - - -
bool Zinc::itemGetSensitive ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -sensitive )

Parameters:
- - -
item the item to get sensitive from
-
-
Returns:
sensitive value
-
-

- - - - -
- - - - - - - - - - -
bool Zinc::itemGetSmoothrelief ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -smoothrelief )

Parameters:
- - -
item the item to get smoothrelief from
-
-
Returns:
smoothrelief value
-
-

- - - - -
- - - - - - - - - - -
short Zinc::itemGetSpacing ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -spacing )

Parameters:
- - -
item the item to get spacing from
-
-
Returns:
spacing value
-
-

- - - - -
- - - - - - - - - - -
unsigned int Zinc::itemGetStartangle ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -startangle )

Parameters:
- - -
item the item to get startangle from
-
-
Returns:
startangle value
-
-

- - - - -
- - - - - - - - - - -
String Zinc::itemGetText ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -text )

Parameters:
- - -
item the item to get text from
-
-
Returns:
text value
-
-

- - - - -
- - - - - - - - - - -
ZincBitmap * Zinc::itemGetTile ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -tile )

Parameters:
- - -
item the item to get tile from
-
-
Returns:
tile value
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemGetTransformation ZincItem item,
double *  a,
double *  b,
double *  c,
double *  d,
double *  e,
double *  f
-
- - - - - -
-   - - -

-Get current transform matrix

-

Parameters:
- - - -
item the item to which we apply the transform
a,b,c,d,e,f places where we'll put the transform matrix
-
-
-

- - - - -
- - - - - - - - - - -
bool Zinc::itemGetUnderlined ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -underlined )

Parameters:
- - -
item the item to get underlined from
-
-
Returns:
underlined value
-
-

- - - - -
- - - - - - - - - - -
bool Zinc::itemGetVisible ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -visible )

Parameters:
- - -
item the item to get visible from
-
-
Returns:
visible value
-
-

- - - - -
- - - - - - - - - - -
unsigned short Zinc::itemGetWidth ZincItem item  ) 
-
- - - - - -
-   - - -

-Call zinc->itemcget ( -width )

Parameters:
- - -
item the item to get width from
-
-
Returns:
width value
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemMatrix ZincItem item,
double  a,
double  b,
double  c,
double  d,
double  e,
double  f
-
- - - - - -
-   - - -

-Multiply current transform by a matrix

-

Parameters:
- - - -
item the item to which we apply the transform
a,b,c,d,e,f the new transform matrix
-
-
-

- - - - -
- - - - - - - - - - -
void Zinc::itemRemove ZincItem item  ) 
-
- - - - - -
-   - - -

-Suppress an item

-

Parameters:
- - -
item the item to suppress
-
-
-

- - - - -
- - - - - - - - - - -
void Zinc::itemResetTransformation ZincItem item  ) 
-
- - - - - -
-   - - -

-Reset all transformations associated with the item

-

Parameters:
- - -
item the item to which we apply the transform
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemRotate ZincItem item,
double  angle,
double  x,
double  y,
bool  degree
-
- - - - - -
-   - - -

-Rotate an item

-

Parameters:
- - - - - -
item the item to which we apply the transform
angle the angle to rotate in radian
x y the center of the rotation
degree true for an angle in degree, false for an angle in radians
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemRotate ZincItem item,
double  angle,
bool  degree
-
- - - - - -
-   - - -

-Rotate an item

-

Parameters:
- - - - -
item the item to which we apply the transform
angle the angle to rotate
degree true for an angle in degree, false for an angle in radians
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemRotate ZincItem item,
double  angle,
double  x,
double  y
-
- - - - - -
-   - - -

-Rotate an item

-

Parameters:
- - - - -
item the item to which we apply the transform
angle the angle to rotate in radian
x y the center of the rotation
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemRotate ZincItem item,
double  angle
-
- - - - - -
-   - - -

-Rotate an item

-

Parameters:
- - - -
item the item to which we apply the transform
angle the angle to rotate in radian
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemScale ZincItem item,
double  ax,
double  ay,
double  cx,
double  cy
-
- - - - - -
-   - - -

-Scale an item using a specified center

-

Parameters:
- - - - - -
item the item to which we apply the transform
ax horizontal scale
ay vertical scale
cx cy center of the scale
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemScale ZincItem item,
double  ax,
double  ay
-
- - - - - -
-   - - -

-Scale an item

-

Parameters:
- - - - -
item the item to which we apply the transform
ax horizontal scale
ay vertical scale
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetAlignment ZincItem item,
alignment  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -alignment )

Parameters:
- - - -
item the item to configure
value the alignment to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetAlpha ZincItem item,
unsigned int  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -alpha )

Parameters:
- - - -
item the item to configure
value the alpha to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetAnchor ZincItem item,
anchor  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -anchor )

Parameters:
- - - -
item the item to configure
value the anchor to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetAtomic ZincItem item,
bool  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -atomic )

Parameters:
- - - -
item the item to configure
value the atomic to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetCapstyle ZincItem item,
capStyle  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -capstyle )

Parameters:
- - - -
item the item to configure
value the capstyle to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetClip ZincItem item,
ZincItem value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -clip )

Parameters:
- - - -
item the item to configure
value the clip to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetClosed ZincItem item,
bool  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -closed )

Parameters:
- - - -
item the item to configure
value the closed to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetColor ZincItem item,
String  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -color )

Parameters:
- - - -
item the item to configure
value the color to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetComposealpha ZincItem item,
bool  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -composealpha )

Parameters:
- - - -
item the item to configure
value the composealpha to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetComposerotation ZincItem item,
bool  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -composerotation )

Parameters:
- - - -
item the item to configure
value the composerotation to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetComposescale ZincItem item,
bool  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -composescale )

Parameters:
- - - -
item the item to configure
value the composescale to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetConnecteditem ZincItem item,
ZincItem value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -connecteditem )

Parameters:
- - - -
item the item to configure
value the connecteditem to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetConnectionanchor ZincItem item,
anchor  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -connectionanchor )

Parameters:
- - - -
item the item to configure
value the connectionanchor to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetExtent ZincItem item,
unsigned int  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -extent )

Parameters:
- - - -
item the item to configure
value the extent to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetFillcolor ZincItem item,
String  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -fillcolor )

Parameters:
- - - -
item the item to configure
value the fillcolor to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetFilled ZincItem item,
bool  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -filled )

Parameters:
- - - -
item the item to configure
value the filled to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetFillpattern ZincItem item,
ZincBitmap value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -fillpattern )

Parameters:
- - - -
item the item to configure
value the fillpattern to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetFillrule ZincItem item,
fillRule  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -fillrule )

Parameters:
- - - -
item the item to configure
value the fillrule to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetFirstend ZincItem item,
double  a,
double  b,
double  c
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -firstend )

-

Parameters:
- - - -
item the item to set firstend to
a,b,c values used to set end
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetFont ZincItem item,
ZincFont value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -font )

Parameters:
- - - -
item the item to configure
value the font to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetImage ZincItem item,
ZincImage value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -image )

Parameters:
- - - -
item the item to configure
value the image to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetJoinstyle ZincItem item,
joinStyle  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -joinstyle )

Parameters:
- - - -
item the item to configure
value the joinstyle to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetLastend ZincItem item,
double  a,
double  b,
double  c
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -lastend )

-

Parameters:
- - - -
item the item to set lastend to
a,b,c values used to set end
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetLinecolor ZincItem item,
String  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -linecolor )

Parameters:
- - - -
item the item to configure
value the linecolor to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetLinepattern ZincItem item,
ZincBitmap value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -linepattern )

Parameters:
- - - -
item the item to configure
value the linepattern to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetLinestyle ZincItem item,
lineStyle  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -linestyle )

Parameters:
- - - -
item the item to configure
value the linestyle to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetLinewidth ZincItem item,
double  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -linewidth )

Parameters:
- - - -
item the item to configure
value the linewidth to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetMask ZincItem item,
ZincBitmap value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -mask )

Parameters:
- - - -
item the item to configure
value the mask to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetOverstriked ZincItem item,
bool  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -overstriked )

Parameters:
- - - -
item the item to configure
value the overstriked to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetPieslice ZincItem item,
bool  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -pieslice )

Parameters:
- - - -
item the item to configure
value the pieslice to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetPosition ZincItem item,
double  x,
double  y
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -position )

-

Parameters:
- - - -
item the item to get width fromset position to
x,y position
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetPriority ZincItem item,
unsigned int  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -priority )

Parameters:
- - - -
item the item to configure
value the priority to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetRelief ZincItem item,
relief  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -relief )

Parameters:
- - - -
item the item to configure
value the relief to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetSensitive ZincItem item,
bool  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -sensitive )

Parameters:
- - - -
item the item to configure
value the sensitive to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetSmoothrelief ZincItem item,
bool  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -smoothrelief )

Parameters:
- - - -
item the item to configure
value the smoothrelief to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetSpacing ZincItem item,
short  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -spacing )

Parameters:
- - - -
item the item to configure
value the spacing to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetStartangle ZincItem item,
unsigned int  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -startangle )

Parameters:
- - - -
item the item to configure
value the startangle to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetText ZincItem item,
String  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -text )

Parameters:
- - - -
item the item to configure
value the text to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetTile ZincItem item,
ZincBitmap value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -tile )

Parameters:
- - - -
item the item to configure
value the tile to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetTransformation ZincItem item,
double  a,
double  b,
double  c,
double  d,
double  e,
double  f
-
- - - - - -
-   - - -

-Replace current transform by a matrix

-

Parameters:
- - - -
item the item to which we apply the transform
a,b,c,d,e,f the new transform matrix
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetUnderlined ZincItem item,
bool  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -underlined )

Parameters:
- - - -
item the item to configure
value the underlined to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetVisible ZincItem item,
bool  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -visible )

Parameters:
- - - -
item the item to configure
value the visible to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSetWidth ZincItem item,
unsigned short  value
-
- - - - - -
-   - - -

-Call zinc->itemconfigure ( -width )

Parameters:
- - - -
item the item to configure
value the width to set
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemSkew ZincItem item,
double  sx,
double  sy
-
- - - - - -
-   - - -

-Skew an item

-

Parameters:
- - - - -
item the item to which we apply the transform
sx horizontal skew
sy vertical skew
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSkewX ZincItem item,
double  sx
-
- - - - - -
-   - - -

-Skew an item horizontaly

-

Parameters:
- - - -
item the item to which we apply the transform
sx horizontal skew
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemSkewY ZincItem item,
double  sy
-
- - - - - -
-   - - -

-Skew an item verticaly

-

Parameters:
- - - -
item the item to which we apply the transform
sy vertical skew
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemTranslate ZincItem item,
double  x,
double  y,
bool  absolute
-
- - - - - -
-   - - -

-Translate the item

-

Parameters:
- - - - -
item the item to which we apply the transform
x y translation vector
absolute true if the translation is absolute
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
void Zinc::itemTranslate ZincItem item,
double  dx,
double  dy
-
- - - - - -
-   - - -

-Translate the item

-

Parameters:
- - - -
item the item to which we apply the transform
dx dy translation vector
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::itemUnbind ZincItem item,
String  eventSpecification
-
- - - - - -
-   - - -

-Annulate a binding

-

Parameters:
- - - -
item the item on which to unbind
eventSpecification tcl style event specicication
-
-
-

- - - - -
- - - - - - - - - - -
void Zinc::loadZinc char *  argv0  )  throw (ZincException) [static]
-
- - - - - -
-   - - -

-Loads the zinc library and initialize tcl and tk

-

Parameters:
- - -
argv0 the name of the execytable as passed in argv[0]
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::lower ZincItem item,
ZincItem belowThis
-
- - - - - -
-   - - -

-Reorder items to lower one

-

Parameters:
- - - -
item the item to lower
belowThis and item that will be over item
-
-
-

- - - - -
- - - - - - - - - - -
void Zinc::lower ZincItem item  ) 
-
- - - - - -
-   - - -

-Reorder items to lower one

-

Parameters:
- - -
item the item to lower
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::raise ZincItem item,
ZincItem aboveThis
-
- - - - - -
-   - - -

-Reorder items to raise one

-

Parameters:
- - - -
item the item to raise
aboveThis an item that will be under item
-
-
-

- - - - -
- - - - - - - - - - -
void Zinc::raise ZincItem item  ) 
-
- - - - - -
-   - - -

-Reorder items to raise one

-

Parameters:
- - -
item the item to raise
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::relativeBbox ZincItem item,
double  bbox[4]
-
- - - - - -
-   - - -

-Get the bounding box of an item in its parent group

-

Parameters:
- - - -
item the item to get bbox in its parent group
bbox a table where we'll put the bounding box bbox[0] = x0, bbox[1] = y0, bbox[2] = xc, bbox[3] = yc
-
-
-

- - - - -
- - - - - - - - - - -
void Zinc::setBackcolor String  value  ) 
-
- - - - - -
-   - - -

-Call zinc->configure ( -backcolor )

-

Parameters:
- - -
value the backcolor to set
-
-
-

- - - - -
- - - - - - - - - - -
void Zinc::setBorderwidth int  value  ) 
-
- - - - - -
-   - - -

-Call zinc->configure ( -borderwidth )

-

Parameters:
- - -
value the borderwidth to set
-
-
-

- - - - -
- - - - - - - - - - -
void Zinc::setFont ZincFont value  ) 
-
- - - - - -
-   - - -

-Call zinc->configure ( -font )

-

Parameters:
- - -
value the font to set
-
-
-

- - - - -
- - - - - - - - - - -
void Zinc::setForecolor String  value  ) 
-
- - - - - -
-   - - -

-Call zinc->configure ( -forecolor )

-

Parameters:
- - -
value the forecolor to set
-
-
-

- - - - -
- - - - - - - - - - -
void Zinc::setHeight int  value  ) 
-
- - - - - -
-   - - -

-Call zinc->configure ( -height )

-

Parameters:
- - -
value the height to set
-
-
-

- - - - -
- - - - - - - - - - -
void Zinc::setTitle String  title  ) 
-
- - - - - -
-   - - -

-Change window title

-

Parameters:
- - -
title the title string
-
-
-

- - - - -
- - - - - - - - - - -
void Zinc::setWidth int  value  ) 
-
- - - - - -
-   - - -

-Call zinc->configure ( -width )

-

Parameters:
- - -
value the width to set
-
-
-

- - - - -
- - - - - - - - - - -
itemType Zinc::type ZincItem item  ) 
-
- - - - - -
-   - - -

-Return the type of an item

-

Parameters:
- - -
item an item
-
-
Returns:
the type of the item
-
-

- - - - -
- - - - - - - - - - -
void Zinc::unbind String  eventSpecification  ) 
-
- - - - - -
-   - - -

-Annulate a binding

-

Parameters:
- - -
eventSpecification tcl style event specicication
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::z_command int  count,
char *  p_msg
throw (ZincException)
-
- - - - - -
-   - - -

-This is a inline because it is called frequently and needs to be optimized Use this to call the zinObjectCommand fuction. The call is made using the pre allocated table p1, it must contain Tcl_Obj thar are parameters to the zinObjectCommand function. A parameter indicate how many parameters are passed to the zinObjectCommand function.

-

Parameters:
- - - -
count the number of parameters in p1
msg the error message to throw in case of error
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void Zinc::z_tcl_call int  result,
char *  p_msg
throw (ZincException) [static]
-
- - - - - -
-   - - -

-This is inline because it is called frequently and needs to be optimized Use this when you need to call a function that can return a TCL error code.

-

Parameters:
- - - -
fct the full function call
msg the error message to throw in case of error
-
-
-

- - - - -
- - - - - - - - - -
void Zinc::zincMainLoop  )  [static]
-
- - - - - -
-   - - -

-Run tk mainloop and returns when there is no more Tk window

-


Friends And Related Function Documentation

-

- - - - -
- - -
friend class ZincPath [friend] -
-
- - - - - -
-   - - -

-

-


Member Data Documentation

-

- - - - -
- - -
Tcl_CmdInfo Zinc::bndCmdInfo [static] -
-
- - - - - -
-   - - -

-the command associated with bind -

-

-

- - - - -
- - -
Tcl_CmdInfo Zinc::fntCmdInfo [static] -
-
- - - - - -
-   - - -

-the command associated with font -

-

-

- - - - -
- - -
Tcl_CmdInfo Zinc::focCmdInfo [static] -
-
- - - - - -
-   - - -

-the command associated with fous -

-

-

- - - - -
- - -
Tcl_Obj* Zinc::id -
-
- - - - - -
-   - - -

-the id of this object -

-

-

- - - - -
- - -
Tcl_CmdInfo Zinc::imgCmdInfo [static] -
-
- - - - - -
-   - - -

-the command associated with image -

-

-

- - - - -
- - -
Tcl_Interp * Zinc::interp [static] -
-
- - - - - -
-   - - -

-the tcl interpreter -

-

-

- - - - -
- - -
WidgetObjCmd Zinc::objCmd -
-
- - - - - -
-   - - -

-the command associated with this object -

-

-

- - - - -
- - -
Tcl_Obj * Zinc::p1 [static] -
-
- - - - - -
-   - - -

-table of pointeur use for parameters -

-

-

- - - - -
- - -
Tcl_Obj * Zinc::p2 [static] -
-
- - - - - -
-   - - -

-table of pointeur use for parameters -

-

-

- - - - -
- - -
Tcl_Obj * Zinc::pool [static] -
-
- - - - - -
-   - - -

-a pool of tclobj ready to be used -

-

-

- - - - -
- - -
String Zinc::tclCb -
-
- - - - - -
-   - - -

-name of the binding callback -

-

-

- - - - -
- - -
ClientData Zinc::wi -
-
- - - - - -
-   - - -

-the zinc object itself -

-

-

- - - - -
- - -
String Zinc::window -
-
- - - - - -
-   - - -

-the window which contains the widget -

-

-

- - - - -
- - -
int Zinc::znCount = 0 [static] -
-
- - - - - -
-   - - -

-count to create unique ids -

-

-

- - - - -
- - -
int Zinc::znId -
-
- - - - - -
-   - - -

-the znCount at creation time -

-

-


The documentation for this class was generated from the following files: -
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZincBitmap-members.html b/zinclib.d/doc/html/classZincBitmap-members.html deleted file mode 100644 index 1429f1a..0000000 --- a/zinclib.d/doc/html/classZincBitmap-members.html +++ /dev/null @@ -1,22 +0,0 @@ - - -IntuiKit: Member List - - - - -

ZincBitmap Member List

This is the complete list of members for ZincBitmap, including all inherited members. - - - - - - - - -
objectZincItem
ZincBitmap(Tcl_Obj *obj)ZincBitmap
ZincBitmap(Tcl_Obj *obj, bool internal)ZincBitmap
ZincBitmap(String name)ZincBitmap
ZincItem()ZincItem [protected]
ZincItem(Tcl_Obj *obj)ZincItem
~ZincBitmap()ZincBitmap [virtual]
~ZincItem()ZincItem [virtual]

Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZincBitmap.html b/zinclib.d/doc/html/classZincBitmap.html deleted file mode 100644 index f1b7fb6..0000000 --- a/zinclib.d/doc/html/classZincBitmap.html +++ /dev/null @@ -1,177 +0,0 @@ - - -IntuiKit: ZincBitmap class Reference - - - - -

ZincBitmap Class Reference

#include <ZincObjects.hpp> -

-

Inheritance diagram for ZincBitmap: -

- -ZincItem - -List of all members. - - - - - - - - - - -

Public Member Functions

 ZincBitmap (Tcl_Obj *obj)
 ZincBitmap (Tcl_Obj *obj, bool internal)
 ZincBitmap (String name)
virtual ~ZincBitmap ()
-

Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - -
ZincBitmap::ZincBitmap Tcl_Obj *  obj  ) 
-
- - - - - -
-   - - -

-The public constructor (redefine the inherited one)

-

Parameters:
- - -
obj the object we want to store
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
ZincBitmap::ZincBitmap Tcl_Obj *  obj,
bool  internal
-
- - - - - -
-   - - -

-The public constructor (redefine the inherited one)

-

Parameters:
- - -
obj the object we want to store
-
-
-

- - - - -
- - - - - - - - - - -
ZincBitmap::ZincBitmap String  name  ) 
-
- - - - - -
-   - - -

-The public constructor (redefine the inherited one)

-

Parameters:
- - -
name the name of a predefined bitmap
-
-
-

- - - - -
- - - - - - - - - -
ZincBitmap::~ZincBitmap  )  [virtual]
-
- - - - - -
-   - - -

-The public destructor

-


The documentation for this class was generated from the following files: -
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZincBitmap.png b/zinclib.d/doc/html/classZincBitmap.png deleted file mode 100644 index 46a0958..0000000 Binary files a/zinclib.d/doc/html/classZincBitmap.png and /dev/null differ diff --git a/zinclib.d/doc/html/classZincException-members.html b/zinclib.d/doc/html/classZincException-members.html deleted file mode 100644 index ccdd2c6..0000000 --- a/zinclib.d/doc/html/classZincException-members.html +++ /dev/null @@ -1,18 +0,0 @@ - - -IntuiKit: Member List - - - - -

ZincException Member List

This is the complete list of members for ZincException, including all inherited members. - - - - -
what() constZincException
ZincException(String msg, char *file, int lineNo)ZincException
ZincException(const ZincException &exception)ZincException
~ZincException()ZincException [virtual]

Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZincException.html b/zinclib.d/doc/html/classZincException.html deleted file mode 100644 index a2f5d9f..0000000 --- a/zinclib.d/doc/html/classZincException.html +++ /dev/null @@ -1,177 +0,0 @@ - - -IntuiKit: ZincException class Reference - - - - -

ZincException Class Reference

#include <ZincObjects.hpp> -

-List of all members.


Detailed Description

-Exceptions that are throwed by zinclib -

- - - - - - - - - - - -

Public Member Functions

 ZincException (String msg, char *file, int lineNo)
 ZincException (const ZincException &exception)
virtual ~ZincException () throw ()
const char * what () const throw ()
-


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
ZincException::ZincException String  msg,
char *  file,
int  lineNo
-
- - - - - -
-   - - -

-A public constructor with a String parameter

-

Parameters:
- - -
msg the error message
-
-
-

- - - - -
- - - - - - - - - - -
ZincException::ZincException const ZincException exception  ) 
-
- - - - - -
-   - - -

-Copy constructor

-

Parameters:
- - -
exception the original exception
-
-
-

- - - - -
- - - - - - - - - -
ZincException::~ZincException  )  throw () [virtual]
-
- - - - - -
-   - - -

-Public destructor

-


Member Function Documentation

-

- - - - -
- - - - - - - - - -
const char * ZincException::what  )  const throw ()
-
- - - - - -
-   - - -

-Retreive the exception message

-

Returns:
the message
-
-


The documentation for this class was generated from the following files: -
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZincFont-members.html b/zinclib.d/doc/html/classZincFont-members.html deleted file mode 100644 index 00b946e..0000000 --- a/zinclib.d/doc/html/classZincFont-members.html +++ /dev/null @@ -1,16 +0,0 @@ - - -IntuiKit: Member List - - - - -

ZincFont Member List

This is the complete list of members for ZincFont, including all inherited members. - - -
nameZincFont
ZincFont(const char *font)ZincFont

Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZincFont.html b/zinclib.d/doc/html/classZincFont.html deleted file mode 100644 index aa47be4..0000000 --- a/zinclib.d/doc/html/classZincFont.html +++ /dev/null @@ -1,79 +0,0 @@ - - -IntuiKit: ZincFont class Reference - - - - -

ZincFont Class Reference

#include <ZincObjects.hpp> -

-List of all members. - - - - - - - -

Public Member Functions

 ZincFont (const char *font)

Public Attributes

String name
-


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - -
ZincFont::ZincFont const char *  font  ) 
-
- - - - - -
-   - - -

-The public constructor

-


Member Data Documentation

-

- - - - -
- - -
String ZincFont::name -
-
- - - - - -
-   - - -

-

-


The documentation for this class was generated from the following files: -
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZincImage-members.html b/zinclib.d/doc/html/classZincImage-members.html deleted file mode 100644 index 948f5e9..0000000 --- a/zinclib.d/doc/html/classZincImage-members.html +++ /dev/null @@ -1,21 +0,0 @@ - - -IntuiKit: Member List - - - - -

ZincImage Member List

This is the complete list of members for ZincImage, including all inherited members. - - - - - - - -
objectZincItem
ZincImage(Tcl_Obj *obj)ZincImage
ZincImage(Tcl_Obj *obj, bool internal)ZincImage
ZincItem()ZincItem [protected]
ZincItem(Tcl_Obj *obj)ZincItem
~ZincImage()ZincImage [virtual]
~ZincItem()ZincItem [virtual]

Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZincImage.html b/zinclib.d/doc/html/classZincImage.html deleted file mode 100644 index 350b0a9..0000000 --- a/zinclib.d/doc/html/classZincImage.html +++ /dev/null @@ -1,140 +0,0 @@ - - -IntuiKit: ZincImage class Reference - - - - -

ZincImage Class Reference

#include <ZincObjects.hpp> -

-

Inheritance diagram for ZincImage: -

- -ZincItem - -List of all members. - - - - - - - - -

Public Member Functions

 ZincImage (Tcl_Obj *obj)
 ZincImage (Tcl_Obj *obj, bool internal)
virtual ~ZincImage ()
-

Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - -
ZincImage::ZincImage Tcl_Obj *  obj  ) 
-
- - - - - -
-   - - -

-The public constructor (redefine the inherited one)

-

Parameters:
- - -
obj the object we want to store
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
ZincImage::ZincImage Tcl_Obj *  obj,
bool  internal
-
- - - - - -
-   - - -

-The public constructor (redefine the inherited one)

-

Parameters:
- - -
obj the object we want to store
-
-
-

- - - - -
- - - - - - - - - -
ZincImage::~ZincImage  )  [virtual]
-
- - - - - -
-   - - -

-The public destructor

-


The documentation for this class was generated from the following files: -
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZincImage.png b/zinclib.d/doc/html/classZincImage.png deleted file mode 100644 index b10412d..0000000 Binary files a/zinclib.d/doc/html/classZincImage.png and /dev/null differ diff --git a/zinclib.d/doc/html/classZincItem-members.html b/zinclib.d/doc/html/classZincItem-members.html deleted file mode 100644 index 0a2d7f2..0000000 --- a/zinclib.d/doc/html/classZincItem-members.html +++ /dev/null @@ -1,18 +0,0 @@ - - -IntuiKit: Member List - - - - -

ZincItem Member List

This is the complete list of members for ZincItem, including all inherited members. - - - - -
objectZincItem
ZincItem()ZincItem [protected]
ZincItem(Tcl_Obj *obj)ZincItem
~ZincItem()ZincItem [virtual]

Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZincItem.html b/zinclib.d/doc/html/classZincItem.html deleted file mode 100644 index 9e91df6..0000000 --- a/zinclib.d/doc/html/classZincItem.html +++ /dev/null @@ -1,159 +0,0 @@ - - -IntuiKit: ZincItem class Reference - - - - -

ZincItem Class Reference

#include <ZincObjects.hpp> -

-

Inheritance diagram for ZincItem: -

- -ZincBitmap -ZincImage - -List of all members.

Detailed Description

-ZincObjects.hpp zinclib

-This software is the property of IntuiLab SA, France. See at the end of the file for the complete copyright notice

-Here we defines classes that are items in zinc

-08/03/05

-Contributors: Benoit Peccatte <peccatte@intuilab.com> David Thevenin <thevenin@intuilab.com> -

- - - - - - - - - - - - - -

Public Member Functions

 ZincItem (Tcl_Obj *obj)
virtual ~ZincItem ()

Public Attributes

Tcl_Obj * object

Protected Member Functions

 ZincItem ()
-


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - -
ZincItem::ZincItem  )  [protected]
-
- - - - - -
-   - - -

-The protected default constructor

-

- - - - -
- - - - - - - - - - -
ZincItem::ZincItem Tcl_Obj *  obj  ) 
-
- - - - - -
-   - - -

-The public constructor

-

Parameters:
- - -
obj the object we want to store
-
-
-

- - - - -
- - - - - - - - - -
ZincItem::~ZincItem  )  [virtual]
-
- - - - - -
-   - - -

-The public destructor

-


Member Data Documentation

-

- - - - -
- - -
Tcl_Obj* ZincItem::object -
-
- - - - - -
-   - - -

-

-


The documentation for this class was generated from the following files: -
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZincItem.png b/zinclib.d/doc/html/classZincItem.png deleted file mode 100644 index deb7fd5..0000000 Binary files a/zinclib.d/doc/html/classZincItem.png and /dev/null differ diff --git a/zinclib.d/doc/html/classZincPath-members.html b/zinclib.d/doc/html/classZincPath-members.html deleted file mode 100644 index 1ebc713..0000000 --- a/zinclib.d/doc/html/classZincPath-members.html +++ /dev/null @@ -1,23 +0,0 @@ - - -IntuiKit: Member List - - - - -

ZincPath Member List

This is the complete list of members for ZincPath, including all inherited members. - - - - - - - - - -
arcTo(double rx, double ry, double xAxisRotation, bool largeArc, bool sweepFlag, double x, double y)ZincPath
close()ZincPath
cubicBezierTo(double cx1, double cy1, double cx2, double cy2, double x, double y)ZincPath
curveTo(double cx1, double cy1, double cx2, double cy2, double x, double y)ZincPath
getTable()ZincPath
lineTo(double x, double y)ZincPath
quadraticBezierTo(double cx, double cy, double x, double y)ZincPath
ZincPath(double x, double y)ZincPath
~ZincPath()ZincPath

Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classZincPath.html b/zinclib.d/doc/html/classZincPath.html deleted file mode 100644 index a45ede8..0000000 --- a/zinclib.d/doc/html/classZincPath.html +++ /dev/null @@ -1,501 +0,0 @@ - - -IntuiKit: ZincPath class Reference - - - - -

ZincPath Class Reference

#include <ZincPath.hpp> -

-List of all members.


Detailed Description

-Path.hpp zinclib

-This software is the property of IntuiLab SA, France. See at the end of the file for the complete copyright notice

-Here we defines The ZincPath object

-08/03/05

-Contributors: Benoit Peccatte <peccatte@intuilab.com> -

- - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

 ZincPath (double x, double y)
 ~ZincPath ()
void close ()
void lineTo (double x, double y)
void curveTo (double cx1, double cy1, double cx2, double cy2, double x, double y)
void cubicBezierTo (double cx1, double cy1, double cx2, double cy2, double x, double y)
void quadraticBezierTo (double cx, double cy, double x, double y)
void arcTo (double rx, double ry, double xAxisRotation, bool largeArc, bool sweepFlag, double x, double y)
Tcl_Obj * getTable ()
-


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - -
ZincPath::ZincPath double  x,
double  y
-
- - - - - -
-   - - -

-The public constructor

-

Parameters:
- - -
x,y the initial point
-
-
-

- - - - -
- - - - - - - - - -
ZincPath::~ZincPath  ) 
-
- - - - - -
-   - - -

-The public destructor

-

Warning:
Do not destroy a ZincPath if Zinc is not loaded
-
-


Member Function Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void ZincPath::arcTo double  rx,
double  ry,
double  xAxisRotation,
bool  largeArc,
bool  sweepFlag,
double  x,
double  y
-
- - - - - -
-   - - -

-Draw an arc from current point to x,y

-

Parameters:
- - - - - - - -
rx x-radius of ellipse
ry y-radius of ellipse
xAxisRotation rotation of ellipse
largeArc true if the large part of the ellipse
sweepFlag true for a positive angle direction for the drawing
x,y destination point
-
-
-

- - - - -
- - - - - - - - - -
void ZincPath::close  ) 
-
- - - - - -
-   - - -

-Close current path

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void ZincPath::cubicBezierTo double  cx1,
double  cy1,
double  cx2,
double  cy2,
double  x,
double  y
-
- - - - - -
-   - - -

-Draw a cubic bezier using specified control and destination points

-

Parameters:
- - - - -
cx1,cy1 first control point
cx2,cy2 second control point
x,y destination point
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void ZincPath::curveTo double  cx1,
double  cy1,
double  cx2,
double  cy2,
double  x,
double  y
-
- - - - - -
-   - - -

-Draw a cubic bezier using specified control and destination points call cubicBezierTo

-

Parameters:
- - - - -
cx1,cy1 first control point
cx2,cy2 second control point
x,y destination point
-
-
-

- - - - -
- - - - - - - - - -
Tcl_Obj * ZincPath::getTable  ) 
-
- - - - - -
-   - - -

-Return a Tcl_Obj* containing a list of coords points It's up to the caller to delete the resulting table

-

Returns:
a Tcl_Obj* of type list
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void ZincPath::lineTo double  x,
double  y
-
- - - - - -
-   - - -

-Draw a line from current point to next point

-

Parameters:
- - -
x,y next point
-
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void ZincPath::quadraticBezierTo double  cx,
double  cy,
double  x,
double  y
-
- - - - - -
-   - - -

-Draw a quadratic bezier using specified control and destination point

-

Parameters:
- - - - -
cx1,cy1 first control point
cx2,cy2 second control point
x,y destination point
-
-
-


The documentation for this class was generated from the following files: -
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/classes.html b/zinclib.d/doc/html/classes.html deleted file mode 100644 index 2621289..0000000 --- a/zinclib.d/doc/html/classes.html +++ /dev/null @@ -1,15 +0,0 @@ - - -IntuiKit: Alphabetical index - - - - -

IntuiKit Compound Index

-
  Z  
-
ZincBitmap   ZincException   ZincImage   ZincPath   
Zinc   ZincEvent   ZincFont   ZincItem   

Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/doxygen.css b/zinclib.d/doc/html/doxygen.css deleted file mode 100644 index 0564e82..0000000 --- a/zinclib.d/doc/html/doxygen.css +++ /dev/null @@ -1,160 +0,0 @@ -H1 { - text-align: center; - font-family: Arial, Helvetica, sans-serif; -} -H2 { - font-family: Geneva, Arial, Helvetica, sans-serif; -} -CAPTION { font-weight: bold } -DIV.qindex { width: 100%; - background-color: #eeeeff; - border: 4px solid #eeeeff; - text-align: center; - margin-bottom: 2px -} -A.qindex { text-decoration: none; font-weight: bold; } -A.qindex:hover { text-decoration: none; background-color: #ddddff } -A.qindexHL { text-decoration: none; font-weight: bold; - background-color: #6666cc; - color: #ffffff - } -A.qindexHL:hover { text-decoration: none; background-color: #6666cc } -A.qindexRef { text-decoration: none; font-weight: bold; } -A.qindexRef:hover { text-decoration: none; background-color: #ddddff } -A.qindexRefHL { text-decoration: none; font-weight: bold; - background-color: #6666cc; - color: #ffffff - } -A.qindexRefHL:hover { text-decoration: none; background-color: #6666cc } -A.el { text-decoration: none; font-weight: bold } -A.elRef { font-weight: bold } -A.code { text-decoration: none; font-weight: normal; color: #4444ee } -A.codeRef { font-weight: normal; color: #4444ee } -A:hover { text-decoration: none; background-color: #f2f2ff } -DL.el { margin-left: -1cm } -DIV.fragment { - width: 98%; - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - padding-left: 4px; - margin: 4px; -} -DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } -TD.md { background-color: #f2f2ff; font-weight: bold; } -TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; } -TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; } -DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold } -DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #eeeeff; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} -TD.indexvalue { - background-color: #eeeeff; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { text-align: center; } -IMG.formulaDsp { } -IMG.formulaInl { vertical-align: middle; } -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -.mdTable { - border: 1px solid #868686; - background-color: #f2f2ff; -} -.mdRow { - padding: 8px 20px; -} -.mdescLeft { - font-size: smaller; - font-family: Arial, Helvetica, sans-serif; - background-color: #FAFAFA; - padding-left: 8px; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - font-size: smaller; - font-family: Arial, Helvetica, sans-serif; - font-style: italic; - background-color: #FAFAFA; - padding-left: 4px; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; - padding-bottom: 0px; - padding-right: 8px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-style: solid; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-family: Geneva, Arial, Helvetica, sans-serif; - font-size: 12px; -} -.memItemRight { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-style: solid; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-family: Geneva, Arial, Helvetica, sans-serif; - font-size: 13px; -} diff --git a/zinclib.d/doc/html/doxygen.png b/zinclib.d/doc/html/doxygen.png deleted file mode 100644 index 96ae72c..0000000 Binary files a/zinclib.d/doc/html/doxygen.png and /dev/null differ diff --git a/zinclib.d/doc/html/files.html b/zinclib.d/doc/html/files.html deleted file mode 100644 index 8f06dec..0000000 --- a/zinclib.d/doc/html/files.html +++ /dev/null @@ -1,24 +0,0 @@ - - -IntuiKit: File Index - - - - -

IntuiKit File List

Here is a list of all files with brief descriptions: - - - - - - - - - -
Zinc.cpp
Zinc.hpp [code]
ZincExtern.hpp [code]
ZincInternal.hpp [code]
ZincObjects.cpp
ZincObjects.hpp [code]
ZincPath.cpp
ZincPath.hpp [code]
ZincTypes.hpp [code]
-
Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/functions.html b/zinclib.d/doc/html/functions.html deleted file mode 100644 index f762e56..0000000 --- a/zinclib.d/doc/html/functions.html +++ /dev/null @@ -1,278 +0,0 @@ - - -IntuiKit: Compound Member Index - - - - - -
a | b | c | d | f | g | i | k | l | n | o | p | q | r | s | t | u | w | x | y | z | ~
- -

- -

-Here is a list of all class members with links to the classes they belong to:

- a - -

-

- b - -

-

- c - -

-

- d - -

-

- f - -

-

- g - -

-

- i - -

-

- k - -

-

- l - -

-

- n - -

-

- o - -

-

- p - -

-

- q - -

-

- r - -

-

- s - -

-

- t - -

-

- u - -

-

- w - -

-

- x - -

-

- y - -

-

- z - -

-

- ~ - -

-
Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/functions_func.html b/zinclib.d/doc/html/functions_func.html deleted file mode 100644 index 6086dd7..0000000 --- a/zinclib.d/doc/html/functions_func.html +++ /dev/null @@ -1,238 +0,0 @@ - - -IntuiKit: Compound Member Index - - - - - -
a | b | c | d | f | g | i | l | q | r | s | t | u | w | z | ~
- -

- -

-

- a - -

-

- b - -

-

- c - -

-

- d - -

-

- f - -

-

- g - -

-

- i - -

-

- l - -

-

- q - -

-

- r - -

-

- s - -

-

- t - -

-

- u - -

-

- w - -

-

- z - -

-

- ~ - -

-
Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/functions_rela.html b/zinclib.d/doc/html/functions_rela.html deleted file mode 100644 index 7da9a8d..0000000 --- a/zinclib.d/doc/html/functions_rela.html +++ /dev/null @@ -1,19 +0,0 @@ - - -IntuiKit: Compound Member Index - - - - - - -

-

-
Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/functions_vars.html b/zinclib.d/doc/html/functions_vars.html deleted file mode 100644 index 7492f7f..0000000 --- a/zinclib.d/doc/html/functions_vars.html +++ /dev/null @@ -1,40 +0,0 @@ - - -IntuiKit: Compound Member Index - - - - - - -

-

-
Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/globals.html b/zinclib.d/doc/html/globals.html deleted file mode 100644 index 59e4bb9..0000000 --- a/zinclib.d/doc/html/globals.html +++ /dev/null @@ -1,166 +0,0 @@ - - -IntuiKit: File Member Index - - - - - -
a | c | d | e | f | i | j | l | m | r | s | t | w | z
- -

- -

-Here is a list of all file members with links to the files they belong to:

- a - -

-

- c - -

-

- d - -

-

- e - -

-

- f - -

-

- i - -

-

- j - -

-

- l - -

-

- m - -

-

- r - -

-

- s - -

-

- t - -

-

- w - -

-

- z - -

-
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/globals_defs.html b/zinclib.d/doc/html/globals_defs.html deleted file mode 100644 index 14004ab..0000000 --- a/zinclib.d/doc/html/globals_defs.html +++ /dev/null @@ -1,34 +0,0 @@ - - -IntuiKit: File Member Index - - - - - - -

-

-
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/globals_enum.html b/zinclib.d/doc/html/globals_enum.html deleted file mode 100644 index 6db331b..0000000 --- a/zinclib.d/doc/html/globals_enum.html +++ /dev/null @@ -1,27 +0,0 @@ - - -IntuiKit: File Member Index - - - - - - -

-

-
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/globals_eval.html b/zinclib.d/doc/html/globals_eval.html deleted file mode 100644 index 4b214da..0000000 --- a/zinclib.d/doc/html/globals_eval.html +++ /dev/null @@ -1,87 +0,0 @@ - - -IntuiKit: File Member Index - - - - - -
a | c | f | i | j | l | r
- -

- -

-

- a - -

-

- c - -

-

- f - -

-

- i - -

-

- j - -

-

- l - -

-

- r - -

-
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/globals_func.html b/zinclib.d/doc/html/globals_func.html deleted file mode 100644 index 13d42b3..0000000 --- a/zinclib.d/doc/html/globals_func.html +++ /dev/null @@ -1,28 +0,0 @@ - - -IntuiKit: File Member Index - - - - - - -

-

-
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/globals_type.html b/zinclib.d/doc/html/globals_type.html deleted file mode 100644 index f698ece..0000000 --- a/zinclib.d/doc/html/globals_type.html +++ /dev/null @@ -1,22 +0,0 @@ - - -IntuiKit: File Member Index - - - - - - -

-

-
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/globals_vars.html b/zinclib.d/doc/html/globals_vars.html deleted file mode 100644 index aa2b811..0000000 --- a/zinclib.d/doc/html/globals_vars.html +++ /dev/null @@ -1,40 +0,0 @@ - - -IntuiKit: File Member Index - - - - - - -

-

-
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/hierarchy.html b/zinclib.d/doc/html/hierarchy.html deleted file mode 100644 index 41c1dfc..0000000 --- a/zinclib.d/doc/html/hierarchy.html +++ /dev/null @@ -1,25 +0,0 @@ - - -IntuiKit: Hierarchical Index - - - - -

IntuiKit Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically: -
Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/index.html b/zinclib.d/doc/html/index.html deleted file mode 100644 index 9f57cf0..0000000 --- a/zinclib.d/doc/html/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - -IntuiKit: Main Page - - - - -

IntuiKit Documentation

-

-

1.0


Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/structZincEvent-members.html b/zinclib.d/doc/html/structZincEvent-members.html deleted file mode 100644 index 684a187..0000000 --- a/zinclib.d/doc/html/structZincEvent-members.html +++ /dev/null @@ -1,19 +0,0 @@ - - -IntuiKit: Member List - - - - -

ZincEvent Member List

This is the complete list of members for ZincEvent, including all inherited members. - - - - - -
kZincEvent
KZincEvent
tZincEvent
xZincEvent
yZincEvent

Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doc/html/structZincEvent.html b/zinclib.d/doc/html/structZincEvent.html deleted file mode 100644 index 89437c6..0000000 --- a/zinclib.d/doc/html/structZincEvent.html +++ /dev/null @@ -1,142 +0,0 @@ - - -IntuiKit: ZincEvent struct Reference - - - - -

ZincEvent Struct Reference

#include <ZincTypes.hpp> -

-List of all members. - - - - - - - - - - - - -

Public Attributes

int x
int y
int k
long t
String K
-


Member Data Documentation

-

- - - - -
- - -
String ZincEvent::K -
-
- - - - - -
-   - - -

-

-

- - - - -
- - -
int ZincEvent::k -
-
- - - - - -
-   - - -

-

-

- - - - -
- - -
long ZincEvent::t -
-
- - - - - -
-   - - -

-

-

- - - - -
- - -
int ZincEvent::x -
-
- - - - - -
-   - - -

-

-

- - - - -
- - -
int ZincEvent::y -
-
- - - - - -
-   - - -

-

-


The documentation for this struct was generated from the following file: -
Generated on Mon Apr 18 17:40:45 2005 for IntuiKit by - -doxygen -1.3.3
- - diff --git a/zinclib.d/doxyConfig b/zinclib.d/doxyConfig deleted file mode 100644 index 90d1b82..0000000 --- a/zinclib.d/doxyConfig +++ /dev/null @@ -1,1109 +0,0 @@ -# Doxyfile 1.3.3 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = IntuiKit - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 1.0 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = docs - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en -# (Japanese with English messages), Korean, Norwegian, Polish, Portuguese, -# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. It is allowed to use relative paths in the argument list. - -STRIP_FROM_PATH = - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explict @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = YES - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# reimplements. - -INHERIT_DOCS = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. - -INPUT_FILTER = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output dir. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = YES - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimised for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assigments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superceded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similiar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes that -# lay further from the root node will be omitted. Note that setting this option to -# 1 or 2 may greatly reduce the computation time needed for large code bases. Also -# note that a graph may be further truncated if the graph's image dimensions are -# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). -# If 0 is used for the depth value (the default), the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO - -# The CGI_NAME tag should be the name of the CGI script that -# starts the search engine (doxysearch) with the correct parameters. -# A script with this name will be generated by doxygen. - -CGI_NAME = search.cgi - -# The CGI_URL tag should be the absolute URL to the directory where the -# cgi binaries are located. See the documentation of your http daemon for -# details. - -CGI_URL = - -# The DOC_URL tag should be the absolute URL to the directory where the -# documentation is located. If left blank the absolute path to the -# documentation, with file:// prepended to it, will be used. - -DOC_URL = - -# The DOC_ABSPATH tag should be the absolute path to the directory where the -# documentation is located. If left blank the directory on the local machine -# will be used. - -DOC_ABSPATH = - -# The BIN_ABSPATH tag must point to the directory where the doxysearch binary -# is installed. - -BIN_ABSPATH = /usr/local/bin/ - -# The EXT_DOC_PATHS tag can be used to specify one or more paths to -# documentation generated for other projects. This allows doxysearch to search -# the documentation for these projects as well. - -EXT_DOC_PATHS = diff --git a/zinclib.d/gen.pl b/zinclib.d/gen.pl deleted file mode 100644 index ac703d8..0000000 --- a/zinclib.d/gen.pl +++ /dev/null @@ -1,275 +0,0 @@ -#!/usr/bin/perl - -# This software is the property of IntuiLab SA, France. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -$a=""; - -$res = ""; -$undone = ""; -$enum = ""; -$enum2 = ""; -open CODE,">code.cpp"; -open HPP,">code.hpp"; -while (<>) -{ - if( /{ ZN_CONFIG_(\w+), "-(\w+)"/ ) - { - if(defined $opt{$2}) - { - next if($opt{$2} == $1); - die("ERROR different TYPE\n"); - } - $opt{$2} = $1; - if( $1 eq "BOOL" ) - { $e = 0; $t = "bool"; $T = "BOO"; } - elsif( $1 eq "FLAG" ) - { $e = 0; $t = "int"; $T= "INT"; } - elsif( $1 eq "GRADIENT" ) - { $e = 0; $t = "String"; $T= "STR"; } - elsif( $1 eq "UINT" ) - { $e = 0; $t = "unsigned int"; $T= "INT"; } - elsif( $1 eq "INT" ) - { $e = 0; $t = "int"; $T= "INT"; } - elsif( $1 eq "LINE_STYLE" ) - { $e = 1; $t = "ineStyle"; $T="lineStyles"; } - elsif( $1 eq "DIM" ) - { $e = 0; $t = "double"; $T= "DBL"; } - elsif( $1 eq "ANGLE" ) - { $e = 0; $t = "unsigned int"; $T= "INT"; } - elsif( $1 eq "PRI" ) - { $e = 0; $t = "unsigned int"; $T= "INT"; } - elsif( $1 eq "RELIEF" ) - { $e = 1; $t = "relief"; $T="reliefs"; } - elsif( $1 eq "ALPHA" ) - { $e = 0; $t = "unsigned int"; $T= "INT"; } - elsif( $1 eq "TEXT" ) - { $e = 0; $t = "String"; $T= "STR"; } - elsif( $1 eq "ALIGNMENT" ) - { $e = 1; $t = "alignment"; $T="alignments"; } - elsif( $1 eq "USHORT" ) - { $e = 0; $t = "unsigned short"; $T= "INT"; } - elsif( $1 eq "SHORT" ) - { $e = 0; $t = "short"; $T= "INT"; } - elsif( $1 eq "STRING" ) - { $e = 0; $t = "String"; $T= "STR"; } - elsif( $1 eq "FONT" ) - { $e = 0; $t = "ZincFont *"; $T= "PSTR"; } - elsif( $1 eq "ITEM" ) - { $e = 0; $t = "ZincItem *"; $T= "PTR"; } - elsif( $1 eq "BITMAP" ) - { $e = 0; $t = "ZincBitmap *"; $T= "PTR"; } - elsif( $1 eq "IMAGE" ) - { $e = 0; $t = "ZincImage *"; $T= "PTR"; } - elsif( $1 eq "ANCHOR" ) - { $e = 1; $t = "anchor"; $T="anchors"; } - elsif( $1 eq "LINE_SHAPE" ) - { $e = 1; $t = "lineShape"; $T="lineShapes"; } - elsif( $1 eq "CAP_STYLE" ) - { $e = 1; $t = "capStyle"; $T="capStyles"; } - elsif( $1 eq "JOIN_STYLE" ) - { $e = 1; $t = "joinStyle"; $T="joinStyles"; } - elsif( $1 eq "FILL_RULE" ) - { $e = 1; $t = "fillRule"; $T="fillRules"; } - elsif( $1 eq "EDGE_LIST" ) - { $e = 1; $t = "edgeList"; $T="edgeLists"; } - else - { - $undone .= "$2: $1\n"; - next; - } - - $t2 = $2; - substr($t2,0,1) =~ tr/[a-z]/[A-Z]/; - if($e==1) - { - if($en{$1}!=1) - { - $enum .= "$t { t_$T };\n"; - $enum2.= "const char* $T"."Strings [1] = { \"t$T\" };\n"; - $enum2.= "Tcl_Obj* $T [1] = { Tcl_NewStringObj (\"t$T\", -1) };\n"; - $en{$1}=1; - } - } - print HPP " /**\n"; - print HPP " * Call zinc->itemconfigure ( -$2 )\n"; - print HPP " * \@param item the item to configure\n"; - print HPP " * \@param value the $2 to set\n"; - print HPP " */\n"; - print HPP " void itemSet$t2 (ZincItem * item, $t value);\n\n"; - print HPP " /**\n"; - print HPP " * Call zinc->itemcget ( -$2 )\n"; - print HPP " * \@param item the item to get $2 from\n"; - print HPP " * \@return $2 value\n"; - print HPP " */\n"; - if ($t eq "String") - { - print HPP " String itemGet$t2 (ZincItem * item);\n\n"; - } - else - { - print HPP " $t itemGet$t2 (ZincItem * item);\n\n"; - } - $res .= "Z_DEFINE_ZOPT ($2); //the \"-$2\" option\n"; - - print CODE "/**\n"; - print CODE " * Call zinc->itemconfigure ( -$2 )\n"; - print CODE " *\n"; - print CODE " * \@param item the item to configure\n"; - print CODE " * \@param value the $2 to set\n"; - print CODE " */\n"; - print CODE "void Zinc::itemSet$t2 (ZincItem * item, $t value)\n"; - print CODE "{\n"; - print CODE " //prepare arguments : .zinc itemconfigure item attribute value\n"; - print CODE " p1[0] = id;\n"; - print CODE " p1[1] = ZFCT_itemconfigure;\n"; - print CODE " p1[2] = item->object;\n"; - print CODE " p1[3] = ZOPT_$2;\n"; - if( $e==1 ) - { - print CODE " p1[4] = ".$T."[value];\n"; - } - elsif ($T eq "PTR") - { - print CODE " p1[4] = value->object;\n"; - } - elsif ($T eq "PSTR") - { - print CODE " p1[4] = Z_STR_POOL (0, value->name.c_str(), value->name.length());\n"; - } - elsif ($T eq "STR") - { - print CODE " p1[4] = Z_".$T."_POOL (1, value.c_str (), value.length ());\n"; - } - else - { - print CODE " p1[4] = Z_".$T."_POOL (1, value);\n"; - } - print CODE " //call the zinc function with 5 arguments in internal form\n"; - print CODE " z_command (5, \"itemSet$t2 Failed : \");\n"; - print CODE "}\n\n"; - - print CODE "/**\n"; - print CODE " * Call zinc->itemcget ( -$2 )\n"; - print CODE " *\n"; - print CODE " * \@param item the item to get $2 from\n"; - print CODE " * \@return $2 value\n"; - print CODE " */\n"; - if ($t eq "String") - { - print CODE "String Zinc::itemGet$t2 (ZincItem * item)\n"; - } - else - { - print CODE "$t Zinc::itemGet$t2 (ZincItem * item)\n"; - } - print CODE "{\n"; - print CODE " Tcl_Obj* tmp;\n"; - print CODE " //discard all old results\n"; - print CODE " Tcl_ResetResult (interp);\n"; - print CODE " //prepare arguments : .zinc itemcget item \n"; - print CODE " p1[0] = id;\n"; - print CODE " p1[1] = ZFCT_itemcget;\n"; - print CODE " p1[2] = item->object;\n"; - print CODE " p1[3] = ZOPT_$2;\n"; - print CODE " //call the zinc function with 4 arguments in internal form\n"; - print CODE " z_command (4, \"itemGet$t2 Failed : \");\n\n"; - print CODE " //retreive the result trough the tcl interpreter and convert it\n"; - print CODE " tmp = Tcl_GetObjResult (interp);\n"; - if($e == 1) - { - print CODE " int value;\n"; - print CODE " z_tcl_call (Tcl_GetIndexFromObj (interp, tmp,\n"; - print CODE " $T"."Strings, \n"; - print CODE " \"$T\",\n"; - print CODE " 0, &value),\n"; - print CODE " \"itemGet$t2 Failed : \")\n"; - print CODE " return $t (value);\n"; - } - elsif ( $T eq "STR") - { - print CODE " return String (Tcl_GetStringFromObj (tmp, NULL));\n"; - } - elsif ( $T eq "PSTR") - { - print CODE " return new ZincFont (String (Tcl_GetStringResult (interp)));\n"; - } - elsif ( $T eq "PTR" ) - { - if( $t =~ /ZincItem/ ) - { - print CODE " return new ZincItem(tmp);\n"; - } - else if ( $t =~ /ZincImage/ ) - { - print CODE " return new ZincImage(tmp);\n"; - } - else - { - print CODE " return new ZincBitmap(tmp);\n"; - } - } - elsif ( $T eq "INT" ) - { - print CODE " int value;\n"; - print CODE " z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &value),\n"; - print CODE " \"itemGet$t2 Failed : \");\n"; - print CODE " return ($t)value;\n"; - } - elsif ( $T eq "DBL" ) - { - print CODE " double value;\n"; - print CODE " z_tcl_call (Tcl_GetDoubleFromObj (interp, tmp, &value),\n"; - print CODE " \"itemGet$t2 Failed : \");\n"; - print CODE " return ($t)value;\n"; - } - elsif ( $T eq "BOO" ) - { - print CODE " int value;\n"; - print CODE " z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &value),\n"; - print CODE " \"itemGet$t2 Failed : \");\n"; - print CODE " return ($t)value;\n"; - } - else - { - die("generationg error\n"); - } - print CODE "}\n\n"; - - $done .= "$2: $1\n"; - } -} - -print "--- CONSTANTES\n"; -print $res; -print "--- ENUMS.h\n"; -print $enum; -print "--- ENUMS.c\n"; -print $enum2; -print "--- FAIT\n"; -print $done; -print "--- PAS FAIT\n"; -print $undone; diff --git a/zinclib.d/makefile.vc b/zinclib.d/makefile.vc deleted file mode 100644 index 08e312e..0000000 --- a/zinclib.d/makefile.vc +++ /dev/null @@ -1,89 +0,0 @@ - -TCLTK_FULL_VER = 8.4.9 -TCLTK_LIB_VER = 84 -TKZINC_MAJOR = 3 -TKZINC_MINOR = 3 -TKZINC_PATCHLVL = 0 - -CC = cl -LD = link -CP = copy -RM = del -# -# The SDK lib path should be available in the -# environment variable %LIB% -libpath32 = /LIBPATH:"$(LIB)" -# -# The SDK include path should be available in the -# environment variable %INCLUDE% -include32 = /I"$(INCLUDE)" /I"C:\Program Files\Microsoft Platform SDK for Windows XP SP2\include\GL" - -# -# Default location for ActiveTcl -prefix = c:\Tcl -exec_prefix = $(prefix) - -bindir = $(exec_prefix)\bin -libdir = $(exec_prefix)\lib -incdir = $(prefix)\include -mandir = $(prefix)\man\man3 - -rootdir = . -srcdir = $(rootdir)\src -testdir = $(rootdir)\test -tmpdir = $(rootdir)\tmp - -INCLUDES = /I"$(incdir)" /I$(srcdir) $(include32) - -# Assume that WISH is already INSTALLED -TCLSH = $(bindir)\tclsh$(TCLTK_LIB_VER) -WISH = $(bindir)\wish$(TCLTK_LIB_VER) -WIN_LIBS = user32.lib gdi32.lib ws2_32.lib -GL_LIBS = glu32.lib opengl32.lib -TK_LIBS = $(libdir)\tcl$(TCLTK_LIB_VER).lib \ - $(libdir)\tk$(TCLTK_LIB_VER).lib \ - $(libdir)\Tkzinc$(TKZINC_MAJOR).$(TKZINC_MINOR).$(TKZINC_PATCHLVL)\Tkzinc$(TKZINC_MAJOR)$(TKZINC_MINOR)$(TKZINC_PATCHLVL).lib -LIBS = $(WIN_LIBS) $(GL_LIBS) $(TK_LIBS) $(tmpdir)/zinclib.lib - -VERSION = \"$(TKZINC_MAJOR).$(TKZINC_MINOR).$(TKZINC_PATCHLVL)\" - -CDEBUG = /Z7 -Od -CFLAGS = /c /W3 /nologo /YX $(CDEBUG) -CPPFLAGS = /Fp$(tmpdir)\ $(INCLUDES) /DBUILD_zinclib - -LFLAGS = /nologo /machine:IX86 $(libpath32) /FORCE:MULTIPLE /NODEFAULTLIB:uuid.lib /NODEFAULTLIB:OLDNAMES.lib - -OBJS = $(tmpdir)\ZincObjects.obj $(tmpdir)\ZincPath.obj $(tmpdir)\Zinc.obj - -$(tmpdir)\zinclib.lib: $(tmpdir) $(OBJS) - lib /OUT:$@ $(OBJS) - -$(tmpdir): - mkdir $(tmpdir) - -{$(srcdir)}.cpp{$(tmpdir)}.obj: - $(CC) $(CPPFLAGS) $(CFLAGS) -Fo$(tmpdir)\ $< - -demos: $(testdir)/items.exe $(testdir)/widget.exe $(testdir)/test.exe $(testdir)/itemconf.exe - -$(testdir)/items.exe: $(tmpdir)/items.obj $(tmpdir)\zinclib.lib - $(LD) $(LFLAGS) $(LIBS) /OUT:$@ $** - -$(testdir)/widget.exe: $(tmpdir)/widget.obj $(tmpdir)\zinclib.lib - $(LD) $(LFLAGS) $(LIBS) /OUT:$@ $** - -$(testdir)/test.exe: $(tmpdir)/test.obj $(tmpdir)\zinclib.lib - $(LD) $(LFLAGS) $(LIBS) /OUT:$@ $** - -$(testdir)/itemconf.exe: $(tmpdir)/itemconf.obj $(tmpdir)\zinclib.lib - $(LD) $(LFLAGS) $(LIBS) /OUT:$@ $** - - -{$(testdir)}.cpp{$(tmpdir)}.obj: - $(CC) $(CPPFLAGS) $(CFLAGS) -Fo$(tmpdir)\ $< - -mostlyclean: - $(RM) *.bak *~ $(tmpdir)\*.obj -clean: - $(RM) $(tmpdir)\*.obj $(tmpdir)\*.dll $(tmpdir)\*.lib $(tmpdir)\*.exp $(tmpdir)\*.pch - diff --git a/zinclib.d/src/Zinc.cpp b/zinclib.d/src/Zinc.cpp deleted file mode 100644 index 4c60acf..0000000 --- a/zinclib.d/src/Zinc.cpp +++ /dev/null @@ -1,4540 +0,0 @@ -/** Zinc.cpp - * zinclib - * - * This software is the property of IntuiLab SA, France. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Here is the definition of the Zinc object - * - * 08/03/05 - * - * Contributors: - * Benoit Peccatte - * David Thevenin - * - */ -#include "Zinc.hpp" -#include "ZincInternal.hpp" -#include -#include -#include - -/** - * 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. - */ - -//predeclare private function -#ifdef _WIN32 -int __cdecl tclCallback (ClientData client_data, Tcl_Interp *interp, - int argc, Tcl_Obj *CONST args[]); -#else -int tclCallback (ClientData client_data, Tcl_Interp *interp, - int argc, Tcl_Obj *CONST args[]) __attribute__((cdecl)); -#endif - -/******************************************************* - ZINC OBJECT -*******************************************************/ - - -int Zinc::znCount = 0; ///< count to create unique ids -Tcl_Interp *Zinc::interp; ///< the tcl interpreter -Tcl_CmdInfo Zinc::topCmdInfo; ///< the command associated with toplevel -Tcl_CmdInfo Zinc::zncCmdInfo; ///< the command associated with zinc -Tcl_CmdInfo Zinc::imgCmdInfo; ///< the command associated with image -Tcl_CmdInfo Zinc::fntCmdInfo; ///< the command associated with font -Tcl_CmdInfo Zinc::focCmdInfo; ///< the command associated with focus -Tcl_CmdInfo Zinc::bndCmdInfo; ///< the command associated with bind -Tcl_Obj* Zinc::pool[ZINC_POOL_COUNT];///< a pool of tclobj ready to be used -Tcl_Obj* Zinc::p1[ZINC_PARAM_COUNT]; ///< a table of pointeurs use for parameters -Tcl_Obj* Zinc::p2[ZINC_PARAM_COUNT]; ///< a table of pointeurs use for parameters - -static Tcl_Obj *DEFAULT_GROUP_OBJ = Tcl_NewIntObj (DEFAULT_GROUP); - -//option constants -//Tcl_Obj* Z_render = Tcl_NewStringObj ("-render", -1); -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 - - -//autogenerated constants -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 (markercolor); ///< the "-markercolor" 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 - -//other constants -Z_DEFINE_ZFCT (device); ///< the "device" keyword - -///< function constants -Z_DEFINE_ZFCT (add); ///< the "add" function -Z_DEFINE_ZFCT (addtag); ///< the "addtag" 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 - -//Item constants -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 - -/********************************************* - Prepare enum Tcl_Obj -*********************************************/ - -//lineStyles strings -const char* lineStylesStrings [] = -{ "simple", "dashed", "mixed", "dotted" }; -//lineStyles Tcl_Obj -Tcl_Obj* lineStyles [] = -{ - Tcl_NewStringObj ("simple", -1), - Tcl_NewStringObj ("dashed", -1), - Tcl_NewStringObj ("mixed", -1), - Tcl_NewStringObj ("dotted", -1), -}; - -//capStyles strings -const char* capStylesStrings [] = -{ "butt", "projecting", "round" }; -//capStyles Tcl_Obj -Tcl_Obj* capStyles [] = -{ - Tcl_NewStringObj ("butt", -1), - Tcl_NewStringObj ("projecting", -1), - Tcl_NewStringObj ("round", -1), -}; - -// fillRules strings -const char* fillRulesStrings [] = -{ "odd", "nonzero", "positive", "negative", "abs_geq_2" }; -//fillRules Tcl_Obj -Tcl_Obj* fillRules [] = -{ - Tcl_NewStringObj ("odd", -1), - Tcl_NewStringObj ("nonzero", -1), - Tcl_NewStringObj ("positive", -1), - Tcl_NewStringObj ("negative", -1), - Tcl_NewStringObj ("abs_geq_2", -1), -}; - -// joinStyle strings -const char* joinStylesStrings [] = -{ "bevel", "miter", "round" }; -// joinStyles Tcl_Obj -Tcl_Obj* joinStyles [] = -{ - Tcl_NewStringObj ("bevel", -1), - Tcl_NewStringObj ("miter", -1), - Tcl_NewStringObj ("round", -1), -}; - -// reliefs strings -const char* reliefsStrings [] = -{ "flat", "raised", "sunken", "ridge", "groove", "roundraised", - "roundsunken", "roundridge", "roundgroove", "raisedrule", "sunkenrule" }; -// reliefs Tcl_Obj -Tcl_Obj* reliefs [] = -{ - 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), -}; - -// alignments strings -const char* alignmentsStrings [] = -{ "left", "right", "center" }; -// alignments Tcl_obj -Tcl_Obj* alignments [] = -{ - Tcl_NewStringObj ("left", -1), - Tcl_NewStringObj ("right", -1), - Tcl_NewStringObj ("center", -1), -}; - -// anchors strings -const char* anchorsStrings [] = -{ "nw", "n", "ne", "e", "se", "s", "sw", "w", "center" }; -// anchors Tcl_Obj -Tcl_Obj* anchors [] = -{ - 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), -}; - -// itemType strings -const char* itemTypeStrings [] = -{ - "group", - "arc", - "text", - "rectangle", - "curve", - "icon", - NULL -}; -//no need for Tcl_Objs because they are only used as return values - - -/********************************** - Zinc Object -**********************************/ - -/** - * The public constructor - * - * @param renderingMode ZINC_BACKEND_X11 or ZINC_BACKEND_OPENGL - */ -Zinc::Zinc (int renderingMode) -{ - String theId; - - //preparating id (.zn and a unique number) - znCount++; - theId = ".zn"; - theId += itos(znCount); - window = "."; - - //create a new window for each other widget - if (znCount != 1) - { - window = ".zwin"; - window += itos (znCount); - - //create a new toplevel window - const char* para[2]; - para[0] = "toplevel"; - para[1] = window.c_str(); - //call the toplevel Tk function with 2 arguments - z_tcl_call ((*topCmdInfo.proc)(topCmdInfo.clientData, interp, 2, para), - "toplevel Failed : "); - - //adapt the zinc id to the window path - theId = window + theId; - } - - // String noResizeCommand = String ("wm resizable ") + window + " 0 0"; - //Tcl_Eval (interp, noResizeCommand.c_str ()); - - //use a tcl_obj for the id - id = Tcl_NewStringObj (theId.c_str (), theId.length ()); - Tcl_IncrRefCount (id); - - //get top windows for zinc widget - Tk_Window top_w = Tk_MainWindow (interp); - - //creation of the zinc item - // call "Zinc id -render mode - Tcl_ResetResult (interp); - p1[0] = NULL; - p1[1] = id; - p1[2] = ZOPT_render; - p1[3] = Z_INT_POOL (0, renderingMode); - // call the function with 4 arguments and check non error - z_tcl_call ((*zncCmdInfo.objProc) (ClientData (top_w), interp, 4, p1), - "ZincObjCmd failed :"); - - // get back ZnWInfo *wi and WidgetObjCmd - Tcl_CmdInfo cmdInfo; - int result = Tcl_GetCommandInfo (interp, theId.c_str (), &cmdInfo); - if (!result) - { - throw ZincException (String ("zinclib: Tcl command not found") + - Tcl_GetStringResult (interp), __FILE__, __LINE__); - } - - //get informations necessary to call WidgetObjCmd - wi = cmdInfo.objClientData; - objCmd = (WidgetObjCmd)cmdInfo.objProc; - - //call the Tk function pack - String packCmd = String ("pack ") + theId + " -expand 1 -fill both"; - Tcl_Eval (interp, packCmd.c_str ()); - - // Prepare for binding with callback (create a Tcl function) - tclCb = String (Z_TCLCB) + itos(znCount); - Tcl_CreateObjCommand(interp, tclCb.c_str (), tclCallback, - (ClientData) this, (Tcl_CmdDeleteProc *) NULL); - - //give focus to the window - const char* para[2]; - para[0] = "focus"; - para[1] = theId.c_str(); - // call the function with 4 arguments - z_tcl_call ((*focCmdInfo.proc)(focCmdInfo.clientData, interp, 2, para), - "focus Failed : "); -} - -/** - * The public destructor - */ -Zinc::~Zinc () -{ - //delete the Tcl function - Tcl_DeleteCommand (interp, tclCb.c_str ()); - // delete the tcl_obj - Tcl_DecrRefCount (id); -} - -/** - * Change window title - * - * @param title the title string - */ -void Zinc::setTitle (String title) -{ - //use tcl interpreter directly since this won't be called often - String command = String ("wm title ") + window + " \"" + title + "\""; - Tcl_Eval (interp, command.c_str ()); -} - -/***************************************** - WIDGET PROPERTIES -*****************************************/ -/** - * 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. - */ - -/** - * Call zinc->configure ( -backcolor ) - * - * @param value the backcolor to set - */ -void Zinc::setBackcolor (String value) -{ - //call .zinc configure -backcolor value - p1[0] = id; - p1[1] = ZFCT_configure; - p1[2] = ZOPT_backcolor; - p1[3] = Z_STR_POOL (0, value.c_str(), value.length()); - // call the function with 4 arguments - z_command (4, "setBackcolor Failed : "); -} - -/** - * Call zinc->cget ( -backcolor ) - * - * @return backcolor value - */ -String Zinc::getBackcolor () -{ - Tcl_Obj* tmp; - //discard old results - Tcl_ResetResult (interp); - //call .zinc cget -backcolor - p1[0] = id; - p1[1] = ZFCT_cget; - p1[2] = ZOPT_backcolor; - // call the function with 3 arguments - z_command (3, "getBackcolor Failed : "); - - //retreive the result as a string - tmp = Tcl_GetObjResult (interp); - return String (Tcl_GetStringFromObj (tmp, NULL)); -} - -/** - * Call zinc->configure ( -forecolor ) - * - * @param value the forecolor to set - */ -void Zinc::setForecolor (String value) -{ - //call .zinc configure -forecolor value - p1[0] = id; - p1[1] = ZFCT_configure; - p1[2] = ZOPT_forecolor; - p1[3] = Z_STR_POOL (0, value.c_str(), value.length()); - // call the function with 4 arguments - z_command (4, "setForecolor Failed : "); -} - -/** - * Call zinc->cget ( -forecolor ) - * - * @return forecolor value - */ -String Zinc::getForecolor () -{ - Tcl_Obj* tmp; - //discard old results - Tcl_ResetResult (interp); - //call .zinc cget -forecolor - p1[0] = id; - p1[1] = ZFCT_cget; - p1[2] = ZOPT_forecolor; - // call the function with 3 arguments - z_command (3, "getForecolor Failed : "); - - //retreive the result as a string - tmp = Tcl_GetObjResult (interp); - return String (Tcl_GetStringFromObj (tmp, NULL)); -} - -/** - * Call zinc->configure ( -width ) - * - * @param value the width to set - */ -void Zinc::setWidth (int value) -{ - //call .zinc configure -width value - p1[0] = id; - p1[1] = ZFCT_configure; - p1[2] = ZOPT_width; - p1[3] = Z_INT_POOL (0, value); - // call the function with 4 arguments - z_command (4, "setWidth Failed : "); - - char *strid = Tcl_GetString(id); - //call the Tk function pack - String packCmd = String ("pack ") + strid + " -expand 1 -fill both"; - Tcl_Eval (interp, packCmd.c_str ()); -} - -/** - * Call zinc->cget ( -width ) - * - * @return width value - */ -int Zinc::getWidth () -{ - Tcl_Obj* tmp; - //discard old results - Tcl_ResetResult (interp); - //call .zinc cget -width - p1[0] = id; - p1[1] = ZFCT_cget; - p1[2] = ZOPT_width; - // call the function with 3 arguments - z_command (3, "getWidth Failed : "); - - //retreive the result as an integer - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &value), - "getWidth Failed : "); - return value; -} - -/** - * Call zinc->configure ( -height ) - * - * @param value the height to set - */ -void Zinc::setHeight (int value) -{ - //call .zinc configure -height value - p1[0] = id; - p1[1] = ZFCT_configure; - p1[2] = ZOPT_height; - p1[3] = Z_INT_POOL (0, value); - // call the function with 4 arguments - z_command (4, "setHeight Failed : "); - - char *strid = Tcl_GetString(id); - //call the Tk function pack - String packCmd = String ("pack ") + strid + " -expand 1 -fill both"; - Tcl_Eval (interp, packCmd.c_str ()); -} - -/** - * Call zinc->cget ( -height ) - * - * @return height value - */ -int Zinc::getHeight () -{ - Tcl_Obj* tmp; - //discard old results - Tcl_ResetResult (interp); - //call .zinc cget -height - p1[0] = id; - p1[1] = ZFCT_cget; - p1[2] = ZOPT_height; - // call the function with 3 arguments - z_command (3, "getHeight Failed : "); - - //retreive the result as an integer - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &value), - "getHeight Failed : "); - return value; -} - -/** - * Call zinc->configure ( -borderwidth ) - * - * @param value the borderwidth to set - */ -void Zinc::setBorderwidth (int value) -{ - //call .zinc configure -borderwidth value - p1[0] = id; - p1[1] = ZFCT_configure; - p1[2] = ZOPT_borderwidth; - p1[3] = Z_INT_POOL (0, value); - // call the function with 4 arguments - z_command (4, "setBorderwidth Failed : "); -} - -/** - * Call zinc->cget ( -borderwidth ) - * - * @return borderwidth value - */ -int Zinc::getBorderwidth () -{ - Tcl_Obj* tmp; - //discard old results - Tcl_ResetResult (interp); - //call .zinc cget -borderwidth - p1[0] = id; - p1[1] = ZFCT_cget; - p1[2] = ZOPT_borderwidth; - // call the function with 3 arguments - z_command (3, "getBorderwidth Failed : "); - - //retreive the result as an integer - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &value), - "getBorderwidth Failed : "); - return value; -} - -/** - * Call zinc->configure ( -font ) - * - * @param value the font to set - */ -void Zinc::setFont (ZincFont* value) -{ - //call .zinc configure -font value - p1[0] = id; - p1[1] = ZFCT_configure; - p1[2] = ZOPT_font; - p1[3] = Z_STR_POOL (0, value->name.c_str(), value->name.length()); - // call the function with 4 arguments - z_command (4, "setFont Failed : "); -} - -/** - * Call zinc->cget ( -font ) - * - * @return font value - */ -ZincFont* Zinc::getFont () -{ - //discard old results - Tcl_ResetResult (interp); - //call .zinc cget -font - p1[0] = id; - p1[1] = ZFCT_cget; - p1[2] = ZOPT_font; - // call the function with 3 arguments - z_command (3, "getFont Failed : "); - - //retreive the result as a string - return new ZincFont (Tcl_GetStringResult (interp)); -} - - -/***************************************** - WIDGET METHODS -*****************************************/ -/** - * 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. - */ - -/** - * Get the bounding box of an item - * - * @param item the item to get bbox - * @param bbox a table where we'll put the bounding box - * bbox[0] = x0, bbox[1] = y0, bbox[2] = xc, bbox[3] = yc - */ -void Zinc::bbox (ZincItem* item, double _bbox[4]) -{ - Tcl_Obj* tmp; - Tcl_Obj** list; - int count; - //discard old results - Tcl_ResetResult (interp); - // call .zinc bbox item - p1[0] = id; - p1[1] = ZFCT_bbox; - p1[2] = item->object; - - // call the function with 3 arguments - z_command (3, "bbox Failed : "); - - //retreive the result as a list - tmp = Tcl_GetObjResult (interp); - z_tcl_call (Tcl_ListObjGetElements (interp, tmp, &count, &list), - "bbox Failed : "); - //extract 4 double from the list - if (count != 4) - { - throw ZincException (String ("bbox Failed count=") + itos(count), - __FILE__, __LINE__); - } - z_tcl_call (Tcl_GetDoubleFromObj (interp, list[0], &_bbox[0]), - "bbox Failed"); - z_tcl_call (Tcl_GetDoubleFromObj (interp, list[1], &_bbox[1]), - "bbox Failed"); - z_tcl_call (Tcl_GetDoubleFromObj (interp, list[2], &_bbox[2]), - "bbox Failed"); - z_tcl_call (Tcl_GetDoubleFromObj (interp, list[3], &_bbox[3]), - "bbox Failed"); -} - - -/** - * Get the bounding box of an item in its parent group - * - * @param item the item to get bbox in its parent group - * @param bbox a table where we'll put the bounding box - * bbox[0] = x0, bbox[1] = y0, bbox[2] = xc, bbox[3] = yc - */ -void Zinc::relativeBbox (ZincItem* item, double _bbox[4]) -{ - //1) get bounding bbox - double tempBbox[4]; - this->bbox (item, tempBbox); - - //2) call transform - Tcl_Obj* tmp; - Tcl_Obj** list; - int count; - //discard old results - Tcl_ResetResult (interp); - // call .zinc transform device parentGroup {_bbox[0] _bbox[1] _bbox[2] _bbox[3]} - p1[0] = id; - p1[1] = ZFCT_transform; - p1[2] = ZFCT_device; - p1[3] = item->object; - - //coordinates as a list - p2[0] = Z_DBL_POOL (0, tempBbox[0]); - p2[1] = Z_DBL_POOL (1, tempBbox[1]); - p2[2] = Z_DBL_POOL (2, tempBbox[2]); - p2[3] = Z_DBL_POOL (3, tempBbox[3]); - p1[4] = Z_LST_POOL (4, p2, 4); - - // call the function with 5 arguments - z_command (5, "relativeBbox z_command Failed : "); - //free the list in pool No 4 - Z_CLEANLIST (4); - - //retreive the result as a list - tmp = Tcl_GetObjResult (interp); - z_tcl_call (Tcl_ListObjGetElements (interp, tmp, &count, &list), - "relativeBbox z_tcl_call Failed : "); - - //3) extract 4 double from the list - if (count != 4) - { - throw ZincException (String ("relativeBbox Failed count=") + itos(count), - __FILE__, __LINE__); - } - z_tcl_call (Tcl_GetDoubleFromObj (interp, list[0], &_bbox[0]), - "relativeBbox Failed"); - z_tcl_call (Tcl_GetDoubleFromObj (interp, list[1], &_bbox[1]), - "relativeBbox Failed"); - z_tcl_call (Tcl_GetDoubleFromObj (interp, list[2], &_bbox[2]), - "relativeBbox Failed"); - z_tcl_call (Tcl_GetDoubleFromObj (interp, list[3], &_bbox[3]), - "bbox Failed"); -} - - - - -/** - * Change the group of an item - * - * @param item the item to move - * @param parentGroup new group for the item - */ -void Zinc::chggroup (ZincItem *item, ZincItem *parentGroup) -{ - // call .zinc chggroup item parentGroup - p1[0] = id; - p1[1] = ZFCT_chggroup; - p1[2] = item->object; - p1[3] = Z_PARENTGROUP (parentGroup); - // call the function with 4 arguments - z_command (4, "chggroup Failed : "); -} - -/** - * Clone an item - * - * @param item the item to clone - * @return the cloned item - */ -ZincItem* Zinc::clone (ZincItem *item) -{ - // call .zinc clone item - p1[0] = id; - p1[1] = ZFCT_clone; - p1[2] = item->object; - // call the function with 3 arguments - z_command (3, "clone Failed: "); - - //retreive the result as a tcl_obj - return new ZincItem (Tcl_GetObjResult (interp)); -} - -/** - * Get the number of contour of an item - * - * @return number of contour - */ -int Zinc::contour (ZincItem *item) -{ - Tcl_Obj* tmp; - int result; - // call .zinc contour item - p1[0] = id; - p1[1] = ZFCT_contour; - p1[2] = item->object; - // call the function with 3 arguments - z_command (3, "contour Failed: "); - - //retreive the result as an int - tmp = Tcl_GetObjResult (interp); - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &result), - "contour Failed: "); - return result; -} - -/** - * Set the contour of an item to the one of an other - * - * @param item the item on which we set the contour - * @param flag the operation to do on the contour - * @param reference the item to set contour from - * @return the number of contour - */ -int Zinc::contour (ZincItem *item, itemOperator flag, ZincItem *reference) -{ - Tcl_Obj* tmp; - int result; - //discard old results - Tcl_ResetResult (interp); - // call .zinc contour item flag reference - p1[0] = id; - p1[1] = ZFCT_contour; - p1[2] = item->object; - - //different possible actions depending on the flag - switch (flag) - { - case item_add_clockwise: - p1[3] = ZFCT_add; - p1[4] = Z_INT_POOL (0, -1); //add clockwise (-1) - break; - case item_add_counterclockwise: - p1[3] = ZFCT_add; - p1[4] = Z_INT_POOL (0, 1); //add counterclockwise (1) - break; - default: - p1[3] = ZFCT_remove; - p1[4] = Z_INT_POOL (0, 0); //no meaning (0) - } - // contour index (0) - p1[5] = Z_INT_POOL (1, 0); - // item reference - p1[6] = reference->object; - - // call the function with 7 arguments - z_command (7, "contour Failed: "); - - // retreive the result as an int - tmp = Tcl_GetObjResult (interp); - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &result), - "contour Failed: "); - return result; -} - -/** - * Set the contour of an item - * - * @param item the item on which we set the contour - * @param add true to add a path, false to remove - * @param reference the new contour - * @return the number of contour - */ -int Zinc::contour (ZincItem *item, bool add, ZincPath *_contour) -{ - Tcl_Obj* tmp; - int result; - //discard old results - Tcl_ResetResult (interp); - // call .zinc contour item flag contour - p1[0] = id; - p1[1] = ZFCT_contour; - p1[2] = item->object; - - //different possible actions depending on the add flag - if (add) - { - p1[3] = ZFCT_add; - p1[4] = Z_INT_POOL (0, 0); //add contour (0) - } - else - { - p1[3] = ZFCT_remove; - p1[4] = Z_INT_POOL (0, 0); //no meaning (0) - } - // contour index - p1[5] = Z_INT_POOL (1, 0); - //contour - p1[6] = _contour->getTable (); - - // call the function with 7 arguments - z_command (7, "contour Failed: "); - - // retreive the result as an integer - tmp = Tcl_GetObjResult (interp); - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &result), - "contour Failed: "); - return result; -} - -/** - * Set or modify the coordinates of an item - * - * @param item the item to modify - * @param contour new coords for the item - * @param add true to add coords, false to replace - * @param contourIndex the contour do modify - * @param coordIndex the coordinate to modify (WARNING, path must be one - * point if the is not the default) - */ -void Zinc::coords (ZincItem *item, ZincPath *_contour, bool add, - int contourIndex, int coordIndex) -{ - int i; - // call .zinc contour item ?flag? ?contourIndex? ?coordIndex? _contour - p1[0] = id; - p1[1] = ZFCT_coords; - p1[2] = item->object; - - // use i as a variable index for parameters - i = 3; // last parameter is p1[2] - // do we add or not - if (add) - { - p1[i++] = ZFCT_add; - } - - //ith there a contour - if (contourIndex != -1) - { - p1[i++] = Z_INT_POOL (1, contourIndex); - - //is there a coord index - if (coordIndex != -1) - { - p1[i++] = Z_INT_POOL (1, coordIndex); - } - } - - p1[i++] = _contour->getTable (); - - // call the function with i arguments - z_command (i, "coords Failed: "); -} - -/** - * Remove coords of an item - * - * @param item the item to modify - * @param coordIndex the coordinate to rmove - * @param contourIndex the contour on which we remove - */ -void Zinc::coordsRemove (ZincItem *item, int coordIndex, int contourIndex) -{ - int i; - // call .zinc coords item remove ?contourIndex? - p1[0] = id; - p1[1] = ZFCT_coords; - p1[2] = item->object; - p1[3] = ZFCT_remove; - - i = 4; - // is there a contourIndex - if (contourIndex != -1) - { - p1[i++] = Z_INT_POOL (1, contourIndex); - } - p1[i++] = Z_INT_POOL (1, coordIndex); - - // call the function with i arguments - z_command (i, "coordsRemove Failed: "); -} - -/** - * Add a tag to an item - * - * @param item the item to add tag to - * @param tag a tag to add - */ -void Zinc::addTag (ZincItem *item, String tag) -{ - // call .zinc addtag tag withtag - p1[0] = id; - p1[1] = ZFCT_addtag; - p1[2] = Z_STR_POOL (0, tag.c_str (), tag.length ()); - p1[3] = ZITM_withtag; - p1[4] = item->object; - // call the function with 5 arguments - z_command (5, "addTag Failed: "); -} - -/** - * Remove a tag from an item - * - * @param item the item to remove tag from - * @param tag a tag to remove - */ -void Zinc::dTag (ZincItem *item, String tag) -{ - // call .zinc dtag item tag - p1[0] = id; - p1[1] = ZFCT_dtag; - p1[2] = item->object; - - int i = 3; - //create a tg if nexessary - if (tag != "") - { - p1[i++] = Z_STR_POOL (0, tag.c_str (), tag.length ()); - } - - // call the function with i arguments - z_command (i, "dTag Failed: "); -} - -/** - * List all tags of an item - * It's up to the caller to delete the resulting table - * - * @param item the item to list tag from - * @param lagList a pointer to a table of String containing tags - * @return the number of tags - */ -int Zinc::getTags (ZincItem *item, String*** tagList) -{ - Tcl_Obj* tmp; - Tcl_Obj** list; - int count; - - //discard old results - Tcl_ResetResult (interp); - // call .zinc gettags item - p1[0] = id; - p1[1] = ZFCT_gettags; - p1[2] = item->object; - // call the function with 3 arguments - z_command (3, "getTags Failed : "); - - //retreive the result as a list - tmp = Tcl_GetObjResult (interp); - z_tcl_call (Tcl_ListObjGetElements (interp, tmp, &count, &list), - "bbox Failed : "); - - // put strings into a new table - char *str; - //store the table into tagList - (*tagList) = new String* [count]; - - // fill the table - for (int i (0) ; i < count ; i++) - { - str = Tcl_GetString (list[i]); - (*tagList)[i] = new String (str); - } - return count; -} - -/** - * Set the focus to an item - * - * @param item the item to set the focus to - */ -void Zinc::focus (ZincItem *item) -{ - // .zinc focus item - p1[0] = id; - p1[1] = ZFCT_focus; - p1[2] = item->object; - // call the function with 3 arguments - z_command (3, "focus Failed: "); -} - -/** - * Tell if the name is a gradient name - * - * @param gname a gradient name - * @return true if the name is a gradient name, false otherwise - */ -bool Zinc::isGname (String _gname) -{ - Tcl_Obj* tmp; - int result; - //discard old results - Tcl_ResetResult (interp); - // call .zinc gname _gname - p1[0] = id; - p1[1] = ZFCT_gname; - p1[2] = Z_STR_POOL (0, _gname.c_str (), _gname.length ()); - // call the function with 3 arguments - z_command (3, "isGname Failed: "); - - //retreive the result as a boolean - tmp = Tcl_GetObjResult (interp); - z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &result), - "isGname Failed: "); - return bool (result); -} - -/** - * Create a named gradient - * - * @param gradient a gradient - * @param gname a gradient name - */ -void Zinc::gname (String gradient, String _gname) -{ - // call .zinc gname gradient gname - p1[0] = id; - p1[1] = ZFCT_gname; - p1[2] = Z_STR_POOL (0, gradient.c_str (), gradient.length ()); - p1[3] = Z_STR_POOL (1, _gname.c_str (), _gname.length ()); - // call the function with 4 arguments - z_command (4, "gname Failed: "); -} - -/** - * Retreive the group of an item - * - * @param item the item to get the group from - * @return the group - */ -ZincItem* Zinc::group (ZincItem *item) -{ - Tcl_Obj* tmp; - //discard old results - Tcl_ResetResult (interp); - // call .zinc group item - p1[0] = id; - p1[1] = ZFCT_group; - p1[2] = item->object; - // call the function with 3 arguments - z_command (3, "group Failed: "); - - //retreive the result as a tcl_obj - tmp = Tcl_GetObjResult (interp); - return new ZincItem (tmp); -} - -/** - * Reorder items to lower one - * - * @param item the item to lower - */ -void Zinc::lower (ZincItem *item) -{ - // call .zinc lower item - p1[0] = id; - p1[1] = ZFCT_lower; - p1[2] = item->object; - // call the function with 3 arguments - z_command (3, "lower Failed: "); -} - -/** - * Reorder items to lower one - * - * @param item the item to lower - * @param belowThis and item that will be over item - */ -void Zinc::lower (ZincItem *item, ZincItem *belowThis) -{ - // call .zinc lower item belowThis - p1[0] = id; - p1[1] = ZFCT_lower; - p1[2] = item->object; - p1[3] = belowThis->object; - // call the function with 4 arguments - z_command (4, "lower Failed: "); -} - -/** - * Reorder items to raise one - * - * @param item the item to raise - */ -void Zinc::raise (ZincItem *item) -{ - // call .zinc raise item - p1[0] = id; - p1[1] = ZFCT_raise; - p1[2] = item->object; - // call the function with 3 arguments - z_command (3, "raise Failed: "); -} - -/** - * Reorder items to raise one - * - * @param item the item to raise - * @param aboveThis an item that will be under item - */ -void Zinc::raise (ZincItem *item, ZincItem *aboveThis) -{ - // call .zinc raise item aboveThis - p1[0] = id; - p1[1] = ZFCT_raise; - p1[2] = item->object; - p1[3] = aboveThis->object; - // call the function with 4 arguments - z_command (4, "raise Failed: "); -} - -/** - * Return the type of an item - * - * @param item an item - * @return the type of the item - */ -itemType Zinc::type (ZincItem *item) -{ - Tcl_Obj *tmp; - //discard old results - Tcl_ResetResult (interp); - // call .zinc type item - p1[0] = id; - p1[1] = ZFCT_type; - p1[2] = item->object; - // call the function with 3 arguments - z_command (3, "type Failed: "); - - //retreive the result as a string - tmp = Tcl_GetObjResult (interp); - - // convert the string to the right enum value - int value; - z_tcl_call (Tcl_GetIndexFromObj (interp, tmp, - itemTypeStrings, - "itemType", - 0, &value), - "type Failed : "); - return itemType (value); -} - -/** - * Create a Zinc Tag that can be used in place of any item - * for zinc functions that must be called using tagOrId - * - * @param tag the text of the tag - * @return a tag item - */ -ZincItem* Zinc::createTag(String tag) -{ - //just create an item - return new ZincItem (Tcl_NewStringObj (tag.c_str (), tag.length ())); -} - -/******************************************************* - ITEM MANIPULATION -*******************************************************/ -/** - * 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. - */ - -/** - * Suppress an item - * - * @param item the item to suppress - */ -void Zinc::itemRemove (ZincItem *item) -{ - //call .zinc remove item - p1[0] = id; - p1[1] = ZFCT_remove; - p1[2] = item->object; - // call the function with 3 arguments - z_command (3, "itemRemove failed :"); -} - -/** - * Create a group item - * - * @param parentGroup group where we'll put the new group, if NULL we create - * in the defaults group - * @return the group item - */ -ZincItem *Zinc::itemCreateGroup (ZincItem *parentGroup) -{ - //call .zinc add group parentGroup - p1[0] = id; - p1[1] = ZFCT_add; - p1[2] = ZITM_group; - p1[3] = Z_PARENTGROUP (parentGroup); - // call the function with 4 arguments - z_command (4, "itemCreateGroup failed :"); - - return new ZincItem (Tcl_GetObjResult (interp)); -} - -/** - * Create a rectangle item - * - * @param parentGroup group where we'll put it - * @param x y width height the coordinates of the new rectangle - * @return the rectangle item - */ -ZincItem* Zinc::itemCreateRectangle (ZincItem *parentGroup, double x, double y, - double width, double height) -{ - //call .zinc add rectangle parentGroup {coords} - p1[0] = id; - p1[1] = ZFCT_add; - p1[2] = ZITM_rectangle; - p1[3] = Z_PARENTGROUP (parentGroup); - //coordinates as a list - p2[0] = Z_DBL_POOL (0, x); - p2[1] = Z_DBL_POOL (1, y); - p2[2] = Z_DBL_POOL (2, width + x); - p2[3] = Z_DBL_POOL (3, height + y); - p1[4] = Z_LST_POOL (4, p2, 4); // a list with 4 items - // call the function with 4 arguments - z_command (5, "itemCreateRectangle failed :"); - - //clear the list in the pool No 4 - Z_CLEANLIST (4); - - return new ZincItem (Tcl_GetObjResult (interp)); -} - -/** - * Create an arc item - * - * @param parentGroup group where we'll put it - * @param x y width height the coordinates of the new rectangle - * @return the arc item - */ -ZincItem *Zinc::itemCreateArc (ZincItem *parentGroup, double x, double y, - double width, double height) -{ - //call .zinc add arc parentGroup {coords} - p1[0] = id; - p1[1] = ZFCT_add; - p1[2] = ZITM_arc; - p1[3] = Z_PARENTGROUP (parentGroup); - //coordinates as a list - p2[0] = Z_DBL_POOL (0, x); - p2[1] = Z_DBL_POOL (1, y); - p2[2] = Z_DBL_POOL (2, width + x); - p2[3] = Z_DBL_POOL (3, height + y); - p1[4] = Z_LST_POOL (4, p2, 4); - // call the function with 5 arguments - z_command (5, "itemCreateArc failed :"); - - //clear the list in the pool No 4 to reuse it later - Z_CLEANLIST (4); - - return new ZincItem (Tcl_GetObjResult (interp)); -} - -/** - * Create a text item - * - * @param parentGroup group where we'll put it - * @return the text item - */ -ZincItem *Zinc::itemCreateText (ZincItem *parentGroup) -{ - //call .zinc add text parentGroup - p1[0] = id; - p1[1] = ZFCT_add; - p1[2] = ZITM_text; - p1[3] = Z_PARENTGROUP (parentGroup); - // call the function with 4 arguments - z_command (4, "itemCreateText failed :"); - - return new ZincItem (Tcl_GetObjResult (interp)); -} - -/** - * Create a curve item - * - * @param parentGroup group where we'll put it - * @param path the path to display - * @return the curve item - */ -ZincItem *Zinc::itemCreateCurve (ZincItem *parentGroup, ZincPath *path) -{ - Tcl_Obj *table; - table = path->getTable (); - //call .zinc add curve parentGroup {path} - p1[0] = id; - p1[1] = ZFCT_add; - p1[2] = ZITM_curve; - p1[3] = Z_PARENTGROUP (parentGroup); - p1[4] = table; - // call the function with 5 arguments - z_command (5, "itemCreateCurve failed :"); - return new ZincItem (Tcl_GetObjResult (interp)); -} - - -/** - * Create an icon item - * - * @param parentGroup group where we'll put it - * @param image a zincImage to display - * @return the icon item - */ -ZincItem *Zinc::itemCreateIcon (ZincItem *parentGroup, ZincImage* image) -{ - //call .zinc add icon parentGroup - p1[0] = id; - p1[1] = ZFCT_add; - p1[2] = ZITM_icon; - p1[3] = Z_PARENTGROUP (parentGroup); - // call the function with 4 arguments - z_command (4, "itemCreateIcon failed :"); - - //retreive the result - ZincItem *result = new ZincItem (Tcl_GetObjResult (interp)); - //to be able to set the image - itemSetImage (result, image); - - return result; -} - -/************************************************** - TRANSFORMATION METHODS -**************************************************/ - -/** - * 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. - */ - -/** - * Translate the item - * - * @param item the item to which we apply the transform - * @param dx dy translation vector - */ -void Zinc::itemTranslate (ZincItem * item, double dx, double dy) -{ - // call .zinc translate item dx dy - p1[0] = id; - p1[1] = ZFCT_translate; - p1[2] = item->object; - p1[3] = Z_DBL_POOL (0, dx); - p1[4] = Z_DBL_POOL (1, dy); - // call the function with 5 arguments - z_command (5, "itemTranslateRelative Failed : "); -} - -/** - * Translate the item - * - * @param item the item to which we apply the transform - * @param x y translation vector - * @param absolute true if the translation is absolute - */ -void Zinc::itemTranslate (ZincItem * item, double x, double y, bool absolute) -{ - // call .zinc translate item x y absolute - p1[0] = id; - p1[1] = ZFCT_translate; - p1[2] = item->object; - p1[3] = Z_DBL_POOL (0, x); - p1[4] = Z_DBL_POOL (1, y); - p1[5] = Z_BOO_POOL (2, absolute); - // call the function with 6 arguments - z_command (6, "itemTranslateAbsolute Failed : "); -} - -/** - * Rotate an item - * - * @param item the item to which we apply the transform - * @param angle the angle to rotate in radian - */ -void Zinc::itemRotate (ZincItem * item, double angle) -{ - // call .zinc rotate item angle - p1[0] = id; - p1[1] = ZFCT_rotate; - p1[2] = item->object; - p1[3] = Z_DBL_POOL (0, angle); - // call the function with 4 arguments - z_command (4, "itemRotate (angle) Failed : "); -} - -/** - * Rotate an item - * - * @param item the item to which we apply the transform - * @param angle the angle to rotate in radian - * @param x y the center of the rotation - */ -void Zinc::itemRotate (ZincItem * item, double angle, double x, double y) -{ - // call .zinc rotate item angle x y - p1[0] = id; - p1[1] = ZFCT_rotate; - p1[2] = item->object; - p1[3] = Z_DBL_POOL (0, angle); - p1[4] = Z_DBL_POOL (1, x); - p1[5] = Z_DBL_POOL (2, y); - // call the function with 6 arguments - z_command (6, "itemRotateDegree (angle,center) Failed : "); -} - -/** - * Rotate an item - * - * @param item the item to which we apply the transform - * @param angle the angle to rotate - * @param degree true for an angle in degree, false for an angle in radians - */ -void Zinc::itemRotate (ZincItem * item, double angle, bool degree) -{ - // call .zinc rotate item angle degree - p1[0] = id; - p1[1] = ZFCT_rotate; - p1[2] = item->object; - p1[3] = Z_DBL_POOL (0, angle); - p1[4] = Z_BOO_POOL (1, degree); - // call the function with 5 arguments - z_command (5, "itemRotate (angle,degree) Failed : "); -} - -/** - * Rotate an item - * - * @param item the item to which we apply the transform - * @param angle the angle to rotate in radian - * @param x y the center of the rotation - * @param degree true for an angle in degree, false for an angle in radians - */ -void Zinc::itemRotate (ZincItem * item, double angle, double x, double y, - bool degree) -{ - // call .zinc rotate item angle degree x y - p1[0] = id; - p1[1] = ZFCT_rotate; - p1[2] = item->object; - p1[3] = Z_DBL_POOL (0, angle); - p1[4] = Z_BOO_POOL (1, degree); - p1[5] = Z_DBL_POOL (2, x); - p1[6] = Z_DBL_POOL (3, y); - // call the function with 7 arguments - z_command (7, "itemRotate (angle,center,degree) Failed : "); -} - -/** - * Scale an item - * - * @param item the item to which we apply the transform - * @param ax horizontal scale - * @param ay vertical scale - */ -void Zinc::itemScale (ZincItem * item, double ax, double ay) -{ - // call .zinc scale item ax ay - p1[0] = id; - p1[1] = ZFCT_scale; - p1[2] = item->object; - p1[3] = Z_DBL_POOL (0, ax); - p1[4] = Z_DBL_POOL (1, ay); - // call the function with 5 arguments - z_command (5, "itemScale Failed : "); -} - -/** - * Scale an item using a specified center - * - * @param item the item to which we apply the transform - * @param ax horizontal scale - * @param ay vertical scale - * @param cx cy center of the scale - */ -void Zinc::itemScale (ZincItem * item, double ax, double ay, double cx, double cy) -{ - // call .zinc scale item ax ay cx cy - p1[0] = id; - p1[1] = ZFCT_scale; - p1[2] = item->object; - p1[3] = Z_DBL_POOL (0, ax); - p1[4] = Z_DBL_POOL (1, ay); - p1[5] = Z_DBL_POOL (2, cx); - p1[6] = Z_DBL_POOL (3, cy); - // call the function with 7 arguments - z_command (7, "itemScale (center) Failed : "); -} - -/** - * Skew an item - * - * @param item the item to which we apply the transform - * @param sx horizontal skew - * @param sy vertical skew - */ -void Zinc::itemSkew (ZincItem * item, double sx, double sy) -{ - // call .zinc skew item sx sy - p1[0] = id; - p1[1] = ZFCT_skew; - p1[2] = item->object; - p1[3] = Z_DBL_POOL (0, sx); - p1[4] = Z_DBL_POOL (1, sy); - // call the function with 5 arguments - z_command (5, "itemSkew Failed : "); -} - -/** - * Skew an item horizontaly - * - * @param item the item to which we apply the transform - * @param sx horizontal skew - */ -void Zinc::itemSkewX (ZincItem * item, double sx) -{ - // call .zinc skew item sx 0 - p1[0] = id; - p1[1] = ZFCT_skew; - p1[2] = item->object; - p1[3] = Z_DBL_POOL (0, sx); - p1[4] = Z_DBL_POOL (1, 0); - // call the function with 5 arguments - z_command (5, "itemSkewX Failed : "); -} - -/** - * Skew an item verticaly - * - * @param item the item to which we apply the transform - * @param sy vertical skew - */ -void Zinc::itemSkewY (ZincItem * item, double sy) -{ - // call .zinc skew item 0 sy - p1[0] = id; - p1[1] = ZFCT_skew; - p1[2] = item->object; - p1[3] = Z_DBL_POOL (0, 0); - p1[4] = Z_DBL_POOL (1, sy); - // call the function with 5 arguments - z_command (5, "itemSkewY Failed : "); -} - -/** - * Reset all transformations associated with the item - * - * @param item the item to which we apply the transform - */ -void Zinc::itemResetTransformation (ZincItem * item) -{ - // call .zinc treset item - p1[0] = id; - p1[1] = ZFCT_treset; - p1[2] = item->object; - // call the function with 3 arguments - z_command (3, "itemResetTransformation Failed : "); -} - -/** - * Replace current transform by a matrix - * - * @param item the item to which we apply the transform - * @param a,b,c,d,e,f the new transform matrix - */ -void Zinc::itemSetTransformation (ZincItem * item, - double a, double b, double c, - double d, double e, double f) -{ - // call .zinc tset item a b c d e f - p1[0] = id; - p1[1] = ZFCT_tset; - p1[2] = item->object; - p1[3] = Z_DBL_POOL (0, a); - p1[4] = Z_DBL_POOL (1, b); - p1[5] = Z_DBL_POOL (2, c); - p1[6] = Z_DBL_POOL (3, d); - p1[7] = Z_DBL_POOL (4, e); - p1[8] = Z_DBL_POOL (5, f); - // call the function with 9 arguments - z_command (9, "itemSetTransformation Failed : "); -} - -/** - * Get current transform matrix - * @param item the item to which we apply the transform - * @param a,b,c,d,e,f places where we'll put the transform matrix - */ -void Zinc::itemGetTransformation (ZincItem * item, - double *a, double *b, double *c, - double *d, double *e, double *f) -{ - // bug in zinc (or not?), it doesn't reset result for the tget function - // or apennd a result instead of replacing it - Tcl_ResetResult (interp); - // call .zinc tget item - p1[0] = id; - p1[1] = ZFCT_tget; - p1[2] = item->object; - // call the function with 3 arguments - z_command (3, "itemGetTransformation Failed : "); - - //retreive the result as a list object - Tcl_Obj* tmp = Tcl_GetObjResult (interp); - int num; - Tcl_Obj** elems; - z_tcl_call (Tcl_ListObjGetElements (interp, tmp, &num, &elems), - "itemGetTransformation Failed : "); - - //num is necessarily 6, extract 6 double - z_tcl_call (Tcl_GetDoubleFromObj(interp, elems[0], a), - "itemGetTransformation Failed : "); - z_tcl_call (Tcl_GetDoubleFromObj(interp, elems[1], b), - "itemGetTransformation Failed : "); - z_tcl_call (Tcl_GetDoubleFromObj(interp, elems[2], c), - "itemGetTransformation Failed : "); - z_tcl_call (Tcl_GetDoubleFromObj(interp, elems[3], d), - "itemGetTransformation Failed : "); - z_tcl_call (Tcl_GetDoubleFromObj(interp, elems[4], e), - "itemGetTransformation Failed : "); - z_tcl_call (Tcl_GetDoubleFromObj(interp, elems[5], f), - "itemGetTransformation Failed : "); -} - - -/** - * Multiply current transform by a matrix - * - * @param item the item to which we apply the transform - * @param a,b,c,d,e,f transform matrix - */ -void Zinc::itemMatrix (ZincItem * item, - double a, double b, double c, - double d, double e, double f) -{ - double a0,b0,c0,d0,e0,f0; - double a1,b1,c1,d1,e1,f1; - // get current transform - itemGetTransformation (item, &a0, &b0, &c0, &d0, &e0, &f0); - - //multiply - a1 = a * a0 + d * b0; - b1 = b * a0 + e * b0; - c1 = c * a0 + f * b0 + c0; - d1 = a * d0 + d * e0; - e1 = b * d0 + e * e0; - f1 = c * d0 + f * e0 + f0; - - // set to new transform - itemSetTransformation (item, a1, b1, c1, d1, e1, f1); -} - -/************************************************** - BINDING -**************************************************/ - -/** - * 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. - */ - -//number of elements in the ZincEvent structure -#define EVENT_COUNT 10 -//number of basic parameters to a widget callback -#define WIDGETCB_COUNT 3 -//number of basic parameters to an item callback -#define ITEMCB_COUNT 4 - -//the equivalent of z_tcl_call able to be called in a callback -#define z_tcl_call2(fct,msg) \ - { \ - int result = (fct); \ - if (result != TCL_OK) \ - { \ - Tcl_AppendResult (Zinc::interp, msg, NULL); \ - return TCL_ERROR; \ - } \ - } - -/** - * Real callback used by zinc TCL - * - * @param client_data the Zinc object - * @param interp current interpreter - * @param argc number of arguments - * @param args table of arguments - */ -int tclCallback (ClientData client_data, Tcl_Interp *interp, - int argc, Tcl_Obj *CONST args[]) -{ - Zinc *zinc = (Zinc*) client_data; - int cb; - ZincItem *item; - void *userData; - ZincEvent *ev; - long value; - - //count arguments - if ((argc != WIDGETCB_COUNT + EVENT_COUNT) && (argc != ITEMCB_COUNT + EVENT_COUNT)) - { - Tcl_SetResult (Zinc::interp, "Zinclib: Invalid argument count in tclCallback", NULL); - return TCL_ERROR; - } - // skip the bind name - args++; - - // get the item if this is an item bind - if (argc == ITEMCB_COUNT + EVENT_COUNT) - { - // retreive item - z_tcl_call2 (Tcl_GetLongFromObj (interp, args[0], &value), - "Zinclib: No item in tclCallback"); - item = (ZincItem*) value; - args++; - } - - // retreive callback - z_tcl_call2 (Tcl_GetLongFromObj (interp, args[0], &value), - "Zinclib: No callback in tclCallback"); - cb = value; - - // retreive userdata - args++; - z_tcl_call2 (Tcl_GetLongFromObj (interp, args[0], &value), - "Zinclib: No userData in tclCallback"); - userData = (void*) value; - - // point args to events values - args++; - //fill event structure with all avent values we support - ev = new ZincEvent; - // x position of the mouse - if (Tcl_GetIntFromObj (interp, args[0], &(ev->x)) != TCL_OK) - { - ev->x = 0; - } - // y position of the mouse - if (Tcl_GetIntFromObj (interp, args[1], &(ev->y)) != TCL_OK) - { - ev->y = 0; - } - // keycode - if (Tcl_GetIntFromObj (interp, args[2], &(ev->k)) != TCL_OK) - { - ev->k = 0; - } - // timestamp - if (Tcl_GetLongFromObj (interp, args[3], &(ev->t)) != TCL_OK) - { - ev->t = 0; - } - // keysyms - ev->K = String (Tcl_GetString (args[4])); - // window height - if (Tcl_GetIntFromObj (interp, args[5], &(ev->h)) != TCL_OK) - { - ev->h = 0; - } - // window width - if (Tcl_GetIntFromObj (interp, args[6], &(ev->w)) != TCL_OK) - { - ev->w = 0; - } - // x position of the mouse within display - if (Tcl_GetIntFromObj (interp, args[7], &(ev->X)) != TCL_OK) - { - ev->X = 0; - } - // y position of the mouse within display - if (Tcl_GetIntFromObj (interp, args[8], &(ev->Y)) != TCL_OK) - { - ev->Y = 0; - } - // button pressed - if (Tcl_GetIntFromObj (interp, args[9], &(ev->b)) != TCL_OK) - { - ev->b = 0; - } - - // Call the callback - if (argc == ITEMCB_COUNT + EVENT_COUNT) - { - // this is a callback on an item - ZincItemCallback itemCb = (ZincItemCallback)cb; - (*itemCb) (zinc, item, ev, userData); - } - else - { - // this is a callback on the zinc widget - ZincWidgetCallback zincCb = (ZincWidgetCallback)cb; - (*zincCb) (zinc, ev, userData); - } - - delete ev; - return TCL_OK; -} - -/** - * Bind a function to an event on the zinc widget - * - * @param eventSpecification tcl style event specicication - * @param callBack the function which will be called back - * @param userData data we will give back to the callback when called - * @param add false to replace existing bind or true to add - */ -void Zinc::bind (String eventSpecification, - ZincWidgetCallback callBack, void *userData, bool add) -{ - // call bind .zinc eventSpec script - const char* para[4]; - para[0] = "bind"; - para[1] = window.c_str (); - para[2] = eventSpecification.c_str (); - - //create callback script - // this script is a call to the tclCallback function using all arguments we need - String script; - // do we add or replace the callback - if (add) - { - script = String("+"); - } - script += tclCb + " "; // name of the tcl function we created - script += ltos ((long)callBack) + " "; // the real callback (as a pointer) - script += ltos ((long)userData) + " "; // the user data (as a pointer) - script += "%x %y %k %t %K %h %w %X %Y %b";// arguments for the event structure - para[3] = script.c_str (); - - //call the command with 4 arguments - z_tcl_call ((*bndCmdInfo.proc)(bndCmdInfo.clientData, interp, 4, para), - "bind Failed : "); -} - -/** - * Annulate a binding - * - * @param eventSpecification tcl style event specicication - */ -void Zinc::unbind (String eventSpecification) -{ - // call bind .zinc eventSpec "" - const char* para[4];; - para[0] = "bind"; - para[1] = window.c_str (); - para[2] = eventSpecification.c_str (); - para[3] = ""; - - //call the command with 4 arguments - z_tcl_call ((*bndCmdInfo.proc)(bndCmdInfo.clientData, interp, 4, para), - "unbind Failed : "); -} - -/** - * Bind a function to an event on an item - * - * @param item the item on which to bind - * @param eventSpecification tcl style event specicication - * @param callBack the function which will be called back - * @param userData data we will give back to the callback when called - */ -void Zinc::itemBind (ZincItem *item, String eventSpec, - ZincItemCallback callBack, void *userData, bool add) -{ - // call .zinc bind item eventSpec script - p1[0] = id; - p1[1] = ZFCT_bind; - p1[2] = item->object; - p1[3] = Z_STR_POOL (0, eventSpec.c_str (), eventSpec.length ()); - - //create callback script - // this script is a call to the tclCallback function using all arguments we need - String script; - // do we add or replace the callback - if (add) - { - script = String("+"); - } - script += tclCb + " "; // name of the tcl function we created - script += ltos ((long)item) + " "; // the item (as a pointer) - script += ltos ((long)callBack) + " "; // the real callback (as a pointer) - script += ltos ((long)userData) + " "; // the user data (as a pointer) - script += "%x %y %k %t %K %h %w %X %Y %b"; // arguments for the event structure - p1[4] = Z_STR_POOL (1, script.c_str (), script.length ()); - - // call the widget command with 5 arguments - z_command (5, "itemBind Failed : "); -} - -/** - * Annulate a binding - * - * @param item the item on which to unbind - * @param eventSpecification tcl style event specicication - */ -void Zinc::itemUnbind (ZincItem *item, String eventSpec) -{ - // call .zinc bind item eventSpec "" - p1[0] = id; - p1[1] = ZFCT_bind; - p1[2] = item->object; - p1[3] = Z_STR_POOL (0, eventSpec.c_str (), eventSpec.length ()); - p1[4] = Z_STR_POOL (1, "", -1); - - //call the command with 5 arguments - z_command (5, "itemUnbind Failed : "); -} - -/******************************************************* - STATIC PROCEDURES -*******************************************************/ - -/** - * 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. - */ - -/** - * Loads the zinc library and initialize tcl and tk - * - * @param argv0 the name of the executable as passed in argv[0] - */ -void Zinc::loadZinc (char *argv0) throw (ZincException) -{ - //Initialise internal TCL structure - Tcl_FindExecutable (argv0); - //Create an interpreter - interp = Tcl_CreateInterp(); - if (interp == NULL) - { - throw ZincException("Tcl_CreateInterp Error", __FILE__, __LINE__); - } - - // set display - Tcl_SetVar(interp, "env", "DISPLAY", TCL_GLOBAL_ONLY); - //remove prompt - Tcl_SetVar(interp, "tcl_interactive", "0", TCL_GLOBAL_ONLY); - - // needed for Default system startup file for Tcl-based applications - z_tcl_call (Tcl_Init(interp), "Tcl_Init failed : "); - - //Initialize Tk -// Tk_Init(interp); - - z_tcl_call (Tk_Init (interp), "Tk_Init failed : "); - - //Initialize Zinc - z_tcl_call (Tkzinc_Init (interp), "Tkzinc_Init failed :"); - - // Load Img package in order to handle PNG, JPEG, .. - z_tcl_call (Tcl_GlobalEval (interp, "package require Img"), "Package Img not found"); - - //Initialize objects pool - for (int i(0); iitemconfigure ( -closed ) - * - * @param item the item to configure - * @param value the closed to set - */ -void Zinc::itemSetClosed (ZincItem * item, bool value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_closed; - p1[4] = Z_BOO_POOL (1, value); - - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetClosed Failed : "); -} - -/** - * Call zinc->itemcget ( -closed ) - * - * @param item the item to get closed from - * @return closed value - */ -bool Zinc::itemGetClosed (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_closed; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetClosed Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &value), - "itemGetClosed Failed : "); - return bool (value); -} - -/** - * Call zinc->itemconfigure ( -composealpha ) - * - * @param item the item to configure - * @param value the composealpha to set - */ -void Zinc::itemSetComposealpha (ZincItem * item, bool value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_composealpha; - p1[4] = Z_BOO_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetComposealpha Failed : "); -} - -/** - * Call zinc->itemcget ( -composealpha ) - * - * @param item the item to get composealpha from - * @return composealpha value - */ -bool Zinc::itemGetComposealpha (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_composealpha; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetComposealpha Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &value), - "itemGetComposealpha Failed : "); - return bool (value); -} - -/** - * Call zinc->itemconfigure ( -composerotation ) - * - * @param item the item to configure - * @param value the composerotation to set - */ -void Zinc::itemSetComposerotation (ZincItem * item, bool value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_composerotation; - p1[4] = Z_BOO_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetComposerotation Failed : "); -} - -/** - * Call zinc->itemcget ( -composerotation ) - * - * @param item the item to get composerotation from - * @return composerotation value - */ -bool Zinc::itemGetComposerotation (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_composerotation; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetComposerotation Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &value), - "itemGetComposerotation Failed : "); - return (bool)value; -} - -/** - * Call zinc->itemconfigure ( -composescale ) - * - * @param item the item to configure - * @param value the composescale to set - */ -void Zinc::itemSetComposescale (ZincItem * item, bool value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_composescale; - p1[4] = Z_BOO_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetComposescale Failed : "); -} - -/** - * Call zinc->itemcget ( -composescale ) - * - * @param item the item to get composescale from - * @return composescale value - */ -bool Zinc::itemGetComposescale (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_composescale; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetComposescale Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &value), - "itemGetComposescale Failed : "); - return (bool)value; -} - -/** - * Call zinc->itemconfigure ( -extent ) - * - * @param item the item to configure - * @param value the extent to set - */ -void Zinc::itemSetExtent (ZincItem * item, unsigned int value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_extent; - p1[4] = Z_INT_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetExtent Failed : "); -} - -/** - * Call zinc->itemcget ( -extent ) - * - * @param item the item to get extent from - * @return extent value - */ -unsigned int Zinc::itemGetExtent (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_extent; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetExtent Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &value), - "itemGetExtent Failed : "); - return (unsigned int)value; -} - -/** - * Call zinc->itemconfigure ( -fillcolor ) - * - * @param item the item to configure - * @param value the fillcolor to set - */ -void Zinc::itemSetFillcolor (ZincItem * item, String value) -{ - //Warning, weird bug workaround - // here is a deep copy - // without this, on frequent calls, tcl mays segfault - String tmp = String(value.c_str ()); - - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_fillcolor; - p1[4] = Z_STR_POOL (1, tmp.c_str (), -1); - //call the zinc function in with 5 arguments internal form - z_command (5, "itemSetFillcolor Failed : "); -} - -/** - * Call zinc->itemcget ( -fillcolor ) - * - * @param item the item to get fillcolor from - * @return fillcolor value - */ -String Zinc::itemGetFillcolor (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_fillcolor; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetFillcolor Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - return String (Tcl_GetStringFromObj (tmp, NULL)); -} - -/** - * Call zinc->itemconfigure ( -filled ) - * - * @param item the item to configure - * @param value the filled to set - */ -void Zinc::itemSetFilled (ZincItem * item, bool value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_filled; - p1[4] = Z_BOO_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetFilled Failed : "); -} - -/** - * Call zinc->itemcget ( -filled ) - * - * @param item the item to get filled from - * @return filled value - */ -bool Zinc::itemGetFilled (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_filled; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetFilled Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &value), - "itemGetFilled Failed : "); - return (bool)value; -} - -/** - * Call zinc->itemconfigure ( -fillpattern ) - * - * @param item the item to configure - * @param value the fillpattern to set - */ -void Zinc::itemSetFillpattern (ZincItem * item, ZincBitmap *value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_fillpattern; - p1[4] = value->object; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetFillpattern Failed : "); -} - -/** - * Call zinc->itemcget ( -fillpattern ) - * - * @param item the item to get fillpattern from - * @return fillpattern value - */ -ZincBitmap * Zinc::itemGetFillpattern (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_fillpattern; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetFillpattern Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - return new ZincBitmap (tmp, true); -} - -/** - * Call zinc->itemconfigure ( -linecolor ) - * - * @param item the item to configure - * @param value the linecolor to set - */ -void Zinc::itemSetLinecolor (ZincItem * item, String value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_linecolor; - p1[4] = Z_STR_POOL (1, value.c_str (), value.length ()); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetLinecolor Failed : "); -} - -/** - * Call zinc->itemcget ( -linecolor ) - * - * @param item the item to get linecolor from - * @return linecolor value - */ -String Zinc::itemGetLinecolor (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_linecolor; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetLinecolor Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - return String (Tcl_GetStringFromObj (tmp, NULL)); -} - -/** - * Call zinc->itemconfigure ( -linepattern ) - * - * @param item the item to configure - * @param value the linepattern to set - */ -void Zinc::itemSetLinepattern (ZincItem * item, ZincBitmap * value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_linepattern; - p1[4] = value->object; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetLinepattern Failed : "); -} - -/** - * Call zinc->itemcget ( -linepattern ) - * - * @param item the item to get linepattern from - * @return linepattern value - */ -ZincBitmap * Zinc::itemGetLinepattern (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_linepattern; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetLinepattern Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - return new ZincBitmap (tmp, true); -} - -/** - * Call zinc->itemconfigure ( -linestyle ) - * - * @param item the item to configure - * @param value the linestyle to set - */ -void Zinc::itemSetLinestyle (ZincItem * item, lineStyle value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_linestyle; - p1[4] = lineStyles[value]; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetLinestyle Failed : "); -} - -/** - * Call zinc->itemcget ( -linestyle ) - * - * @param item the item to get linestyle from - * @return linestyle value - */ -lineStyle Zinc::itemGetLinestyle (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_linestyle; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetLinestyle Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIndexFromObj (interp, tmp, - lineStylesStrings, - "lineStyles", - 0, &value), - "itemGetLinestyle Failed : "); - return (lineStyle)value; -} - -/** - * Call zinc->itemconfigure ( -linewidth ) - * - * @param item the item to configure - * @param value the linewidth to set - */ -void Zinc::itemSetLinewidth (ZincItem * item, double value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_linewidth; - p1[4] = Z_DBL_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetLinewidth Failed : "); -} - -/** - * Call zinc->itemcget ( -linewidth ) - * - * @param item the item to get linewidth from - * @return linewidth value - */ -double Zinc::itemGetLinewidth (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_linewidth; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetLinewidth Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - double value; - z_tcl_call (Tcl_GetDoubleFromObj (interp, tmp, &value), - "itemGetLinewidth Failed : "); - return (double)value; -} - -/** - * Call zinc->itemconfigure ( -pieslice ) - * - * @param item the item to configure - * @param value the pieslice to set - */ -void Zinc::itemSetPieslice (ZincItem * item, bool value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_pieslice; - p1[4] = Z_BOO_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetPieslice Failed : "); -} - -/** - * Call zinc->itemcget ( -pieslice ) - * - * @param item the item to get pieslice from - * @return pieslice value - */ -bool Zinc::itemGetPieslice (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_pieslice; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetPieslice Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &value), - "itemGetPieslice Failed : "); - return (bool)value; -} - -/** - * Call zinc->itemconfigure ( -priority ) - * - * @param item the item to configure - * @param value the priority to set - */ -void Zinc::itemSetPriority (ZincItem * item, unsigned int value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_priority; - p1[4] = Z_INT_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetPriority Failed : "); -} - -/** - * Call zinc->itemcget ( -priority ) - * - * @param item the item to get priority from - * @return priority value - */ -unsigned int Zinc::itemGetPriority (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_priority; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetPriority Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &value), - "itemGetPriority Failed : "); - return (unsigned int)value; -} - -/** - * Call zinc->itemconfigure ( -sensitive ) - * - * @param item the item to configure - * @param value the sensitive to set - */ -void Zinc::itemSetSensitive (ZincItem * item, bool value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_sensitive; - p1[4] = Z_BOO_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetSensitive Failed : "); -} - -/** - * Call zinc->itemcget ( -sensitive ) - * - * @param item the item to get sensitive from - * @return sensitive value - */ -bool Zinc::itemGetSensitive (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_sensitive; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetSensitive Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &value), - "itemGetSensitive Failed : "); - return (bool)value; -} - -/** - * Call zinc->itemconfigure ( -startangle ) - * - * @param item the item to configure - * @param value the startangle to set - */ -void Zinc::itemSetStartangle (ZincItem * item, unsigned int value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_startangle; - p1[4] = Z_INT_POOL (1, value); - //call the zinc function with 5 argumentsin internal form - z_command (5, "itemSetStartangle Failed : "); -} - -/** - * Call zinc->itemcget ( -startangle ) - * - * @param item the item to get startangle from - * @return startangle value - */ -unsigned int Zinc::itemGetStartangle (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_startangle; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetStartangle Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &value), - "itemGetStartangle Failed : "); - return (unsigned int)value; -} - -/** - * Call zinc->itemconfigure ( -tile ) - * - * @param item the item to configure - * @param value the tile to set - */ -void Zinc::itemSetTile (ZincItem * item, ZincBitmap * value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_tile; - p1[4] = value->object; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetTile Failed : "); -} - -/** - * Call zinc->itemcget ( -tile ) - * - * @param item the item to get tile from - * @return tile value - */ -ZincBitmap * Zinc::itemGetTile (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_tile; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetTile Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - return new ZincBitmap (tmp, true); -} - -/** - * Call zinc->itemconfigure ( -visible ) - * - * @param item the item to configure - * @param value the visible to set - */ -void Zinc::itemSetVisible (ZincItem * item, bool value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_visible; - p1[4] = Z_BOO_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetVisible Failed : "); -} - -/** - * Call zinc->itemcget ( -visible ) - * - * @param item the item to get visible from - * @return visible value - */ -bool Zinc::itemGetVisible (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_visible; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetVisible Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &value), - "itemGetVisible Failed : "); - return (bool)value; -} - -/** - * Call zinc->itemconfigure ( -capstyle ) - * - * @param item the item to configure - * @param value the capstyle to set - */ -void Zinc::itemSetCapstyle (ZincItem * item, capStyle value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_capstyle; - p1[4] = capStyles[value]; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetCapstyle Failed : "); -} - -/** - * Call zinc->itemcget ( -capstyle ) - * - * @param item the item to get capstyle from - * @return capstyle value - */ -capStyle Zinc::itemGetCapstyle (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_capstyle; - //call the zinc function with 4 argumentsin internal form - z_command (4, "itemGetCapstyle Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIndexFromObj (interp, tmp, - capStylesStrings, - "capStyles", - 0, &value), - "itemGetCapstyle Failed : "); - return (capStyle)value; -} - -/** - * Call zinc->itemconfigure ( -fillrule ) - * - * @param item the item to configure - * @param value the fillrule to set - */ -void Zinc::itemSetFillrule (ZincItem * item, fillRule value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_fillrule; - p1[4] = fillRules[value]; - //call the zinc function with 5 argumentsin internal form - z_command (5, "itemSetFillrule Failed : "); -} - -/** - * Call zinc->itemcget ( -fillrule ) - * - * @param item the item to get fillrule from - * @return fillrule value - */ -fillRule Zinc::itemGetFillrule (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_fillrule; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetFillrule Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIndexFromObj (interp, tmp, - fillRulesStrings, - "fillRules", - 0, &value), - "itemGetFillrule Failed : "); - return (fillRule)value; -} - -/** - * Call zinc->itemconfigure ( -joinstyle ) - * - * @param item the item to configure - * @param value the joinstyle to set - */ -void Zinc::itemSetJoinstyle (ZincItem * item, joinStyle value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_joinstyle; - p1[4] = joinStyles[value]; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetJoinstyle Failed : "); -} - -/** - * Call zinc->itemcget ( -joinstyle ) - * - * @param item the item to get joinstyle from - * @return joinstyle value - */ -joinStyle Zinc::itemGetJoinstyle (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_joinstyle; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetJoinstyle Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIndexFromObj (interp, tmp, - joinStylesStrings, - "joinStyles", - 0, &value), - "itemGetJoinstyle Failed : "); - return (joinStyle)value; -} - -/** - * Call zinc->itemconfigure ( -relief ) - * - * @param item the item to configure - * @param value the relief to set - */ -void Zinc::itemSetRelief (ZincItem * item, relief value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_relief; - p1[4] = reliefs[value]; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetRelief Failed : "); -} - -/** - * Call zinc->itemcget ( -relief ) - * - * @param item the item to get relief from - * @return relief value - */ -relief Zinc::itemGetRelief (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_relief; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetRelief Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIndexFromObj (interp, tmp, - reliefsStrings, - "reliefs", - 0, &value), - "itemGetRelief Failed : "); - return (relief)value; -} - -/** - * Call zinc->itemconfigure ( -smoothrelief ) - * - * @param item the item to configure - * @param value the smoothrelief to set - */ -void Zinc::itemSetSmoothrelief (ZincItem * item, bool value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_smoothrelief; - p1[4] = Z_BOO_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetSmoothrelief Failed : "); -} - -/** - * Call zinc->itemcget ( -smoothrelief ) - * - * @param item the item to get smoothrelief from - * @return smoothrelief value - */ -bool Zinc::itemGetSmoothrelief (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_smoothrelief; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetSmoothrelief Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &value), - "itemGetSmoothrelief Failed : "); - return (bool)value; -} - -/** - * Call zinc->itemconfigure ( -alpha ) - * - * @param item the item to configure - * @param value the alpha to set - */ -void Zinc::itemSetAlpha (ZincItem * item, unsigned int value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_alpha; - p1[4] = Z_INT_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetAlpha Failed : "); -} - -/** - * Call zinc->itemcget ( -alpha ) - * - * @param item the item to get alpha from - * @return alpha value - */ -unsigned int Zinc::itemGetAlpha (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_alpha; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetAlpha Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &value), - "itemGetAlpha Failed : "); - return (unsigned int)value; -} - -/** - * Call zinc->itemconfigure ( -atomic ) - * - * @param item the item to configure - * @param value the atomic to set - */ -void Zinc::itemSetAtomic (ZincItem * item, bool value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_atomic; - p1[4] = Z_BOO_POOL (1, value); - //call the zinc function in with 5 arguments internal form - z_command (5, "itemSetAtomic Failed : "); -} - -/** - * Call zinc->itemcget ( -atomic ) - * - * @param item the item to get atomic from - * @return atomic value - */ -bool Zinc::itemGetAtomic (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_atomic; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetAtomic Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &value), - "itemGetAtomic Failed : "); - return (bool)value; -} - -/** - * Call zinc->itemconfigure ( -clip ) - * - * @param item the item to configure - * @param value the clip to set - */ -void Zinc::itemSetClip (ZincItem * item, ZincItem * value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_clip; - p1[4] = value->object; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetClip Failed : "); -} - -/** - * Call zinc->itemcget ( -clip ) - * - * @param item the item to get clip from - * @return clip value - */ -ZincItem * Zinc::itemGetClip (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_clip; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetClip Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - return new ZincItem(tmp); -} - -/** - * Call zinc->itemconfigure ( -anchor ) - * - * @param item the item to configure - * @param value the anchor to set - */ -void Zinc::itemSetAnchor (ZincItem * item, anchor value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_anchor; - p1[4] = anchors[value]; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetAnchor Failed : "); -} - -/** - * Call zinc->itemcget ( -anchor ) - * - * @param item the item to get anchor from - * @return anchor value - */ -anchor Zinc::itemGetAnchor (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_anchor; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetAnchor Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIndexFromObj (interp, tmp, - anchorsStrings, - "anchors", - 0, &value), - "itemGetAnchor Failed : "); - return (anchor)value; -} - -/** - * Call zinc->itemconfigure ( -color ) - * - * @param item the item to configure - * @param value the color to set - */ -void Zinc::itemSetColor (ZincItem * item, String value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_color; - p1[4] = Z_STR_POOL (1, value.c_str (), value.length ()); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetColor Failed : "); -} - -/** - * Call zinc->itemcget ( -color ) - * - * @param item the item to get color from - * @return color value - */ -String Zinc::itemGetColor (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_color; - //call the zinc function with 4 argument in internal form - z_command (4, "itemGetColor Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - return String (Tcl_GetStringFromObj (tmp, NULL)); -} - -/** - * Call zinc->itemconfigure ( -connecteditem ) - * - * @param item the item to configure - * @param value the connecteditem to set - */ -void Zinc::itemSetConnecteditem (ZincItem * item, ZincItem * value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_connecteditem; - p1[4] = value->object; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetConnecteditem Failed : "); -} - -/** - * Call zinc->itemcget ( -connecteditem ) - * - * @param item the item to get connecteditem from - * @return connecteditem value - */ -ZincItem * Zinc::itemGetConnecteditem (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_connecteditem; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetConnecteditem Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - return new ZincItem(tmp); -} - -/** - * Call zinc->itemconfigure ( -connectionanchor ) - * - * @param item the item to configure - * @param value the connectionanchor to set - */ -void Zinc::itemSetConnectionanchor (ZincItem * item, anchor value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_connectionanchor; - p1[4] = anchors[value]; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetConnectionanchor Failed : "); -} - -/** - * Call zinc->itemcget ( -connectionanchor ) - * - * @param item the item to get connectionanchor from - * @return connectionanchor value - */ -anchor Zinc::itemGetConnectionanchor (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_connectionanchor; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetConnectionanchor Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIndexFromObj (interp, tmp, - anchorsStrings, - "anchors", - 0, &value), - "itemGetConnectionanchor Failed : "); - return (anchor)value; -} - -/** - * Call zinc->itemconfigure ( -image ) - * - * @param item the item to configure - * @param value the image to set - */ -void Zinc::itemSetImage (ZincItem * item, ZincImage * value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_image; - p1[4] = value->object; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetImage Failed : "); -} - -/** - * Call zinc->itemcget ( -image ) - * - * @param item the item to get image from - * @return image value - */ -ZincImage * Zinc::itemGetImage (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_image; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetImage Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - return new ZincImage(tmp, true); -} - -/** - * Call zinc->itemconfigure ( -mask ) - * - * @param item the item to configure - * @param value the mask to set - */ -void Zinc::itemSetMask (ZincItem * item, ZincBitmap * value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_mask; - p1[4] = value->object; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetMask Failed : "); -} - -/** - * Call zinc->itemcget ( -mask ) - * - * @param item the item to get mask from - * @return mask value - */ -ZincBitmap * Zinc::itemGetMask (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_mask; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetMask Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - return new ZincBitmap (tmp, true); -} - -/** - * Call zinc->itemconfigure ( -alignment ) - * - * @param item the item to configure - * @param value the alignment to set - */ -void Zinc::itemSetAlignment (ZincItem * item, alignment value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_alignment; - p1[4] = alignments[value]; - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetAlignment Failed : "); -} - -/** - * Call zinc->itemcget ( -alignment ) - * - * @param item the item to get alignment from - * @return alignment value - */ -alignment Zinc::itemGetAlignment (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_alignment; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetAlignment Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIndexFromObj (interp, tmp, - alignmentsStrings, - "alignments", - 0, &value), - "itemGetAlignment Failed : "); - return (alignment)value; -} - -/** - * Call zinc->itemconfigure ( -font ) - * - * @param item the item to configure - * @param value the font to set - */ -void Zinc::itemSetFont (ZincItem * item, ZincFont * value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_font; - p1[4] = Z_STR_POOL (0, value->name.c_str(), value->name.length()); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetFont Failed : "); -} - -/** - * Call zinc->itemcget ( -font ) - * - * @param item the item to get font from - * @return font value - */ -ZincFont * Zinc::itemGetFont (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_font; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetFont Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - return new ZincFont (Tcl_GetStringResult (interp)); -} - -/** - * Call zinc->itemconfigure ( -overstriked ) - * - * @param item the item to configure - * @param value the overstriked to set - */ -void Zinc::itemSetOverstriked (ZincItem * item, bool value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_overstriked; - p1[4] = Z_BOO_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetOverstriked Failed : "); -} - -/** - * Call zinc->itemcget ( -overstriked ) - * - * @param item the item to get overstriked from - * @return overstriked value - */ -bool Zinc::itemGetOverstriked (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_overstriked; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetOverstriked Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &value), - "itemGetOverstriked Failed : "); - return (bool)value; -} - -/** - * Call zinc->itemconfigure ( -spacing ) - * - * @param item the item to configure - * @param value the spacing to set - */ -void Zinc::itemSetSpacing (ZincItem * item, short value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_spacing; - p1[4] = Z_INT_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetSpacing Failed : "); -} - -/** - * Call zinc->itemcget ( -spacing ) - * - * @param item the item to get spacing from - * @return spacing value - */ -short Zinc::itemGetSpacing (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_spacing; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetSpacing Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &value), - "itemGetSpacing Failed : "); - return (short)value; -} - -/** - * Call zinc->itemconfigure ( -text ) - * - * @param item the item to configure - * @param value the text to set - */ -void Zinc::itemSetText (ZincItem * item, String value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_text; - p1[4] = Z_STR_POOL (1, value.c_str (), value.length ()); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetText Failed : "); -} - -/** - * Call zinc->itemcget ( -text ) - * - * @param item the item to get text from - * @return text value - */ -String Zinc::itemGetText (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_text; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetText Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - return String (Tcl_GetStringFromObj (tmp, NULL)); -} - -/** - * Call zinc->itemconfigure ( -underlined ) - * - * @param item the item to configure - * @param value the underlined to set - */ -void Zinc::itemSetUnderlined (ZincItem * item, bool value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_underlined; - p1[4] = Z_BOO_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetUnderlined Failed : "); -} - -/** - * Call zinc->itemcget ( -underlined ) - * - * @param item the item to get underlined from - * @return underlined value - */ -bool Zinc::itemGetUnderlined (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_underlined; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetUnderlined Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetBooleanFromObj (interp, tmp, &value), - "itemGetUnderlined Failed : "); - return (bool)value; -} - -/** - * Call zinc->itemconfigure ( -width ) - * - * @param item the item to configure - * @param value the width to set - */ -void Zinc::itemSetWidth (ZincItem * item, unsigned short value) -{ - //prepare arguments : .zinc itemconfigure item attribute value - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_width; - p1[4] = Z_INT_POOL (1, value); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetWidth Failed : "); -} - -/** - * Call zinc->itemcget ( -width ) - * - * @param item the item to get width from - * @return width value - */ -unsigned short Zinc::itemGetWidth (ZincItem * item) -{ - Tcl_Obj* tmp; - //discard all old results - Tcl_ResetResult (interp); - //prepare arguments : .zinc itemcget item - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_width; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetWidth Failed : "); - - //retreive the result trough the tcl interpreter and convert it - tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &value), - "itemGetWidth Failed : "); - return (unsigned short)value; -} - - - -/******************************************************* - END OF AUTOGENERATED METHODS -*******************************************************/ - - -/** - * 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. - */ -/** - * Call zinc->itemconfigure ( -firstend ) - * - * @param item the item to get width from - * @param a,b,c values used to set end - */ -void Zinc::itemSetFirstend (ZincItem * item, double a, double b, double c) -{ - String value = dtos (a) + " " + dtos (b) + " " + dtos (c); - // call .zinc itemconfigure item -firstend "a b c" - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_firstend; - p1[4] = Z_STR_POOL (1, value.c_str (), value.length ()); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetFirstend Failed : "); -} - - -/** - * Call zinc->itemcget ( -firstend ) - * - * @param item the item to get width from - * @param a,b,c values used to sedwhere we'll put end - */ -void Zinc::itemGetFirstend (ZincItem * item, double *a, double *b, double *c) -{ - Tcl_Obj *tmp; - int argc; - char * line; - - //discard old results - Tcl_ResetResult (interp); - // call .zinc itemcget item -firstend - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_firstend; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetFirstend Failed : "); - - //get the result as a string - tmp = Tcl_GetObjResult (interp); - line = Tcl_GetStringFromObj (tmp, NULL); - - //interpret the string a 3 double - argc = sscanf(line, "%lf %lf %lf", a, b, c); - if (argc != 3) - { - throw ZincException (String("itemGetFirstend Failed"), __FILE__, __LINE__); - } -} - -/** - * Call zinc->itemconfigure ( -lastend ) - * - * @param item the item to get width from - * @param a,b,c values used to set end - */ -void Zinc::itemSetLastend (ZincItem * item, double a, double b, double c) -{ - String value = dtos (a) + " " + dtos (b) + " " + dtos (c); - // call .zinc itemconfigure item -lastend "a b c" - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_lastend; - p1[4] = Z_STR_POOL (1, value.c_str (), value.length ()); - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetLastend Failed : "); -} - -/** - * Call zinc->itemcget ( -lastend ) - * - * @param item the item to get width from - * @param a,b,c values used to sedwhere we'll put end - */ -void Zinc::itemGetLastend (ZincItem * item, double *a, double *b, double *c) -{ - Tcl_Obj *tmp; - int argc; - char * line; - - //discard old results - Tcl_ResetResult (interp); - // call .zinc itemcget item -lastend - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_lastend; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetLastend Failed : "); - - //get the result as a string - tmp = Tcl_GetObjResult (interp); - line = Tcl_GetStringFromObj (tmp, NULL); - - //interpret the string a 3 double - argc = sscanf(line, "%lf %lf %lf", a, b, c); - if (argc != 3) - { - throw ZincException (String("itemGetLastend Failed"), __FILE__, __LINE__); - } -} - -/** - * Call zinc->itemconfigure ( -position ) - * - * @param item the item to get width fromset position to - * @param x,y position - */ -void Zinc::itemSetPosition (ZincItem * item, double x, double y) -{ - // call .zinc itemconfigure item -position {x y} - p1[0] = id; - p1[1] = ZFCT_itemconfigure; - p1[2] = item->object; - p1[3] = ZOPT_position; - //make a pair - p2[0] = Z_DBL_POOL (1, x); - p2[1] = Z_DBL_POOL (2, y); - p1[4] = Z_LST_POOL (3, p2, 2); // a list of 2 items - //call the zinc function with 5 arguments in internal form - z_command (5, "itemSetPosition Failed : "); - // clean the list No 3 in the pool - Z_CLEANLIST (3); -} - -/** - * Call zinc->itemcget ( -position ) - * - * @param item the item to get position from - * @param x,y position - */ -void Zinc::itemGetPosition (ZincItem * item, double *x, double *y) -{ - Tcl_Obj *tmp; - int num; - Tcl_Obj** elems; - - //discard old results - Tcl_ResetResult (interp); - // call .zinc itemcget item -position - p1[0] = id; - p1[1] = ZFCT_itemcget; - p1[2] = item->object; - p1[3] = ZOPT_position; - //call the zinc function with 4 arguments in internal form - z_command (4, "itemGetPosition Failed : "); - - //retreive the result as a list - tmp = Tcl_GetObjResult (interp); - z_tcl_call (Tcl_ListObjGetElements (interp, tmp, &num, &elems), - "itemGetPosition Failed : "); - - //num is necessarily 2 extract 2 double - z_tcl_call (Tcl_GetDoubleFromObj(interp, elems[0], x), - "itemGetPosition Failed : "); - z_tcl_call (Tcl_GetDoubleFromObj(interp, elems[0], y), - "itemGetPosition Failed : "); -} - -/** - * Create an image object - * - * @param the image reference (a file name) - * @param isPhoto true for a picture, false for an X11 bitmap - */ -ZincImage* Zinc::createImageFromFile (String image) -{ - const char* para[5]; - //discard old results - Tcl_ResetResult (interp); - // prepare arguments to call : image create (photo|bitmap) -file image - para[0] = "image"; - para[1] = "create"; - para[2] = "photo"; - para[3] = "-file"; - para[4] = image.c_str (); - - // call the function with 5 arguments and check for error - z_tcl_call ((*imgCmdInfo.proc)(imgCmdInfo.clientData, interp, 5, para), - "createImageFromFile Failed : "); - return new ZincImage (Tcl_GetObjResult (interp)); -} - -/** - * Create an image object - * - * @param the image reference (a base64 String or binary data) - * @param isPhoto true for a picture, false for an X11 bitmap - */ -ZincImage* Zinc::createImageFromData (String image) -{ - const char* para[5]; - //discard old results - Tcl_ResetResult (interp); - // prepare arguments to call : image create (photo|bitmap) -data image - para[0] = "image"; - para[1] = "create"; - para[2] = "photo"; - para[3] = "-data"; - para[4] = image.c_str (); - - // call the function with 5 arguments and check for error - z_tcl_call ((*imgCmdInfo.proc)(imgCmdInfo.clientData, interp, 5, para), - "createImageFromData Failed : "); - return new ZincImage (Tcl_GetObjResult (interp)); -} - -/** - * Create a bitmap object from a file - * - * @param image the bitmap reference (a file name) - */ -ZincBitmap* Zinc::createBitmapFromFile (String image) -{ - const char* para[5]; - //discard old results - Tcl_ResetResult (interp); - // prepare arguments to call : image create (photo|bitmap) -file image - para[0] = "image"; - para[1] = "create"; - para[2] = "bitmap"; - para[3] = "-file"; - para[4] = image.c_str (); - - // call the function with 5 arguments and check for error - z_tcl_call ((*imgCmdInfo.proc)(imgCmdInfo.clientData, interp, 5, para), - "createBitmapFromFile Failed : "); - return new ZincBitmap (Tcl_GetObjResult (interp), false); -} - -/** - * Create a bitmap object base64 data - * - * @param image the bitmap reference (a base64 String or binary data) - */ -ZincBitmap* Zinc::createBitmapFromData (String image) -{ - const char* para[5]; - //discard old results - Tcl_ResetResult (interp); - // prepare arguments to call : image create (photo|bitmap) -data image - para[0] = "image"; - para[1] = "create"; - para[2] = "bitmap"; - para[3] = "-data"; - para[4] = image.c_str (); - - // call the function with 5 arguments and check for error - z_tcl_call ((*imgCmdInfo.proc)(imgCmdInfo.clientData, interp, 5, para), - "createBitmapFromData Failed : "); - return new ZincBitmap (Tcl_GetObjResult (interp), false); -} - -/** - * Create a bitmap object using a predefined name - * - * @param image the bitmap reference (a name) - */ -ZincBitmap* Zinc::createBitmapFromName (String image) -{ - return new ZincBitmap (image); -} - -/** - * Create an image object - * - * @param width Width of image - * @param height Height of image - * @param aggBuffer An AGG buffer - */ -ZincImage* Zinc::createImageFromAGGBuffer (int width, int height, unsigned char *aggBuffer) -{ - const char* para[7]; - //discard old results - Tcl_ResetResult (interp); - - // create a blank offscreen image - para[0] = "image"; - para[1] = "create"; - para[2] = "photo"; - para[3] = "-height"; - para[4] = String(itos (height).c_str ()).c_str (); - para[5] = "-width"; - para[6] = String(itos (width).c_str ()).c_str (); - - // call the function with 7 arguments and check for error - z_tcl_call ((*imgCmdInfo.proc)(imgCmdInfo.clientData, interp, 7, para), - "createImageFromBuffer Failed : "); - // save result - ZincImage *result = new ZincImage (Tcl_GetObjResult (interp)); - - // get tcl PhotoImage handle - Tk_PhotoHandle photo; - photo = Tk_FindPhoto (interp, Tcl_GetString (result->object)); - if (photo == NULL) - { - // todo: error - } - - // create a PhotoImageBlock - Tk_PhotoImageBlock block; - block.pixelPtr = aggBuffer; - block.width = width; - block.height = height; - block.pitch = block.width * 3; - block.pixelSize = 3; - block.offset[0] = 0; - block.offset[1] = 1; - block.offset[2] = 2; - block.offset[3] = 0; - - /* copy block to photo image and leave the rest to tk */ - Tk_PhotoPutBlock(photo, &block, 0, 0, block.width, block.height, TK_PHOTO_COMPOSITE_SET); - - // return result - return result; -} - - - -/** - * Create a font object - * - * @param family the font mamily - * @param size if a positive number, it is in points, if a negative number, - * its absolute value is a size in pixels. - * @param bold 1 for a bold font, 0 for a normal font, -1 for unspecified - * @param italic 1 an italic font, 0 for a roman font, -1 for unspecified - * @param underline 1 for an underlined, 0 for a normal font, -1 for - * unspecified - * @param overstrike 1 for an overstriked font, 0 for a normal font, -1 for unspecified - */ -ZincFont* Zinc::createFont (String family, int size, int bold, int italic, - int underline, int overstrike) -{ - const char* para[14]; - //quote family to avoid problems with spaces - - //discard old results - Tcl_ResetResult (interp); - // prepare arguments to call : font create -family family -size size - // -weight weight -slant slant -underline underline -overstrike overstrike - para[0] = "font"; - para[1] = "create"; - para[2] = "-family"; - para[3] = family.c_str (); - para[4] = "-size"; - //Warning, weird bug workaround - // here is a deep copy - // without this, on one MDK10.1 machine tcl sees an empty string - String tmp = String(itos (size).c_str ()); - para[5] = tmp.c_str (); - - // use i as a variable parameter pointer - int i=6; // last parameter is para[5] - //handle default value for weight - if (bold != -1) - { - para[i++] = "-weight"; - para[i++] = bold == 1 ? "bold" : "normal"; - } - //handle default value for italic - if (italic != -1) - { - para[i++] = "-slant"; - para[i++] = italic == 1 ? "italic" : "roman"; - } - //handle default value for underline - if (underline != -1) - { - para[i++] = "-underline"; - para[i++] = underline == 1 ? "true" : "false"; - } - //handle default value for overstrike - if (overstrike != -1) - { - para[i++] = "-overstrike"; - para[i++] = overstrike == 1 ? "true" : "false"; - } - - // call the function with i arguments and check for error - z_tcl_call ((*fntCmdInfo.proc)(fntCmdInfo.clientData, interp, i, para), - "createFont Failed : "); - return new ZincFont (Tcl_GetStringResult (interp)); -} - -/** - * Get font ascent - * - * @param font the font - * @return the font ascent - */ -int Zinc::getFontAscent (ZincFont* font) -{ - const char* para[4]; - - //discard old results - Tcl_ResetResult (interp); - // prepare arguments to call : font metrics font -ascent - para[0] = "font"; - para[1] = "metrics"; - para[2] = font->name.c_str(); - para[3] = "-ascent"; - - // call the function with 4 arguments and check for error - z_tcl_call ((*fntCmdInfo.proc)(fntCmdInfo.clientData, interp, 4, para), - "getFontAscent Failed : "); - - //retreive the result as an integer - Tcl_Obj *tmp = Tcl_GetObjResult (interp); - int value; - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &value), - "getFontAscent Failed : "); - return value; -} - - -/** - * Get Image width - * - * @param ZincImage the image to get width from - * @return the width of the image - */ -int Zinc::getImageWidth (ZincImage *image) -{ - const char* para[3]; - - //discard old results - Tcl_ResetResult (interp); - // prepare arguments to call : image create (photo|bitmap) -data image - para[0] = "image"; - para[1] = "width"; - para[2] = Tcl_GetString (image->object); - - // call the function with 3 arguments and check for error - z_tcl_call ((*imgCmdInfo.proc)(imgCmdInfo.clientData, interp, 3, para), - "getImageWidth Failed : "); - - int value; - // retreive the result as an integer - Tcl_Obj *tmp = Tcl_GetObjResult (interp); - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &value), - "getImageWidth Failed : "); - return value; -} - -/** - * Get Image height - * - * @param ZincImage the image to get height from - * @return the height of the image - */ -int Zinc::getImageHeight (ZincImage *image) -{ - const char* para[3]; - - //discard old results - Tcl_ResetResult (interp); - // prepare arguments to call : image create (photo|bitmap) -data image - para[0] = "image"; - para[1] = "height"; - para[2] = Tcl_GetString (image->object); - - // call the function with 3 arguments and check for error - z_tcl_call ((*imgCmdInfo.proc)(imgCmdInfo.clientData, interp, 3, para), - "getImageHeight Failed : "); - - int value; - // retreive the result as an integer - Tcl_Obj *tmp = Tcl_GetObjResult (interp); - z_tcl_call (Tcl_GetIntFromObj (interp, tmp, &value), - "getImageHeight Failed : "); - return value; -} - -/** - * This is inline because it is called frequently and needs to be optimized - * Use this when you need to call a function that can return a TCL error code. - * - * @param fct the full function call - * @param msg the error message to throw in case of error - */ -void Zinc::z_tcl_call (int result, char* p_msg) throw (ZincException) -{ - if (result != TCL_OK) - { - const char *r; - String msg = "zinclib: "; - if (p_msg != NULL) - { - msg.append (p_msg); - } - r = Tcl_GetStringResult (interp); - if (r != NULL) - { - msg.append (r); - } - throw ZincException (msg, __FILE__, __LINE__ ); - } -} - -/** - * This is a inline because it is called frequently and needs to be optimized - * Use this to call the zinObjectCommand fuction. The call is made using the - * pre allocated table p1, it must contain Tcl_Obj thar are parameters to - * the zinObjectCommand function. A parameter indicate how many parameters - * are passed to the zinObjectCommand function. - * - * @param count the number of parameters in p1 - * @param msg the error message to throw in case of error - */ -void Zinc::z_command (int count, char* p_msg) throw (ZincException) -{ - int result = (*objCmd) (wi, interp, (count), p1); - if (result != TCL_OK) - { - const char *r; - String msg = "zinclib: "; - if (p_msg != NULL) - { - msg.append (p_msg); - } - r = Tcl_GetStringResult (interp); - if (r != NULL) - { - msg.append (r); - } - throw ZincException (msg, __FILE__, __LINE__ ); - } -} diff --git a/zinclib.d/src/Zinc.hpp b/zinclib.d/src/Zinc.hpp deleted file mode 100644 index 417b697..0000000 --- a/zinclib.d/src/Zinc.hpp +++ /dev/null @@ -1,1365 +0,0 @@ -/** Zinc.hpp - * zinclib - * - * This software is the property of IntuiLab SA, France. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Here is the declaration of the Zinc object - * - * 08/03/05 - * - * Contributors: - * Benoit Peccatte - * David Thevenin - * - */ -#include "ZincTypes.hpp" -#include "ZincObjects.hpp" -#include "ZincPath.hpp" -#include "ZincExtern.hpp" -#include - -#ifndef ZINC_HEADER -#define ZINC_HEADER - - -/** Number of objects in the pool */ -const int ZINC_POOL_COUNT = 7; -/** maximum number of parameter in a zinc function */ -const int ZINC_PARAM_COUNT = 10; - -/**Defaults zinc group */ -const int DEFAULT_GROUP = 1; - -/** - * This class contains a zinc widget and members to create and modify items - */ -class Zinc -{ - friend class ZincPath; - -public: - Tcl_Obj *id; ///< the id of this object - WidgetObjCmd objCmd; ///< the command associated with this object - ClientData wi; ///< the zinc object itself - String tclCb; ///< name of the binding callback - int znId; ///< the znCount at creation time - String window; ///< the window which contains the widget - - static int znCount; ///< count to create unique ids - static Tcl_CmdInfo topCmdInfo; ///< the command associated with toplevel - static Tcl_CmdInfo zncCmdInfo; ///< the command associated with zinc - static Tcl_CmdInfo imgCmdInfo; ///< the command associated with image - static Tcl_CmdInfo fntCmdInfo; ///< the command associated with font - static Tcl_CmdInfo focCmdInfo; ///< the command associated with fous - static Tcl_CmdInfo bndCmdInfo; ///< the command associated with bind - static Tcl_Obj* pool[ZINC_POOL_COUNT];///< a pool of tclobj ready to be used - static Tcl_Obj* p1[ZINC_PARAM_COUNT]; ///< table of pointeur use for parameters - static Tcl_Obj* p2[ZINC_PARAM_COUNT]; ///< table of pointeur use for parameters - -public: - static Tcl_Interp *interp; ///< the tcl interpreter - - /** - * The public constructor - * - * @param renderingMode ZINC_BACKEND_X11 or ZINC_BACKEND_OPENGL - */ - Zinc (int renderingMode); - - /** - * The public destructor - */ - ~Zinc (); - - /** - * Change window title - * - * @param title the title string - */ - void setTitle (String title); - -/***************************************** - WIDGET PROPERTIES -*****************************************/ - - /** - * Call zinc->configure ( -backcolor ) - * - * @param value the backcolor to set - */ - void setBackcolor (String value); - - /** - * Call zinc->cget ( -backcolor ) - * - * @return backcolor value - */ - String getBackcolor (); - - /** - * Call zinc->configure ( -forecolor ) - * - * @param value the forecolor to set - */ - void setForecolor (String value); - - /** - * Call zinc->cget ( -forecolor ) - * - * @return forecolor value - */ - String getForecolor (); - - /** - * Call zinc->configure ( -width ) - * - * @param value the width to set - */ - void setWidth (int value); - - /** - * Call zinc->cget ( -width ) - * - * @return width value - */ - int getWidth (); - - /** - * Call zinc->configure ( -height ) - * - * @param value the height to set - */ - void setHeight (int value); - - /** - * Call zinc->cget ( -height ) - * - * @return height value - */ - int getHeight (); - - /** - * Call zinc->configure ( -borderwidth ) - * - * @param value the borderwidth to set - */ - void setBorderwidth (int value); - - /** - * Call zinc->cget ( -borderwidth ) - * - * @return borderwidth value - */ - int getBorderwidth (); - - /** - * Call zinc->configure ( -font ) - * - * @param value the font to set - */ - void setFont (ZincFont* value); - - /** - * Call zinc->cget ( -font ) - * - * @return font value - */ - ZincFont* getFont (); - -/***************************************** - WIDGET METHODS -*****************************************/ - - /** - * Get the bounding box of an item - * - * @param item the item to get bbox - * @param bbox a table where we'll put the bounding box - * bbox[0] = x0, bbox[1] = y0, bbox[2] = xc, bbox[3] = yc - */ - void bbox (ZincItem* item, double bbox[4]); - - /** - * Get the bounding box of an item in its parent group - * - * @param item the item to get bbox in its parent group - * @param bbox a table where we'll put the bounding box - * bbox[0] = x0, bbox[1] = y0, bbox[2] = xc, bbox[3] = yc - */ - void relativeBbox (ZincItem* item, double bbox[4]); - - - /** - * Change the group of an item - * - * @param item the item to move - * @param parentGroup new group for the item - */ - void chggroup (ZincItem *item, ZincItem *parentGroup); - - /** - * Clone an item - * - * @param item the item to clone - * @return the cloned item - */ - ZincItem* clone (ZincItem *item); - - /** - * Get the number of contour of an item - * - * @return number of contour - */ - int contour (ZincItem *item); - - /** - * Set the contour of an item to the one of an other - * - * @param item the item on which we set the contour - * @param flag the operation to do on the contour - * @param reference the item to set contour from - * @return the number of contour - */ - int contour (ZincItem *item, itemOperator flag, ZincItem *reference); - - /** - * Set the contour of an item - * - * @param item the item on which we set the contour - * @param add true to add a path, false to remove - * @param reference the new contour - * @return the number of contour - */ - int contour (ZincItem *item, bool add, ZincPath *contour); - - /** - * Set or modify the coordinates of an item - * - * @param item the item to modify - * @param contour new coords for the item - * @param add true to add coords, false to replace - * @param contourIndex the contour do modify - * @param coordIndex the coordinate to modify (WARNING, path must be one - * point if the is not the default) - */ - void coords (ZincItem *item, ZincPath *contour, bool add, - int contourIndex = -1, int coordIndex = -1); - - /** - * Remove coords of an item - * - * @param item the item to modify - * @param coordIndex the coordinate to rmove - * @param contourIndex the contour on which we remove - */ - void coordsRemove (ZincItem *item, int coordIndex, int contourIndex = -1); - - /** - * Add a tag to an item - * - * @param item the item to add tag to - * @param tag a tag to add - */ - void addTag (ZincItem *item, String tag); - - /** - * Remove a tag from an item - * - * @param item the item to remove tag from - * @param tag a tag to remove (nothing to remove all tags) - */ - void dTag (ZincItem *item, String tag = String("")); - - /** - * List all tags of an item - * It's up to the caller to delete the resulting table and strings - * - * @param item the item to list tag from - * @param lagList a pointer to a table of String containing tags - * @return the number of tags - */ - int getTags (ZincItem *item, String*** tagList); - - /** - * Set the focus to an item - * - * @param item the item to set the focus to - */ - void focus (ZincItem *item); - - /** - * Tell if the name is a gradient name - * - * @param gname a gradient name - * @return true if the name is a gradient name, false otherwise - */ - bool isGname (String gname); - - /** - * Create a named gradient - * - * @param gradient a gradient - * @param gname a gradient name - */ - void gname (String gradient, String gname); - - /** - * Retreive the group of an item - * - * @param item the item to get the group from - * @return the group - */ - ZincItem* group (ZincItem *item); - - /** - * Reorder items to lower one - * - * @param item the item to lower - */ - void lower (ZincItem *item); - - /** - * Reorder items to lower one - * - * @param item the item to lower - * @param belowThis and item that will be over item - */ - void lower (ZincItem *item, ZincItem *belowThis); - - /** - * Reorder items to raise one - * - * @param item the item to raise - */ - void raise (ZincItem *item); - - /** - * Reorder items to raise one - * - * @param item the item to raise - * @param aboveThis an item that will be under item - */ - void raise (ZincItem *item, ZincItem *aboveThis); - - /** - * Return the type of an item - * - * @param item an item - * @return the type of the item - */ - itemType type (ZincItem *item); - - /** - * Create a Zinc Tag that can be used in place of any item - * for zinc functions that must be called using tagOrId - * - * @param tag the text of the tag - * @return a tag item - */ - ZincItem* createTag(String tag); - -/***************************************** - ITEMS MANIPULATION -*****************************************/ - /** - * Suppress an item - * - * @param item the item to suppress - */ - void itemRemove (ZincItem *item); - - /** - * Create a group item - * - * @param parentGroup group where we'll put the new group, if NULL we create - * in the defaults group - * @return the group item - */ - ZincItem *itemCreateGroup (ZincItem *parentGroup); - - /** - * Create a rectangle item - * - * @param parentGroup group where we'll put it - * @param x y width height the coordinates of the new rectangle - * @return the rectangle item - */ - ZincItem *itemCreateRectangle (ZincItem *parentGroup, double x, double y, - double width, double height); - - /** - * Create an arc item - * - * @param parentGroup group where we'll put it - * @param x y width height the coordinates of the new rectangle - * @return the arc item - */ - ZincItem *itemCreateArc (ZincItem *parentGroup, double x, double y, - double width, double height); - - /** - * Create a text item - * - * @param parentGroup group where we'll put it - * @return the text item - */ - ZincItem *itemCreateText (ZincItem *parentGroup); - - /** - * Create a curve item - * - * @param parentGroup group where we'll put it - * @param path the path to display - * @return the curve item - */ - ZincItem *itemCreateCurve (ZincItem *parentGroup, ZincPath *path); - - /** - * Create an icon item - * - * @param parentGroup group where we'll put it - * @param image a zincImage to display - * @return the icon item - */ - ZincItem *itemCreateIcon (ZincItem *parentGroup, ZincImage* image); - - -/************************************************** - BINDING -**************************************************/ - - /** - * Bind a function to an event on the zinc widget - * - * @param eventSpecification tcl style event specicication - * @param callBack the function which will be called back - * @param userData data we will give back to the callback when called - * @param add false to replace existing bind or true to add - */ - void bind (String eventSpecification, - ZincWidgetCallback callBack, void *userData, bool add = false); - - /** - * Annulate a binding - * - * @param eventSpecification tcl style event specicication - */ - void unbind (String eventSpecification); - - /** - * Bind a function to an event on an item - * - * @param item the item on which to bind - * @param eventSpecification tcl style event specicication - * @param callBack the function which will be called back - * @param userData data we will give back to the callback when called - * @param add false to replace existing bind or true to add - */ - void itemBind (ZincItem *item, String eventSpecification, - ZincItemCallback callBack, void *userData, bool add = false); - - /** - * Annulate a binding - * - * @param item the item on which to unbind - * @param eventSpecification tcl style event specicication - */ - void itemUnbind (ZincItem *item, String eventSpecification); - -/************************************************** - TRANSFORMATION METHODS -**************************************************/ - - /** - * Translate the item - * - * @param item the item to which we apply the transform - * @param dx dy translation vector - */ - void itemTranslate (ZincItem * item, double dx, double dy); - - /** - * Translate the item - * - * @param item the item to which we apply the transform - * @param x y translation vector - * @param absolute true if the translation is absolute - */ - void itemTranslate (ZincItem * item, double x, double y, bool absolute); - - /** - * Rotate an item - * - * @param item the item to which we apply the transform - * @param angle the angle to rotate in radian - */ - void itemRotate (ZincItem * item, double angle); - - /** - * Rotate an item - * - * @param item the item to which we apply the transform - * @param angle the angle to rotate in radian - * @param x y the center of the rotation - */ - void itemRotate (ZincItem * item, double angle, double x, double y); - - /** - * Rotate an item - * - * @param item the item to which we apply the transform - * @param angle the angle to rotate - * @param degree true for an angle in degree, false for an angle in radians - */ - void itemRotate (ZincItem * item, double angle, bool degree); - - /** - * Rotate an item - * - * @param item the item to which we apply the transform - * @param angle the angle to rotate in radian - * @param x y the center of the rotation - * @param degree true for an angle in degree, false for an angle in radians - */ - void itemRotate (ZincItem * item, double angle, double x, double y, - bool degree); - - /** - * Scale an item - * - * @param item the item to which we apply the transform - * @param ax horizontal scale - * @param ay vertical scale - */ - void itemScale (ZincItem * item, double ax, double ay); - - /** - * Scale an item using a specified center - * - * @param item the item to which we apply the transform - * @param ax horizontal scale - * @param ay vertical scale - * @param cx cy center of the scale - */ - void itemScale (ZincItem * item, double ax, double ay, double cx, double cy); - - - /** - * Skew an item - * - * @param item the item to which we apply the transform - * @param sx horizontal skew - * @param sy vertical skew - */ - void itemSkew (ZincItem * item, double sx, double sy); - - /** - * Skew an item horizontaly - * - * @param item the item to which we apply the transform - * @param sx horizontal skew - */ - void itemSkewX (ZincItem * item, double sx); - - /** - * Skew an item verticaly - * - * @param item the item to which we apply the transform - * @param sy vertical skew - */ - void itemSkewY (ZincItem * item, double sy); - - /** - * Reset all transformations associated with the item - * - * @param item the item to which we apply the transform - */ - void itemResetTransformation (ZincItem * item); - - /** - * Replace current transform by a matrix - * - * @param item the item to which we apply the transform - * @param a,b,c,d,e,f the new transform matrix - */ - void itemSetTransformation (ZincItem * item, - double a, double b, double c, - double d, double e, double f); - - /** - * Get current transform matrix - * - * @param item the item to which we apply the transform - * @param a,b,c,d,e,f places where we'll put the transform matrix - */ - void itemGetTransformation (ZincItem * item, - double *a, double *b, double *c, - double *d, double *e, double *f); - - /** - * Multiply current transform by a matrix - * - * @param item the item to which we apply the transform - * @param a,b,c,d,e,f the new transform matrix - */ - void itemMatrix (ZincItem * item, - double a, double b, double c, - double d, double e, double f); - -/******************************************************* - AUTOGENERATED METHODS (itemconfigure) -"code.hpp" in Tkzins/generic source from : - ./gen.pl Arc.c Attrs.c Color.c Curve.c Draw.c Group.c - Image.c List.c Item.c Icon.c Rectangle.c tkZinc.c Text.c -*******************************************************/ - - /** - * Call zinc->itemconfigure ( -closed ) - * @param item the item to configure - * @param value the closed to set - */ - void itemSetClosed (ZincItem * item, bool value); - - /** - * Call zinc->itemcget ( -closed ) - * @param item the item to get closed from - * @return closed value - */ - bool itemGetClosed (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -composealpha ) - * @param item the item to configure - * @param value the composealpha to set - */ - void itemSetComposealpha (ZincItem * item, bool value); - - /** - * Call zinc->itemcget ( -composealpha ) - * @param item the item to get composealpha from - * @return composealpha value - */ - bool itemGetComposealpha (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -composerotation ) - * @param item the item to configure - * @param value the composerotation to set - */ - void itemSetComposerotation (ZincItem * item, bool value); - - /** - * Call zinc->itemcget ( -composerotation ) - * @param item the item to get composerotation from - * @return composerotation value - */ - bool itemGetComposerotation (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -composescale ) - * @param item the item to configure - * @param value the composescale to set - */ - void itemSetComposescale (ZincItem * item, bool value); - - /** - * Call zinc->itemcget ( -composescale ) - * @param item the item to get composescale from - * @return composescale value - */ - bool itemGetComposescale (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -extent ) - * @param item the item to configure - * @param value the extent to set - */ - void itemSetExtent (ZincItem * item, unsigned int value); - - /** - * Call zinc->itemcget ( -extent ) - * @param item the item to get extent from - * @return extent value - */ - unsigned int itemGetExtent (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -fillcolor ) - * @param item the item to configure - * @param value the fillcolor to set - */ - void itemSetFillcolor (ZincItem * item, String value); - - /** - * Call zinc->itemcget ( -fillcolor ) - * @param item the item to get fillcolor from - * @return fillcolor value - */ - String itemGetFillcolor (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -filled ) - * @param item the item to configure - * @param value the filled to set - */ - void itemSetFilled (ZincItem * item, bool value); - - /** - * Call zinc->itemcget ( -filled ) - * @param item the item to get filled from - * @return filled value - */ - bool itemGetFilled (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -fillpattern ) - * @param item the item to configure - * @param value the fillpattern to set - */ - void itemSetFillpattern (ZincItem * item, ZincBitmap * value); - - /** - * Call zinc->itemcget ( -fillpattern ) - * @param item the item to get fillpattern from - * @return fillpattern value - */ - ZincBitmap * itemGetFillpattern (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -linecolor ) - * @param item the item to configure - * @param value the linecolor to set - */ - void itemSetLinecolor (ZincItem * item, String value); - - /** - * Call zinc->itemcget ( -linecolor ) - * @param item the item to get linecolor from - * @return linecolor value - */ - String itemGetLinecolor (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -linepattern ) - * @param item the item to configure - * @param value the linepattern to set - */ - void itemSetLinepattern (ZincItem * item, ZincBitmap * value); - - /** - * Call zinc->itemcget ( -linepattern ) - * @param item the item to get linepattern from - * @return linepattern value - */ - ZincBitmap * itemGetLinepattern (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -linestyle ) - * @param item the item to configure - * @param value the linestyle to set - */ - void itemSetLinestyle (ZincItem * item, lineStyle value); - - /** - * Call zinc->itemcget ( -linestyle ) - * @param item the item to get linestyle from - * @return linestyle value - */ - lineStyle itemGetLinestyle (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -linewidth ) - * @param item the item to configure - * @param value the linewidth to set - */ - void itemSetLinewidth (ZincItem * item, double value); - - /** - * Call zinc->itemcget ( -linewidth ) - * @param item the item to get linewidth from - * @return linewidth value - */ - double itemGetLinewidth (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -pieslice ) - * @param item the item to configure - * @param value the pieslice to set - */ - void itemSetPieslice (ZincItem * item, bool value); - - /** - * Call zinc->itemcget ( -pieslice ) - * @param item the item to get pieslice from - * @return pieslice value - */ - bool itemGetPieslice (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -priority ) - * @param item the item to configure - * @param value the priority to set - */ - void itemSetPriority (ZincItem * item, unsigned int value); - - /** - * Call zinc->itemcget ( -priority ) - * @param item the item to get priority from - * @return priority value - */ - unsigned int itemGetPriority (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -sensitive ) - * @param item the item to configure - * @param value the sensitive to set - */ - void itemSetSensitive (ZincItem * item, bool value); - - /** - * Call zinc->itemcget ( -sensitive ) - * @param item the item to get sensitive from - * @return sensitive value - */ - bool itemGetSensitive (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -startangle ) - * @param item the item to configure - * @param value the startangle to set - */ - void itemSetStartangle (ZincItem * item, unsigned int value); - - /** - * Call zinc->itemcget ( -startangle ) - * @param item the item to get startangle from - * @return startangle value - */ - unsigned int itemGetStartangle (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -tile ) - * @param item the item to configure - * @param value the tile to set - */ - void itemSetTile (ZincItem * item, ZincBitmap * value); - - /** - * Call zinc->itemcget ( -tile ) - * @param item the item to get tile from - * @return tile value - */ - ZincBitmap * itemGetTile (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -visible ) - * @param item the item to configure - * @param value the visible to set - */ - void itemSetVisible (ZincItem * item, bool value); - - /** - * Call zinc->itemcget ( -visible ) - * @param item the item to get visible from - * @return visible value - */ - bool itemGetVisible (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -capstyle ) - * @param item the item to configure - * @param value the capstyle to set - */ - void itemSetCapstyle (ZincItem * item, capStyle value); - - /** - * Call zinc->itemcget ( -capstyle ) - * @param item the item to get capstyle from - * @return capstyle value - */ - capStyle itemGetCapstyle (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -fillrule ) - * @param item the item to configure - * @param value the fillrule to set - */ - void itemSetFillrule (ZincItem * item, fillRule value); - - /** - * Call zinc->itemcget ( -fillrule ) - * @param item the item to get fillrule from - * @return fillrule value - */ - fillRule itemGetFillrule (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -joinstyle ) - * @param item the item to configure - * @param value the joinstyle to set - */ - void itemSetJoinstyle (ZincItem * item, joinStyle value); - - /** - * Call zinc->itemcget ( -joinstyle ) - * @param item the item to get joinstyle from - * @return joinstyle value - */ - joinStyle itemGetJoinstyle (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -relief ) - * @param item the item to configure - * @param value the relief to set - */ - void itemSetRelief (ZincItem * item, relief value); - - /** - * Call zinc->itemcget ( -relief ) - * @param item the item to get relief from - * @return relief value - */ - relief itemGetRelief (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -smoothrelief ) - * @param item the item to configure - * @param value the smoothrelief to set - */ - void itemSetSmoothrelief (ZincItem * item, bool value); - - /** - * Call zinc->itemcget ( -smoothrelief ) - * @param item the item to get smoothrelief from - * @return smoothrelief value - */ - bool itemGetSmoothrelief (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -alpha ) - * @param item the item to configure - * @param value the alpha to set - */ - void itemSetAlpha (ZincItem * item, unsigned int value); - - /** - * Call zinc->itemcget ( -alpha ) - * @param item the item to get alpha from - * @return alpha value - */ - unsigned int itemGetAlpha (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -atomic ) - * @param item the item to configure - * @param value the atomic to set - */ - void itemSetAtomic (ZincItem * item, bool value); - - /** - * Call zinc->itemcget ( -atomic ) - * @param item the item to get atomic from - * @return atomic value - */ - bool itemGetAtomic (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -clip ) - * @param item the item to configure - * @param value the clip to set - */ - void itemSetClip (ZincItem * item, ZincItem * value); - - /** - * Call zinc->itemcget ( -clip ) - * @param item the item to get clip from - * @return clip value - */ - ZincItem * itemGetClip (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -anchor ) - * @param item the item to configure - * @param value the anchor to set - */ - void itemSetAnchor (ZincItem * item, anchor value); - - /** - * Call zinc->itemcget ( -anchor ) - * @param item the item to get anchor from - * @return anchor value - */ - anchor itemGetAnchor (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -color ) - * @param item the item to configure - * @param value the color to set - */ - void itemSetColor (ZincItem * item, String value); - - /** - * Call zinc->itemcget ( -color ) - * @param item the item to get color from - * @return color value - */ - String itemGetColor (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -connecteditem ) - * @param item the item to configure - * @param value the connecteditem to set - */ - void itemSetConnecteditem (ZincItem * item, ZincItem * value); - - /** - * Call zinc->itemcget ( -connecteditem ) - * @param item the item to get connecteditem from - * @return connecteditem value - */ - ZincItem * itemGetConnecteditem (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -connectionanchor ) - * @param item the item to configure - * @param value the connectionanchor to set - */ - void itemSetConnectionanchor (ZincItem * item, anchor value); - - /** - * Call zinc->itemcget ( -connectionanchor ) - * @param item the item to get connectionanchor from - * @return connectionanchor value - */ - anchor itemGetConnectionanchor (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -image ) - * @param item the item to configure - * @param value the image to set - */ - void itemSetImage (ZincItem * item, ZincImage * value); - - /** - * Call zinc->itemcget ( -image ) - * @param item the item to get image from - * @return image value - */ - ZincImage * itemGetImage (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -mask ) - * @param item the item to configure - * @param value the mask to set - */ - void itemSetMask (ZincItem * item, ZincBitmap * value); - - /** - * Call zinc->itemcget ( -mask ) - * @param item the item to get mask from - * @return mask value - */ - ZincBitmap * itemGetMask (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -alignment ) - * @param item the item to configure - * @param value the alignment to set - */ - void itemSetAlignment (ZincItem * item, alignment value); - - /** - * Call zinc->itemcget ( -alignment ) - * @param item the item to get alignment from - * @return alignment value - */ - alignment itemGetAlignment (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -font ) - * @param item the item to configure - * @param value the font to set - */ - void itemSetFont (ZincItem * item, ZincFont * value); - - /** - * Call zinc->itemcget ( -font ) - * @param item the item to get font from - * @return font value - */ - ZincFont * itemGetFont (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -overstriked ) - * @param item the item to configure - * @param value the overstriked to set - */ - void itemSetOverstriked (ZincItem * item, bool value); - - /** - * Call zinc->itemcget ( -overstriked ) - * @param item the item to get overstriked from - * @return overstriked value - */ - bool itemGetOverstriked (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -spacing ) - * @param item the item to configure - * @param value the spacing to set - */ - void itemSetSpacing (ZincItem * item, short value); - - /** - * Call zinc->itemcget ( -spacing ) - * @param item the item to get spacing from - * @return spacing value - */ - short itemGetSpacing (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -text ) - * @param item the item to configure - * @param value the text to set - */ - void itemSetText (ZincItem * item, String value); - - /** - * Call zinc->itemcget ( -text ) - * @param item the item to get text from - * @return text value - */ - String itemGetText (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -underlined ) - * @param item the item to configure - * @param value the underlined to set - */ - void itemSetUnderlined (ZincItem * item, bool value); - - /** - * Call zinc->itemcget ( -underlined ) - * @param item the item to get underlined from - * @return underlined value - */ - bool itemGetUnderlined (ZincItem * item); - - /** - * Call zinc->itemconfigure ( -width ) - * @param item the item to configure - * @param value the width to set - */ - void itemSetWidth (ZincItem * item, unsigned short value); - - /** - * Call zinc->itemcget ( -width ) - * @param item the item to get width from - * @return width value - */ - unsigned short itemGetWidth (ZincItem * item); - - -/******************************************************* - END OF AUTOGENERATED METHODS -*******************************************************/ - - /** - * Call zinc->itemconfigure ( -firstend ) - * - * @param item the item to set firstend to - * @param a,b,c values used to set end - */ - void itemSetFirstend (ZincItem * item, double a, double b, double c); - - /** - * Call zinc->itemcget ( -firstend ) - * - * @param item the item to get firstend from - * @param a,b,c values used to sedwhere we'll put end - */ - void itemGetFirstend (ZincItem * item, double *a, double *b, double *c); - - /** - * Call zinc->itemconfigure ( -lastend ) - * - * @param item the item to set lastend to - * @param a,b,c values used to set end - */ - void itemSetLastend (ZincItem * item, double a, double b, double c); - - /** - * Call zinc->itemcget ( -lastend ) - * - * @param item the item to get lastend from - * @param a,b,c values used to sedwhere we'll put end - */ - void itemGetLastend (ZincItem * item, double *a, double *b, double *c); - - /** - * Call zinc->itemconfigure ( -position ) - * - * @param item the item to get width fromset position to - * @param x,y position - */ - void itemSetPosition (ZincItem * item, double x, double y); - - /** - * Call zinc->itemcget ( -position ) - * - * @param item the item to get position from - * @param x,y position - */ - void itemGetPosition (ZincItem * item, double *x, double *y); - - /** - * Create an image object from a file - * - * @param image the image reference (a file name) - */ - ZincImage* createImageFromFile (String image); - - /** - * Create an image object using base64 data - * - * @param image the image reference (a base64 String or binary data) - */ - ZincImage* createImageFromData (String image); - - /** - * Create a bitmap object from a file - * - * @param image the bitmap reference (a file name) - */ - ZincBitmap* createBitmapFromFile (String image); - - /** - * Create a bitmap object base64 data - * - * @param image the bitmap reference (a base64 String or binary data) - */ - ZincBitmap* createBitmapFromData (String image); - - /** - * Create a bitmap object using a predefined name - * - * @param image the bitmap reference (a name) - */ - ZincBitmap* createBitmapFromName (String image); - - /** - * Create an image object - * - * @param width Width of image - * @param height Height of image - * @param aggBuffer An AGG buffer - */ - ZincImage* createImageFromAGGBuffer (int width, int height, unsigned char *aggBuffer); - - - /** - * Create a font object - * - * @param family the font mamily - * @param size if a positive number, it is in points, if a negative number, - * its absolute value is a size in pixels. - * @param bold 1 for a bold font, 0 for a normal font, -1 for unspecified - * @param italic 1 an italic font, 0 for a roman font, -1 for unspecified - * @param underline 1 for an underlined, 0 for a normal font, -1 for - * unspecified - * @param overstrike 1 for an overstriked font, 0 for a normal font, -1 for unspecified - */ - ZincFont* createFont (String family, int size, int bold = -1, - int italic = -1, int underline = -1, - int overstrike = -1); - - /** - * Get font ascent - * - * @param font the font - * @return the font ascent - */ - int getFontAscent (ZincFont* font); - - /** - * Get Image width - * - * @param ZincImage the image to get width from - * @return the width of the image - */ - int getImageWidth (ZincImage *image); - - /** - * Get Image height - * - * @param ZincImage the image to get height from - * @return the height of the image - */ - int getImageHeight (ZincImage *image); - -/******************************************************* - STATIC PROCEDURES -*******************************************************/ - - /** - * Loads the zinc library and initialize tcl and tk - * - * @param argv0 the name of the execytable as passed in argv[0] - */ - static void loadZinc (char *argv0) throw (ZincException); - - /** - * Run tk mainloop and returns when there is no more Tk window - */ - static void zincMainLoop (); - -/******************************************************* - errors management -*******************************************************/ - /** - * This is inline because it is called frequently and needs to be optimized - * Use this when you need to call a function that can return a TCL error code. - * - * @param fct the full function call - * @param msg the error message to throw in case of error - */ - static void z_tcl_call (int result, char* p_msg) throw (ZincException); - - /** - * This is a inline because it is called frequently and needs to be optimized - * Use this to call the zinObjectCommand fuction. The call is made using the - * pre allocated table p1, it must contain Tcl_Obj thar are parameters to - * the zinObjectCommand function. A parameter indicate how many parameters - * are passed to the zinObjectCommand function. - * - * @param count the number of parameters in p1 - * @param msg the error message to throw in case of error - */ - void z_command (int count, char* p_msg) throw (ZincException); - -}; - -#endif diff --git a/zinclib.d/src/ZincExtern.hpp b/zinclib.d/src/ZincExtern.hpp deleted file mode 100644 index 193a684..0000000 --- a/zinclib.d/src/ZincExtern.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/** ZincExtern.hpp - * zinclib - * - * This software is the property of IntuiLab SA, France. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Here we create TkZinc library headers since they don't exist - * - * 08/03/05 - * - * Contributors: - * Benoit Peccatte - * - */ -#include - -#ifndef ZINC_EXTERN -#define ZINC_EXTERN - - -// those are function have been created within a C compiler -extern "C" -{ - - //The TkZinc function that initialises tkzinc - int Tkzinc_Init(Tcl_Interp *interp); - - //The TkZinc function that creates a zinc object - int ZincObjCmd(ClientData client_data, // Main window associated with interpreter. - Tcl_Interp *interp, // Current interpreter. - int argc, // Number of arguments. - Tcl_Obj *CONST args[]); // Argument objects. - - //The TkZinc function that is called by tcl when calling ".zinc fct ..." -#ifdef _WIN32 - typedef int (__cdecl *WidgetObjCmd) - (ClientData client_data, // Information about the widget. - Tcl_Interp *interp, // Current interpreter. - int argc, // Number of arguments. - Tcl_Obj *CONST args[]); // Argument objects. -#else - typedef int (*WidgetObjCmd) - (ClientData client_data, // Information about the widget. - Tcl_Interp *interp, // Current interpreter. - int argc, // Number of arguments. - Tcl_Obj *CONST args[]) // Argument objects. - __attribute__((cdecl)); -#endif -} - -#endif - diff --git a/zinclib.d/src/ZincInternal.hpp b/zinclib.d/src/ZincInternal.hpp deleted file mode 100644 index 63feaf2..0000000 --- a/zinclib.d/src/ZincInternal.hpp +++ /dev/null @@ -1,182 +0,0 @@ -/** ZincInternal.hpp - * zinclib - * - * This software is the property of IntuiLab SA, France. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Here we defines macros and constants that are only used within Zinclib code - * - * 08/03/05 - * - * Contributors: - * Benoit Peccatte - * David Thevenin - * - */ - -#include -#include -#ifdef _WIN32 -#define snprintf _snprintf -#endif - -#include "ZincObjects.hpp" -#ifndef BAZAR -#define BAZAR - -#define MAX_NUM_LENGTH 32 - -// The base name of the TCL function that serve for callbacks -#define Z_TCLCB "zincTclCb" - -/** - * These are macro for shortness and readability of code. - * They take one Tcl_Obj from the pool and put one value into it. This object - * is returned. They all have the same signature. - * - * @param no the id of the Tcl_Obj to take within the pool (max is - * ZINC_POOL_COUNT-1) - * @param value the value to put in the extracted object - * @return the object from the pool - */ -// make a boolean object -#define Z_BOO_POOL(no, value) ( Tcl_SetBooleanObj (pool[no], value), pool[no] ) -// make an integer object -#define Z_INT_POOL(no, value) ( Tcl_SetIntObj (pool[no], value), pool[no] ) -// make a double object -#define Z_DBL_POOL(no, value) ( Tcl_SetDoubleObj (pool[no], value), pool[no] ) -// make a string object -#define Z_STR_POOL(no, value, length) ( Tcl_SetStringObj (pool[no], \ - value, length), \ - pool[no] ) - -/** - * Make a list object - * - * @param no the id of the Tcl_Obj to take within the pool - * @param value a table of pointer to Tcl_Obj to put in the list - * @param size the number objects in the table - * @return the list object from the pool - */ -#define Z_LST_POOL(no, value, size) ( Tcl_SetListObj (pool[no], size, value),\ - pool[no] ) - -/** - * Clear a list object. Tcl_Obj used in a list object have a refcount - * incremented and as such can't be reused for anything else. To free those - * object you need to clean the list object after use. - * - * @param no the id of a Tcl_Obj within the pool which contains a list to - * clear - */ -#define Z_CLEANLIST(no) Tcl_SetIntObj (pool[no], 0) - - -/** - * Create a constant Tcl_Obj that can be reused as a parameter later - * - * @parameter string define the name and the value ov the object - */ -//create an option object (value prefixed by '-') -#define Z_DEFINE_ZOPT(string) Tcl_Obj* ZOPT_##string = Tcl_NewStringObj ("-" #string, -1); -//create a function object -#define Z_DEFINE_ZFCT(string) Tcl_Obj* ZFCT_##string = Tcl_NewStringObj (#string, -1); -//create an item object -#define Z_DEFINE_ZITM(string) Tcl_Obj* ZITM_##string = Tcl_NewStringObj (#string, -1); - -/** - * Macro to return a parentGroup Tcl_Obj. If a NULL is group given, it returns - * the default one. - * - * @param parentGroup the parent group to take - */ -#define Z_PARENTGROUP(parentGroup) \ - ( (parentGroup != NULL) ? parentGroup->object : DEFAULT_GROUP_OBJ ); - -/** - * Convert an integer to a string - * - * @param integer the integer to convert - */ -inline std::string itos (int integer) -{ - char tmp[MAX_NUM_LENGTH]; - // use standard function to convert - if (snprintf (tmp, MAX_NUM_LENGTH, "%d", integer) < 0) - { - throw ZincException ("Error converting integer", __FILE__, __LINE__ ); - } - return std::string (tmp); -} - -/** - * Convert a long to a string - * - * @param l the long to convert - */ -inline std::string ltos (long l) -{ - char tmp[MAX_NUM_LENGTH]; - // use standard function to convert - if (snprintf (tmp, MAX_NUM_LENGTH, "%ld", l) < 0) - { - throw ZincException ("Error converting long", __FILE__, __LINE__ ); - } - return std::string (tmp); -} - -/** - * Convert a double to a string - * - * @param double the integer to convert - */ -inline std::string dtos (double d) -{ - char tmp[MAX_NUM_LENGTH]; - // use standard function to convert - if (snprintf (tmp, MAX_NUM_LENGTH, "%f", d) < 0) - { - throw ZincException ("Error converting double", __FILE__, __LINE__ ); - } - return std::string (tmp); -} - -/** - * 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. - */ -#endif diff --git a/zinclib.d/src/ZincObjects.cpp b/zinclib.d/src/ZincObjects.cpp deleted file mode 100644 index 3a0ad2d..0000000 --- a/zinclib.d/src/ZincObjects.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/** ZincObjects.cpp - * zinclib - * - * This software is the property of IntuiLab SA, France. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Here we defines classes that are items in zinc - * - * 08/03/05 - * - * Contributors: - * Benoit Peccatte - * David Thevenin - * - */ -#include "ZincInternal.hpp" -#include "ZincObjects.hpp" -#include "Zinc.hpp" - - -/** - * The protected default constructor - */ -ZincItem::ZincItem () -{ } - -/** - * The public constructor - * - * @param obj the object we want to store - */ -ZincItem::ZincItem (Tcl_Obj *obj) - : object(obj) -{ - // manage refcount so that the tcl_obj can't be freed - Tcl_IncrRefCount (object); -} - -/** - * The public destructor - */ -ZincItem::~ZincItem () -{ - // dercrement refcount to free tcl_obj - Tcl_DecrRefCount (object); -} - -/** - * The public constructor - * - * @param obj the object we want to store - */ -ZincImage::ZincImage (Tcl_Obj *obj) - : ZincItem (obj), madeFromInternal (false) -{ } - -/** - * The public constructor - * - * @param obj the object we want to store - */ -ZincImage::ZincImage (Tcl_Obj *obj, bool internal) - : ZincItem (obj), madeFromInternal (internal) -{ } - -/** - * The public destructor - */ -ZincImage::~ZincImage () -{ - // do not delete returned values - if (madeFromInternal) - return; - - // delete using string commands - const char* para[5]; - para[0] = "image"; - para[1] = "delete"; - para[2] = Tcl_GetString(object); - - // call the function with 3 arguments - int res = (*Zinc::imgCmdInfo.proc)(Zinc::imgCmdInfo.clientData, - Zinc::interp, 3, para); - Zinc::z_tcl_call (res, "delete ZincImage Failed : "); -} - -/** - * The public constructor (redefine the inherited one) - * - * @param obj the object we want to store - */ -ZincBitmap::ZincBitmap (Tcl_Obj *obj) - : ZincItem (obj), madeFromInternal (false) -{ } - -/** - * The public constructor (redefine the inherited one) - * - * @param obj the object we want to store - */ -ZincBitmap::ZincBitmap (Tcl_Obj *obj, bool internal) - : ZincItem (obj), madeFromInternal (internal) -{ } - -/** - * The public constructor (redefine the inherited one) - * - * @param name the name of a predefined bitmap - */ -ZincBitmap::ZincBitmap (String name) - : madeFromInternal (true) -{ - object = Tcl_NewStringObj (name.c_str(), name.length ()); - Tcl_IncrRefCount (object); -} - -/** - * The public destructor - */ -ZincBitmap::~ZincBitmap () -{ - // do not delete Zinc default bitmaps or returned values - if (madeFromInternal) - return; - - // delete using string commands - const char* para[5]; - para[0] = "image"; - para[1] = "delete"; - para[2] = Tcl_GetString(object); - - // call the function with 3 arguments - int res = (*Zinc::imgCmdInfo.proc)(Zinc::imgCmdInfo.clientData, - Zinc::interp, 3, para); - Zinc::z_tcl_call (res, "delete ZincBitmap Failed : "); -} - -/** - * The public constructor - */ -ZincFont::ZincFont (const char *font) - : name (String (font)) -{ } - -/** - * A public constructor with a String parameter - * - * @param msg the error message - */ -ZincException::ZincException (String p_msg, char *p_file, int p_lineNo) - : msg (p_msg), file(p_file), line(p_lineNo) -{ } - -/** - * Copy constructor - * - * @param exception the original exception - */ -ZincException::ZincException (const ZincException &e) - : msg (e.msg), file(e.file), line(e.line) -{ } - -/** - * Public destructor - */ -ZincException::~ZincException () throw() -{ } - -/** - * Retreive the exception message - * - * @return the message - */ -const char* ZincException::what () const throw () -{ - String result = "Zinc Exception : "; - result += msg + " file " + file + ", line " + itos (line); - return result.c_str (); -} diff --git a/zinclib.d/src/ZincObjects.hpp b/zinclib.d/src/ZincObjects.hpp deleted file mode 100644 index dc46567..0000000 --- a/zinclib.d/src/ZincObjects.hpp +++ /dev/null @@ -1,198 +0,0 @@ -/** ZincObjects.hpp - * zinclib - * - * This software is the property of IntuiLab SA, France. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Here we defines classes that are items in zinc - * - * 08/03/05 - * - * Contributors: - * Benoit Peccatte - * David Thevenin - * - */ -#include "ZincTypes.hpp" - -#include -#include -#include - -#ifndef ZINC_OBJECTS -#define ZINC_OBJECTS - -// Object representing a zinc item -class ZincItem -{ -protected: - /** - * The protected default constructor - */ - ZincItem (); - -public: - Tcl_Obj *object; //the object we are storing - - /** - * The public constructor - * - * @param obj the object we want to store - */ - ZincItem (Tcl_Obj *obj); - - /** - * The public destructor - */ - virtual ~ZincItem (); -}; - -// Object representing a zinc image -class ZincImage : public ZincItem -{ - /** - * The private constructor - */ - ZincImage (); - - bool madeFromInternal; - -public: - /** - * The public constructor (redefine the inherited one) - * - * @param obj the object we want to store - */ - ZincImage (Tcl_Obj *obj); - - /** - * The public constructor (redefine the inherited one) - * - * @param obj the object we want to store - */ - ZincImage (Tcl_Obj *obj, bool internal); - - /** - * The public destructor - */ - virtual ~ZincImage (); -}; - -// Object representing a zinc bitmap -class ZincBitmap : public ZincItem -{ - /** - * The private constructor - */ - ZincBitmap (); - - bool madeFromInternal; - -public: - /** - * The public constructor (redefine the inherited one) - * - * @param obj the object we want to store - */ - ZincBitmap (Tcl_Obj *obj); - - /** - * The public constructor (redefine the inherited one) - * - * @param obj the object we want to store - */ - ZincBitmap (Tcl_Obj *obj, bool internal); - - /** - * The public constructor (redefine the inherited one) - * - * @param name the name of a predefined bitmap - */ - ZincBitmap (String name); - - /** - * The public destructor - */ - virtual ~ZincBitmap (); -}; - -// Object representing a zinc font -class ZincFont -{ - /** - * The public default constructor - */ - ZincFont (); - -public: - String name; - - /** - * The public constructor - */ - ZincFont (const char *font); - -}; - -/** - * Exceptions that are throwed by zinclib - */ -class ZincException : public std::exception -{ - -private: - String msg; // the exception message - String file; // file where exception have been caught - int line; // line where exception have been caught - -public: - /** - * A public constructor with a String parameter - * - * @param msg the error message - */ - ZincException (String msg, char *file, int lineNo); - - /** - * Copy constructor - * - * @param exception the original exception - */ - ZincException (const ZincException &exception); - - /** - * Public destructor - */ - virtual ~ZincException () throw(); - - /** - * Retreive the exception message - * - * @return the message - */ - const char* what () const throw (); -}; - -#endif diff --git a/zinclib.d/src/ZincPath.cpp b/zinclib.d/src/ZincPath.cpp deleted file mode 100644 index a120014..0000000 --- a/zinclib.d/src/ZincPath.cpp +++ /dev/null @@ -1,415 +0,0 @@ -/** Path.cpp - * zinclib - * - * This software is the property of IntuiLab SA, France. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Here we defines The ZincPath object - * - * 08/03/05 - * - * Contributors: - * Benoit Peccatte - * - */ -#include "Zinc.hpp" -#include "ZincInternal.hpp" - -#include - -// convert degree to radians -const double convertRatio = atan2 (1., 1.) * 4. / 180.; - -/** - * Calculate d % m for doubles - * this is because the C % works only for integers - */ -inline double modulo (double d, double m) -{ - return d - (floor (d / m) * m); -// return d; -} - -/** - * Append the point to the real path - * - * @param x,y the point coordinate - * @param c true if the point is a control point - */ -inline void ZincPath::addPoint (double x, double y, bool c) -{ - // update last control point - lastX = x; - lastY = y; - - // we can't use a flat list since zinc accepts flat list only for simple - // lines - Tcl_Obj* point[3]; - int i = 2; - //create a point object - //an object for x - point[0] = Tcl_NewDoubleObj (x); - // an object for y - point[1] = Tcl_NewDoubleObj (y); - // an object for 'c' only if needed - if (c) - { - point[2] = Tcl_NewStringObj ("c", -1); - i = 3; - } - - // the point (this increments refcount) - Tcl_Obj* tmp = Tcl_NewListObj (i, point); - // append the point to the list - Zinc::z_tcl_call ( Tcl_ListObjAppendElement (Zinc::interp, path, tmp), - "addpoint Error:"); -} - -/** - * Convert ellipse from SVG form to centered form (used only by arcTo) - * - * @param x0,y0 origin of the arc - * @param rx x-radius of ellipse in degree (can be modified) - * @param ry y-radius of ellipse in degree (can be modified) - * @param phi rotation of ellipse in degree (can be modified) - * @param largeArc true if the large part of the ellipse - * @param sweep true for a positive angle direction for the drawing - * @param x,y destination point - * @param cx,cy center coordinate - * @param theta begining of arc in degree - * @param delta extent of arc in degree - */ -void ZincPath::convertFromSvg (double x0, double y0, double &rx, double &ry, - double &phi, bool largeArc, bool sweep, - double x, double y, double &cx, double &cy, - double &theta, double &delta) -{ - /* all this strictly follow the script given in "SVG essentials" - * p85 : convert an elliptical arc fo SVG to an elliptical arc - * based around a central point - */ - - // temporary variables - double dx2, dy2, phiR, x1, y1; - double rxSq, rySq, x1Sq, y1Sq; - double sign, sq, coef, radiusCheck; - double cx1, cy1, sx2, sy2; - double p, n, ux, uy, vx, vy; - - // compute 1/2 distance between current and final point - dx2 = (x0 - x) / 2.; - dy2 = (y0 - y) / 2.; - - //convert from degree to radians - phi = modulo (phi, 360.); - phiR = phi * convertRatio; - - //compute (x1, y1) - x1 = cos (phiR) * dx2 + sin (phiR) * dy2; - y1 = -sin (phiR) * dx2 + cos (phiR) * dy2; - - // make sure radii are large enough - rx = fabs (rx); ry = fabs (ry); - rxSq = rx * rx; - rySq = ry * ry; - x1Sq = x1 * x1; - y1Sq = y1 * y1; - - radiusCheck = (x1Sq / rxSq) + (y1Sq / rySq); - if (radiusCheck > 1.) - { - rx *= sqrt (radiusCheck); - ry *= sqrt (radiusCheck); - rxSq = rx * rx; - rySq = ry * ry; - } - - //step 2 compute (cx1, cy1) - sign = (largeArc == sweep) ? -1. : 1.; - sq = ((rxSq * rySq) - (rxSq * y1Sq) - (rySq * x1Sq)) / - ((rxSq * y1Sq) + (rySq * x1Sq)); - sq = (sq < 0.) ? 0. : sq; - coef = (sign * sqrt (sq)); - cx1 = coef * ((rx * y1) / ry); - cy1 = coef * -((ry * x1) / rx); - - //step 3 : compute (cx, cy) from (cx1, cy1) - sx2 = (x0 + x) / 2; - sy2 = (y0 + y) / 2; - - cx = sx2 + (cos (phiR) * cx1 - sin (phiR) * cy1); - cy = sy2 + (sin (phiR) * cx1 + cos (phiR) * cy1); - - //step 4 : compute angle start angle extent - ux = (x1 - cx1) / rx; - uy = (y1 - cy1) / ry; - vx = (-x1 - cx1) / rx; - vy = (-y1 - cy1) / ry; - n = sqrt ((ux *ux) + (uy * uy)); - p = ux; // 1 * ux + 0 * uy - sign = (uy < 0.) ? -1. : 1.; - - theta = sign * acos (p /n); - theta = theta / convertRatio; - - n = sqrt ((ux * ux + uy * uy) * (vx * vx + vy * vy)); - p = ux * vx + uy * vy; - sign = ((ux * vy - uy * vx) < 0.) ? -1. : 1.; - delta = sign * acos (p / n); - delta = delta / convertRatio;; - - if (!sweep && delta > 0.) - { - delta -= 360.; - } - else if (sweep && delta < 0.) - { - delta += 360.; - } - -// delta = modulo (delta, 360.); -// theta = modulo (theta, 360.); -} - - -/** - * The public constructor - * - * @param x,y the initial point - */ -ZincPath::ZincPath (double x, double y) - : firstX (x), firstY (y) -{ - // create a default path - path = Tcl_NewListObj (0, NULL); - // the path must not be deleted by tcl - Tcl_IncrRefCount (path); - // add the first point - addPoint (x, y, false); -} - -/** - * The public destructor - * - * @warning Do not destroy a ZincPath if Zinc is not loaded - */ -ZincPath::~ZincPath () -{ - //decrement reference count on all objs in list -> free - Tcl_SetIntObj (path, 1); - //decrement reference count on the list -> free - Tcl_DecrRefCount (path); -} - -/** - * Close current path - */ -void ZincPath::close () -{ - addPoint (firstX, firstY, false); -} - -/** - * Draw a line from current point to next point - * - * @param x,y next point - */ -void ZincPath::lineTo (double x, double y) -{ - addPoint (x, y, false); -} - -/** - * Draw a cubic bezier using specified control and destination points - * call cubicBezierTo - * - * @param cx1,cy1 first control point - * @param cx2,cy2 second control point - * @param x,y destination point - */ -void ZincPath::curveTo (double cx1, double cy1, double cx2, double cy2, - double x, double y) -{ - cubicBezierTo (cx1, cy1, cx2, cy2, x, y); -} - -/** - * Draw a cubic bezier using specified control and destination points - * - * @param cx1,cy1 first control point - * @param cx2,cy2 second control point - * @param x,y destination point - */ -void ZincPath::cubicBezierTo (double cx1, double cy1, - double cx2, double cy2, - double x, double y) -{ - addPoint (cx1, cy1, true); - addPoint (cx2, cy2, true); - addPoint (x, y, false); -} - -/** - * Draw a quadratic bezier using specified control and destination point - * - * @param cx1,cy1 first control point - * @param cx2,cy2 second control point - * @param x,y destination point - */ -void ZincPath::quadraticBezierTo (double cx, double cy, double x, double y) -{ - // convert from a quadratic bezier to a cubic bezier - // since that's what is supported by zinc - /* [[x1, y1], [qx, qy, 'q'], [x2,y2]] - cx1 = x1 + (qx - x1) * 2/3 - cy1 = y1 + (qy - y1) * 2/3 - cx2 = qx + (x2 - qx)/3 - cy2 = qy + (y2 - qy)/3 - */ - double cx1 = lastX + (cx - lastX) * 2/3; - double cy1 = lastY + (cy - lastY) * 2/3; - double cx2 = cx + (x - cx) / 3; - double cy2 = cy + (y - cy) / 3; - addPoint (cx1, cy1, true); - addPoint (cx2, cy2, true); - addPoint (x, y, false); -} - -/** - * Draw an arc from current point to x,y - * - * @param rx x-radius of ellipse - * @param ry y-radius of ellipse - * @param xAxisRotation rotation of ellipse - * @param largeArc true if the large part of the ellipse - * @param sweepFlag true for a positive angle direction for the drawing - * @param x,y destination point - */ -void ZincPath::arcTo (double rx, double ry, double xAxisRotation, bool largeArc, - bool sweepFlag, double x, double y) -{ - double sx, sy, start, arc; - // convert to a centered representation - convertFromSvg (lastX, lastY, rx, ry, xAxisRotation, largeArc, sweepFlag, - x, y, sx, sy, start, arc); - - // this is all taken from first case study for Intuikit - - /* convert to a curve representation - * For a good approximation, we need 8 quadratic Bezier - * to make a circle : the maximal angle is 45° - */ - // local variables - int segs; - double segAngle, angle, angleMid; - double cosphi, sinphi, tx, ty; - double previousX, previousY; - double bx, by, qx, qy; - double cx1, cy1, cx2, cy2; - - //1) calculate segment counts - segs = int (ceil (fabs (arc) / 45.)); - - //let's create segments of the same angle - //2) calculate this angle - segAngle = arc / double(segs) * convertRatio; - - xAxisRotation = xAxisRotation * convertRatio; - start = start * convertRatio; - - //3) Our fake starting point (relative to (x,y)) - // true start point is (x,y) - sx = lastX - cos (start) * rx; - sy = lastY - sin (start) * ry; - - /* 4) calculate values that will be used for a rotation - * of centre (x,y) and angle phi - * the matrix is : - * cos(phi) -sin(phi) tx - * sin(phi) cos(phi) ty - * 0 0 1 - */ - cosphi = cos (xAxisRotation); - sinphi = sin (xAxisRotation); - tx = (1. - cosphi) * lastX + sinphi * lastY; - ty = (1. - cosphi) * lastY - sinphi * lastX; - - //5) save crrent values - previousX = lastX; - previousY = lastY; - angle = start; - - //6) we already got the first point - - //7) calculate segments - for (int i(0) ; i < segs ; i++) - { - //7.1) increment angle - angle += segAngle; - - //7.2) calculate intermediate angle value - angleMid = angle - segAngle / 2.; - - //7.3) calculate last point of the segment from center and rays - bx = sx + cos (angle) * rx; - by = sy + sin (angle) * ry; - - //7.4) calculate control point for the quadratic bezier curve - qx = sx + cos (angleMid) * (rx / cos (segAngle / 2.)); - qy = sy + sin (angleMid) * (ry / cos (segAngle / 2.)); - - //7.5) calculate control points for the equivalent bezier curve - cx1 = previousX + (qx - previousX) * 2. / 3.; - cy1 = previousY + (qy - previousY) * 2. / 3.; - cx2 = qx + (bx - qx) / 3.; - cy2 = qy + (by - qy) / 3.; - - //7.6) add points - addPoint (cosphi * cx1 - sinphi * cy1 + tx, - sinphi * cx1 + cosphi * cy1 + ty, true); - addPoint (cosphi * cx2 - sinphi * cy2 + tx, - sinphi * cx2 + cosphi * cy2 + ty, true); - addPoint (cosphi * bx - sinphi * by + tx, - sinphi * bx + cosphi * by + ty, false); - - //7.7) Save last point - previousX = bx; - previousY = by; - } - -} - -/** - * Return a table of Tcl_Obj* containing a liste of coords points - * It's up to the caller to delete the resulting table - * - * @return a Tcl_Obj* of type list - */ -Tcl_Obj* ZincPath::getTable () -{ - return path; -} - - diff --git a/zinclib.d/src/ZincPath.hpp b/zinclib.d/src/ZincPath.hpp deleted file mode 100644 index 4b6fa21..0000000 --- a/zinclib.d/src/ZincPath.hpp +++ /dev/null @@ -1,162 +0,0 @@ -/** Path.hpp - * zinclib - * - * This software is the property of IntuiLab SA, France. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Here we defines The ZincPath object - * - * 08/03/05 - * - * Contributors: - * Benoit Peccatte - * - */ -#include "ZincTypes.hpp" - -#include -#include - -#ifndef ZINC_PATH -#define ZINC_PATH - -class ZincPath -{ - double firstX, firstY; //first point's coordinate - double lastX, lastY; //last point's coordinate - Tcl_Obj* path; //list of points - - /** - * Append the point to the real path - * - * @param x,y the point coordinate - * @param c true if the point is a control point - */ - inline void addPoint (double x, double y, bool c); - - /** - * Convert ellipse from SVG form to centered form (used only by arcTo) - * - * @param x0,y0 origin of the arc - * @param rx x-radius of ellipse in degree (can be modified) - * @param ry y-radius of ellipse in degree (can be modified) - * @param phi rotation of ellipse in degree (can be modified) - * @param largeArc true if the large part of the ellipse - * @param sweep true for a positive angle direction for the drawing - * @param x,y destination point - * @param cx,cy center coordinate - * @param theta begining of arc in degree - * @param delta extent of arc in degree - */ - void convertFromSvg (double x0, double y0, double &rx, double &ry, double &phi, - bool larcgeArc, bool sweep, double x, double y, - double &cx, double &cy, double &theta, double &delta); - - -public: - /** - * The public constructor - * - * @param x,y the initial point - */ - ZincPath (double x, double y); - - /** - * The public destructor - * - * @warning Do not destroy a ZincPath if Zinc is not loaded - */ - ~ZincPath (); - - /****************************************** - ZincPath manipulation - ******************************************/ - /** - * Close current path - */ - void close (); - - /** - * Draw a line from current point to next point - * - * @param x,y next point - */ - void lineTo (double x, double y); - - /** - * Draw a cubic bezier using specified control and destination points - * call cubicBezierTo - * - * @param cx1,cy1 first control point - * @param cx2,cy2 second control point - * @param x,y destination point - */ - void curveTo (double cx1, double cy1, double cx2, double cy2, - double x, double y); - - /** - * Draw a cubic bezier using specified control and destination points - * - * @param cx1,cy1 first control point - * @param cx2,cy2 second control point - * @param x,y destination point - */ - void cubicBezierTo (double cx1, double cy1, double cx2, double cy2, - double x, double y); - - /** - * Draw a quadratic bezier using specified control and destination point - * - * @param cx1,cy1 first control point - * @param cx2,cy2 second control point - * @param x,y destination point - */ - void quadraticBezierTo (double cx, double cy, double x, double y); - - /** - * Draw an arc from current point to x,y - * - * @param rx x-radius of ellipse - * @param ry y-radius of ellipse - * @param xAxisRotation rotation of ellipse - * @param largeArc true if the large part of the ellipse - * @param sweepFlag true for a positive angle direction for the drawing - * @param x,y destination point - */ - void arcTo (double rx, double ry, double xAxisRotation, bool largeArc, - bool sweepFlag, double x, double y); - - /** - * Return a Tcl_Obj* containing a list of coords points - * It's up to the caller to delete the resulting table - * - * @return a Tcl_Obj* of type list - */ - Tcl_Obj* getTable (); - -}; - -#endif - diff --git a/zinclib.d/src/ZincTypes.hpp b/zinclib.d/src/ZincTypes.hpp deleted file mode 100644 index 236ef1f..0000000 --- a/zinclib.d/src/ZincTypes.hpp +++ /dev/null @@ -1,188 +0,0 @@ -/** ZincTypes.hpp - * zinclib - * - * This software is the property of IntuiLab SA, France. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Here we defines types and constants that may be usefull for a zinclib user - * - * 08/03/05 - * - * Contributors: - * Benoit Peccatte - * - */ -#include - -#ifndef ZINC_TYPES -#define ZINC_TYPES - -typedef std::string String; - -/********************************** - Predeclaration of Zinc types -**********************************/ -class Zinc; -class ZincPath; -class ZincItem; -class ZincImage; -class ZincFont; -struct ZincEvent; - -/******************************************************* - Signature to use when binding with a callback -*******************************************************/ -typedef void (*ZincItemCallback) - (Zinc *zinc, // Information about the widget. - ZincItem *item, // the item being evented - ZincEvent *event, // event information - void *userData); // user data provided with bind - -typedef void (*ZincWidgetCallback) - (Zinc *zinc, // Information about the widget. - ZincEvent *event, // event information - void *userData); // user data provided with bind - - -/*********************************** - Library constants -***********************************/ - -// Rendering model -const int ZINC_BACKEND_X11 = 0; -const int ZINC_BACKEND_OPENGL = 1; - - -/*********************************** - Library enums -***********************************/ - -//Styles for line items -typedef enum -{ - lineStyle_simple = 0, - lineStyle_dashed, - lineStyle_mixed, - lineStyle_dotted -} lineStyle; - -//Styles for line cap -typedef enum -{ - capStyle_butt = 0, - capStyle_projecting, - capStyle_round -} capStyle; - -//List of fill rules -typedef enum -{ - fillRule_odd = 0 , - fillRule_nonzero, - fillRule_positive, - fillRule_negative, - fillRule_abs_geq_2 -} fillRule; - -//list of join style -typedef enum -{ - joinStyle_bevel = 0, - joinStyle_miter, - joinStyle_round -} joinStyle; - -//list of reliefs -typedef enum -{ - relief_flat = 0, - relief_raised, - relief_sunken, - relief_ridge, - relief_groove, - relief_roundraised, - relief_roundsunken, - relief_roundridge, - relief_roundgroove, - relief_raisedrule, - relief_sunkenrule -} relief; - -//List of alignments -typedef enum -{ - alignment_left = 0, - alignment_right, - alignment_center -} alignment; - -//list of anchors -typedef enum -{ - anchor_nw = 0, - anchor_n, - anchor_ne, - anchor_e, - anchor_se, - anchor_s, - anchor_sw, - anchor_w, - anchor_center -} anchor; - -//actions to take when calling contour -typedef enum -{ - item_add_clockwise, - item_add_counterclockwise, - item_remove -} itemOperator; - -//list of possible itemtypes -typedef enum -{ - item_group, - item_arc, - item_text, - item_rectangle, - item_curve, - item_icon -} itemType; - -//informations contained in an event -struct ZincEvent -{ - int x,y; // pointer position none -> 0 - int k; // keycode none -> 0 - long t; // timestamp none -> 0 - int w,h; // window width,heigth none -> 0 - int X,Y; // pointer position within display none -> 0 - int b; // button pressed none -> 0 - String K; // keysym none -> "??" -}; - - - -#endif diff --git a/zinclib.d/test/Makefile b/zinclib.d/test/Makefile deleted file mode 100644 index 84938e6..0000000 --- a/zinclib.d/test/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -######################################## -# zinclib tests makefile -######################################## - -# list of tests to make -EXECS = items widget test itemconf - -# default : all tests -all: $(EXECS) - -# usefull commons -include ../../../v0.1/common.mk - -# specific options -INCLUDE = -I../src -LIBDIR = ../tmp -LDFLAGS += -L../../../v0.1/lib -ltcl8.4 -ltk8.4 -lTkZinc $(LIBDIR)/zinclib.o - -# generic target -%.o: %.cpp - $(CXX) $(CXXFLAGS) -o $@ -c $< - -clean: - rm -f *.o $(PROFFILES) $(EXECS) core.* *.exe - -clean_code: clean - rm -f *~ .\#* - -# function to create a target for each test -define funct -$(1): $(1).o $(LIBDIR)/zinclib.o - $$(GCC) $$(LDFLAGS) -o $$@ $$< -endef - -# create a target for each test -$(foreach prog,$(EXECS),$(eval $(call funct,$(prog)))) diff --git a/zinclib.d/test/itemconf.cpp b/zinclib.d/test/itemconf.cpp deleted file mode 100644 index 7fbca78..0000000 --- a/zinclib.d/test/itemconf.cpp +++ /dev/null @@ -1,436 +0,0 @@ -/** itemconf.cpp - * zinclib/tests - * - * This software is the property of IntuiLab SA, France. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Some tests for zinclib - * - * 08/03/05 - * - * Contributors: - * Benoit Peccatte - * - */ - - -#include "Zinc.hpp" -#include -//global variable -Zinc *zn; - -//prepare constants -//white color -String white = String ("white"); -// red color -String red = String ("red"); -// blue color -String blue = String ("blue"); -// sample text -String texte = String ("Hello world"); -// sample gradient -String gradient = String ("=axial 0 | blue | white 50 | red"); -// sample gradient -String gradient2 = String ("=axial 0 | yellow | green 50 | red"); -// gradient name -String gname = "g1"; -// empty tag -String tag = String(""); - -String image = -"R0lGODlhZABkAJEAAPX19efn5wAAAAAAACwAAAAAZABkAAAC/4QfAbnLypyBCNrZbm77zGtR0chJ\ -HFVu4uclSoaKIFy+caue72fT82rbeUyYnA7RkflywWFF+UuphJLbtMaEVjtITeXpilwfjp2rpqTh\ -VuWw2Sczk4GpH5sn3p4w5yLfyKcl5BboR6chd/ZmGFd0Q/IH1IM36MfyOBTSGNYS89DnmMmG0qVY\ -BcXJZWJ6WjoHBgfXR7o6B4q19CVVlrT6VHe7OKNLdWmUh/iZqda69RbluRbkFTo6W3uFxws6zRSp\ -QzIiubaXyluNFq7XhDna9oueSIbEQt/DzSoXqspTp7sf4hehP122EYH1ChI0SgULmsrTrxwgMffu\ -xcpCcN03Uv8UCyWZh8XNtUGsJIIYF3ARDJEZ25QE06RhRHZ6AtkyKGpWJZIW073qZZFdmoeQejHE\ -BFTiFHfDHp67Y2mTyZ9aDN5MSWWeJq3fCHJ0uCnrI0J0VorqZPaiNKKHykFE1ijkrklEaE1qG61n\ -VxxoZJoE++XTV7Rfd6LjkqZVyWITVyoCKa9sYaV74zwe7FJrVYeOmdHklNXlkWGcNQHFi7afObug\ -Q1ZaUrbeNm5nz2F7fClx6HAdU+PLneyoN8t8qV62d+pywuHBgG+0BfWIsZimoQW1+tOe2LQnBXV7\ -FjBpMeiFiKrJl27Pc+yUPUvXi34923GE/Vl1hKwm3dbUnBX/X94XM7WVkls8371HzEGpEWgbV81J\ -sp8hGokkWGA2kROXYWRZ6FR//4F3XSStTbccReK8VlGIF6qzojXdIMedKicaxdkx4+3zTjuqqVej\ -NRzWxdpSiMBmlko/mgiMkM4gVV2BGarjlC9VjaWZfyNmpJk+klWIkyt+ceSJlsdUNllReSlVmJgT\ -lRlhT4fk50Vs52Ho43XhiVialTV6JVOJvfF35J402pUNU5Q9s5F8GM6pI2KBOgHiRwrpWeJwu7jm\ -opuiQThhXIdlhqBjbzblHz+bjlGeno7S9SlMGFWUXludvjMXPQ1td1+d5V2jjWi0zibFhlh11qBO\ -xiZSk3P6/yz1FFi7/TVWl1ByiaicYSIkpa+oomQtONhCGRVoJpKkmmFRjWHFUeP6BhI8hjJ7R4cL\ -8dVJiO0kFJSsNyKq5EmN5etNrfyK+g+YAhK7Y3RUIollYiL+hp1uc0JKaRYQs+UedXlajFpk6iE5\ -ZKIcv2pqsR93mOezKZX8213xUZWUJc7ZBF+9+ImHJaTB+UkMSoWm7JaT2dyWy503HeQzYx2jaXJw\ -pXFL2LXK3Rrjm8DCtU6Fq8kYD6bMpULfVlDd9W+lZ5HntMHKYDTmeHYMBR/ZrOrLU6roonqYhh/Z\ -vC1qCv7zl3RtL2np3wkLEuzBMOPNHGxyDi0bhdW+LRCHsP8uOs1AdxtdKaFXAROMFSnaWniq2fka\ -sqVmXqkSeUyb2bhPKJ7dXmdYYf1dc8G+6woqsrBYTz5x5uhTLN0BXwtxtsJK7lwwr85aftUEeanZ\ -cOa+TJw7y2X9TtgXZyNv0wGp9Z/Wh385vosiTNua056M88LwBH7q8rOnRXyAcutMqGwfF7uVLxXp\ -b+L6GZEyNzB4EXBSsflTtvzFNrV1zWDT8wpkegc20A0Gat7BjNiQRyHn6YQc7iKRP/izspyIg4Qz\ -4ZGw+GQvOxyuTYyIEpNiJhWAHSg8CqOToWxYtM+hbTspetmqcoanYdVHVPqyjf9cB8G1oC1gd3pi\ -hgSFo47S3G9pE1of+CJnn3h5pju4+FFLRHeoMSanjF60jNbsh7Ij6uVfoFoMTKpEmkShUDu2y96I\ -Poc54jEvYJETTAJf6JEKyqqQppHZjIKnRGUMTxoXcuSLbrO2E3VOSXwMk9F2pZylNfJmIxlglPg4\ -PimZZygKPOXN6jOSlR3NjtSin+WYJ8QDIYYr8gGk5/jFwMpxb41N6s/pdogf7+FCHpArVTLHFDzD\ -KWhn+5tRNPQnzbckz0L4+5qEXOMWlrSsknosipAkiDKIfMhLdNwQiawGgAIAADs="; - -//Let's test all item types -int main (int argc, char** argv) -{ - double a,b,c,d,e,f; - //catch exceptions - try - { - //don't forget to load zinc - Zinc::loadZinc (argv[0]); - //create the widget - zn = new Zinc (ZINC_BACKEND_OPENGL); - - //give it parameters - zn->setWidth (800); - zn->setHeight (600); - - ZincItem *g1; - //create a group - g1 = zn->itemCreateGroup (NULL); - //create a rectangle - ZincItem *rect; - rect = zn->itemCreateRectangle (g1, 10, 10, 100, 100); - - // create an arc - ZincItem *arc; - arc = zn->itemCreateArc (NULL, 10, 10, 200, 200); - - // create a curve - ZincPath* path = new ZincPath(200,200); - //test lineto - path->lineTo (250,250); - //test quadraticBezierTo - path->quadraticBezierTo (300,200, 300,300); - - //path->close (); - //display the curve - ZincItem *curve = zn->itemCreateCurve (g1, path); - - // create a sample text - ZincItem *text = zn->itemCreateText (g1); - zn->itemSetPosition (text, 10, 300); - - ZincItem *empty = zn->createTag(tag); - /************************************** - tests simple sets and gets - **************************************/ - - //transformations - zn->itemRotate (rect, 45, true); - zn->itemSetTransformation (rect, 1, 0, 0, 1, 0, 0); - zn->itemGetTransformation (rect, &a, &b, &c, &d, &e, &f); - printf ("Transformation \n%f,%f,%f,%f,%f,%f\n", a, b, c, d, e, f); - - //closed - zn->itemSetClosed (arc, 1); - printf ("Closed %d\n",zn->itemGetClosed (arc)); - - //composeAlpha - zn->itemSetComposealpha (rect, 1); - printf ("composeAlpha %d\n", zn->itemGetComposealpha (rect)); - - //Composerotation - zn->itemSetComposerotation (rect, 1); - printf ("Composerotation %d\n", zn->itemGetComposerotation (rect)); - - //Composescale - zn->itemSetComposescale(rect,1); - printf ("Composescale %d\n", zn->itemGetComposescale (rect)); - - //extent - zn->itemSetExtent (arc, 230); - printf ("Extent %d\n", zn->itemGetExtent (arc)); - - //fillcolor - zn->itemSetFillcolor(rect, red); - printf ("Fillcolor %s\n", zn->itemGetFillcolor (rect).c_str ()); - - //filled - zn->itemSetFilled (rect, 1); - printf ("Filled %d\n", zn->itemGetFilled (rect)); - - //linecolor - zn->itemSetLinecolor (arc, blue); - printf ("linecolor %s\n", zn->itemGetLinecolor (arc).c_str ()); - - //linestyle - zn->itemSetLinestyle (arc, lineStyle_dashed); - printf ("linestyle %d\n", zn->itemGetLinestyle (arc)); - - //linewidth - zn->itemSetLinewidth (arc, 3); - printf ("linewidth %f\n", zn->itemGetLinewidth (arc)); - - //piesplice - zn->itemSetPieslice (arc, 1); - printf ("piesplice %d\n", zn->itemGetPieslice (arc)); - - //priority - zn->itemSetPriority (rect, 10); - printf ("priority %d\n", zn->itemGetPriority (rect)); - - //Sensitive - zn->itemSetSensitive (rect, 1); - printf ("Sensitive %d\n", zn->itemGetSensitive (rect)); - - //Startangle - zn->itemSetStartangle (arc, 90); - printf ("Startangle %d\n", zn->itemGetStartangle (arc)); - - //SetVisible - zn->itemSetVisible (rect, 1); - printf ("Visible %d\n", zn->itemGetVisible (rect)); - - //Capstyle - zn->itemSetCapstyle (curve, capStyle_projecting); - printf ("Capstyle %d\n", zn->itemGetCapstyle (curve)); - - //Fillrule - zn->itemSetFillrule (curve, fillRule_negative); - printf ("Fillrule %d\n", zn->itemGetFillrule (curve)); - - //Joinstyle - zn->itemSetJoinstyle (curve, joinStyle_miter); - printf ("Joinstyle %d\n", zn->itemGetJoinstyle (curve)); - - //Relief - zn->itemSetRelief (curve, relief_groove); - printf ("Relief %d\n", zn->itemGetRelief (curve)); - - //Smoothrelief - zn->itemSetSmoothrelief (curve, 1); - printf ("Smoothrelief %d\n", zn->itemGetSmoothrelief (curve)); - - //alpha - zn->itemSetAlpha (g1, 75); - printf ("alpha %d\n", zn->itemGetAlpha (g1)); - - //Atomic - zn->itemSetAtomic (g1, 1); - printf ("Atomic %d\n", zn->itemGetAtomic (g1)); - - //Anchor - zn->itemSetAnchor (text, anchor_nw); - printf ("Anchor %d\n", zn->itemGetAnchor (text)); - - //Color - zn->itemSetColor (text, blue); - printf ("Color %s\n", zn->itemGetColor (text).c_str ()); - - //ConnectedItem - zn->itemSetConnecteditem (text, rect); - ZincItem *it0 = zn->itemGetConnecteditem (text); - printf ("ConnectedItem %x\n", (int)it0); - - //Connectionanchor - zn->itemSetConnectionanchor (text, anchor_se); - printf ("Connectionanchor %d\n", zn->itemGetConnectionanchor (text)); - - //Alignment - zn->itemSetAlignment (text, alignment_right); - printf ("Alignment %d\n", zn->itemGetAlignment (text)); - - //Overstriked - zn->itemSetOverstriked (text, 1); - printf ("Overstriked %d\n", zn->itemGetOverstriked (text)); - - //Spacing - zn->itemSetSpacing (text, 10); - printf ("Spacing %d\n", zn->itemGetSpacing (text)); - - //text - zn->itemSetText (text, texte); - printf ("text %s\n", zn->itemGetText (text).c_str ()); - - //Underlined - zn->itemSetUnderlined (text, 1); - printf ("Underlined %d\n", zn->itemGetUnderlined (text)); - - //width - zn->itemSetWidth (text, 500); - printf ("width %d\n", zn->itemGetWidth (text)); - - //Clip - zn->itemSetClip (g1, rect); - ZincItem *it1 = zn->itemGetClip (g1); - printf ("Clip %x\n", (int)it1); - zn->itemSetClip (g1, empty); - - - /************************************** - tests more sets and gets - **************************************/ - - //firt end - double a,b,c; - zn->itemSetLastend (curve, 5, 6, 7); - zn->itemGetLastend (curve, &a, &b, &c); - printf ("lastend %f, %f, %f\n", a, b, c); - - //last end - zn->itemSetFirstend (curve, 5, 6, 7); - zn->itemGetFirstend (curve, &a, &b, &c); - printf ("firstend %f, %f, %f\n", a, b, c); - - - // position - zn->itemGetPosition (text, &a, &b); - printf ("position %f, %f\n", a, b); - - //font - ZincFont *fn = zn->itemGetFont (text); - printf("Font %s\n", fn->name.c_str ()); - - // add tags - zn->addTag (rect, String ("tag0")); - zn->addTag (rect, String ("tag1")); - - //tags - String **taglist; - int count = zn->getTags (rect, &taglist); - for ( int i = 0 ; i < count ; i++ ) - { - printf("Tag %d : %s\n", i, taglist[i]->c_str ()); - } - - // delete tag - zn->dTag (rect, String ("tag0")); - - // new rectangle - ZincItem *r2; - r2 = zn->itemCreateRectangle (g1, 210, 210, 300, 300); - - //icons - ZincImage* img = zn->createImageFromData (image); - ZincItem *icon = zn->itemCreateIcon (g1, img); - zn->itemTranslate (icon, 500,10); - - //getImage - ZincImage *it2 = zn->itemGetImage (icon); - printf("Image %x\n", (int)it2); - - //bitmaps - ZincBitmap *bm = zn->createBitmapFromName ("AlphaStipple5"); - zn->itemSetFillpattern (r2, bm); - - //fillpattern - zn->itemSetFillpattern (curve, bm); - ZincBitmap *it3 = zn->itemGetFillpattern (curve); - printf("fillpattern %x\n", (int)it3); - - //tile - zn->itemSetTile (curve, bm); - ZincBitmap *it4 = zn->itemGetTile (curve); - printf("Tile %x\n", (int)it4); - - //mask - zn->itemSetMask (icon, bm); - ZincBitmap *it5 = zn->itemGetMask (icon); - printf("Mask %x\n", (int)it5); - - //linepattern - zn->itemSetLinepattern (curve, bm); - ZincBitmap *it6 = zn->itemGetLinepattern (curve); - printf("linepattern %x\n", (int)it6); - - /**************************************** - tests other functions for items - ****************************************/ - - // raise and lower - zn->raise (icon); - zn->lower (icon); - zn->raise (icon, r2); - zn->lower (icon, r2); - - //gradient name related - printf("Not gname %d\n", zn->isGname (gname)); - zn->gname (gradient, gname); - printf("Is gname %d\n", zn->isGname (gname)); - - //clone - ZincItem *i2 = zn->clone (icon); - zn->itemTranslate (i2, 50, 50); - - // type - printf("Type %d\n", zn->type (icon)); - - //font - delete fn; - fn = zn->getFont (); - printf("Font %s\n", fn->name.c_str ()); - - // get contour - printf ("n Contours %d\n", zn->contour (rect)); - - // set contour - ZincItem *curve2 = zn->itemCreateCurve (g1, path); - zn->contour (curve2, item_add_clockwise, r2); - zn->contour (curve2, item_add_counterclockwise, rect); - - // set coords - zn->coords (curve2, path, false ); - zn->coords (curve2, path, true, 1, 1 ); - - //remove coords - //zn->coordsRemove (curve2, 0); - - //deletes - delete path; - delete empty; - delete arc; - delete r2; - for(int i=0;i - * - */ - - -#include "Zinc.hpp" -#include -//global variable -Zinc *zn; - -const double PI = atan2 (1., 1.) * 4.; - -//prepare constants -//black color -String black = String ("white"); -// red color -String red = String ("red"); -// sample text -String texte = String ("Hello world"); -// sample gradient -String gradient = String ("=axial 0 | blue | white 50 | red"); -// sample gradient -String gradient2 = String ("=axial 0 | yellow | green 50 | red"); - -//Let's test all item types -int main (int argc, char** argv) -{ - //catch exceptions - try - { - //don't forget to load zinc - Zinc::loadZinc (argv[0]); - ZincPath *path; - - //create the widget - zn = new Zinc (ZINC_BACKEND_OPENGL); - - //give it parameters - zn->setWidth (600); - zn->setHeight (400); - - //change background color - printf ("%s\n",zn->getBackcolor ().c_str ()); - zn->setBackcolor (black); - printf ("%s\n",zn->getBackcolor ().c_str ()); - - ZincItem *g1; - ZincItem *g2; - //create a group - g1 = zn->itemCreateGroup (NULL); - // create another group (with parent) - g2 = zn->itemCreateGroup (g1); - - //create a rectangle - ZincItem *rect; - rect = zn->itemCreateRectangle (g1, 10, 10, 100, 100); - // fill the rectangle - zn->itemSetFilled (rect, 1); - // remove the rectangle - zn->itemRemove (rect); - delete rect; - - //try a second one - rect = zn->itemCreateRectangle (g1, 10, 10, 100, 100); - // fill the rectangle - zn->itemSetFilled (rect, 1); - // in red - zn->itemSetFillcolor (rect, red); - zn->itemSetTransformation (rect, cos (PI / 4), sin (PI / 4), - -sin (PI / 4), cos (PI / 4), 100, 0); - delete rect; - - // create an arc - ZincItem *arc; - arc = zn->itemCreateArc (NULL, 10, 10, 200, 200); - - // give parameters to the arc - zn->itemSetClosed (arc, 1); - zn->itemSetExtent (arc, 230); - // fill the arc - zn->itemSetFilled (arc, 1); - // with a gradient - zn->itemSetFillcolor (arc, gradient); - delete arc; - - // create a sample text - ZincItem *text = zn->itemCreateText (g2); - zn->itemSetText (text, texte); - zn->itemSetPosition (text, 10, 300); - zn->itemSetPosition (text, 10, 300); - delete text; - - // create a curve - path = new ZincPath(200,200); - //test lineto - path->lineTo (250,250); - //test quadraticBezierTo - path->quadraticBezierTo (300,200, 300,300); - //test cubicBezierTo - path->cubicBezierTo (400,400, 500,300, 400,200); - path->curveTo (500,200, 500,100, 400,100); - - //test arcs - path->arcTo (100, 100, 0, false, true, 300, 100); - - - // test close - path->close (); - //display the curve - ZincItem *pa = zn->itemCreateCurve (g2, path); - zn->contour (pa, false, path); - zn->contour (pa, true, path); - delete path; - // fill the arc - zn->itemSetFilled (pa, 1); - // with a gradient - zn->itemSetFillcolor (pa, gradient2); - zn->itemTranslate (pa, 30, 30, false); - - // test bounding box - double bbox[4]; - zn->bbox (pa, bbox); - printf ("bbox %f, %f, %f, %f\n", bbox[0], bbox[1], bbox[2], bbox[3]); - delete pa; - - // create an icon from a file - ZincImage *image = zn->createImageFromFile ("paper.gif"); - ZincItem *icon = zn->itemCreateIcon (g2, image); - printf("icon width %d, height %d\n", - zn->getImageWidth (image), zn->getImageHeight (image)); - zn->itemSetPosition (icon, 200, 10); - zn->itemTranslate (icon, -20, 10); - zn->itemRotate (icon, 0); - zn->itemRotate (icon, -45, 0, 0); - zn->itemRotate (icon, 45, true); - zn->itemRotate (icon, 45, 0, 0, true); - delete icon; - - // another icon to test other transforms - ZincItem *icon2 = zn->itemCreateIcon (g2, image); - zn->itemSetPosition (icon2, 300, 10); - zn->itemScale (icon2, 3., 3.); - zn->itemScale (icon2, .5, .5, 0, 0); - zn->itemSkew (icon2, 10, 10); - zn->itemSkewX (icon2, -10); - zn->itemSkewY (icon2, -10); - - // test bounding box - zn->relativeBbox (icon2, bbox); - printf ("relativeBbox %f, %f, %f, %f\n", bbox[0], bbox[1], bbox[2], bbox[3]); - delete icon2; - - - // another icon to test other transforms - ZincItem *icon3 = zn->itemCreateIcon (g2, image); - zn->itemSetPosition (icon3, 400, 10); - zn->itemScale (icon3, 3., 3.); - zn->itemResetTransformation (icon3); - double a, b, c, d, e, f; - zn->itemGetTransformation (icon3, &a, &b, &c, &d, &e, &f); - printf ("Transform %f %f %f %f %f %f\n", a, b, c, d, e, f); - zn->itemSetTransformation (icon3, a, b, c, d, e, f+20); - zn->itemMatrix (icon3, 2, 0, 0, 2, 1, 1); - delete icon3; - delete image; - - delete g1; - delete g2; - - //run all this - Zinc::zincMainLoop (); - - // delete the widget - delete (zn); - } - catch (ZincException e) - { - printf("ERROR : %s\n",e.what ()); - } -} diff --git a/zinclib.d/test/paper-grey.gif b/zinclib.d/test/paper-grey.gif deleted file mode 100644 index 96775b5..0000000 Binary files a/zinclib.d/test/paper-grey.gif and /dev/null differ diff --git a/zinclib.d/test/paper.gif b/zinclib.d/test/paper.gif deleted file mode 100644 index 3247d35..0000000 Binary files a/zinclib.d/test/paper.gif and /dev/null differ diff --git a/zinclib.d/test/runtests.sh b/zinclib.d/test/runtests.sh deleted file mode 100644 index 8cbdf96..0000000 --- a/zinclib.d/test/runtests.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -TEST="test items widget itemconf" - -# execution -#pour Unix stantard -export LD_LIBRARY_PATH=../../../v0.1/lib:$LD_LIBRARY_PATH -#pour MacOS X -export DYLD_LIBRARY_PATH=../../../v0.1/lib:$DYLD_LIBRARY_PATH - -if ( make 1>&2 ) -then - for test in $TEST - do - ./$test - done -fi diff --git a/zinclib.d/test/test.cpp b/zinclib.d/test/test.cpp deleted file mode 100644 index f8a6a22..0000000 --- a/zinclib.d/test/test.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/** test.cpp - * zinclib - * - * This software is the property of IntuiLab SA, France. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Some tests for zinclib - * - * 08/03/05 - * - * Contributors: - * Benoit Peccatte - * - */ - - -#include "Zinc.hpp" -#include -#include - -#define CNT 5000 - -ZincPath *path; -Zinc *zn; -Zinc *zn2; -int stop = 0; -String gradient = String("=axial 0 | blue | red"); -std::queue pile; - -void znCb (Zinc *zinc, ZincItem *item, ZincEvent *event, void *userData) -{ - printf ("Callback : x=%d y=%d k=%d t=%ld K=%s\n", - event->x, event->y, event->k, event->t, event->K.c_str ()); - try - { - ZincItem *rect; - int j; - if (stop == 0) - { - for (int i (0) ; i < CNT ; i++ ) - { - j = i%300; - - rect = zn->itemCreateRectangle (NULL, 10+j, 10+j, 100, 100); - zn->itemSetFilled (rect, 1); - zn->itemSetFillcolor (rect, gradient); - pile.push(rect); - } - stop = 1; - } - else - { - for (int i (0) ; i < CNT ; i++ ) - { - rect = pile.front(); -// printf("rect %d %s\n",i,Tcl_GetString(rect->object)); - zn->itemRemove (rect); - delete rect; - pile.pop(); - } - stop = 0; - } - } - catch (ZincException e) - { - printf("ERRORCB : %s\n",e.what ()); - } -// return 0; -} - -void znCb2 (Zinc *zinc, ZincItem *item, ZincEvent *event, void *userData) -{ - printf ("Callback2 : x=%d y=%d k=%d t=%1d K=%s\n", - event->x, event->y, event->k, event->t, event->K.c_str ()); -/// return 0; -} - -int main (int argc, char** argv) -{ - try - { - Zinc::loadZinc (argv[0]); - String black = String("white"); - String red = String("red"); - String texte = String("Bonjour lé gen"); - zn = new Zinc (ZINC_BACKEND_OPENGL); - - zn->setWidth (600); - zn->setHeight (400); - - printf ("%s\n",zn->getBackcolor ().c_str()); - zn->setBackcolor (black); - printf ("%s\n",zn->getBackcolor ().c_str()); - - ZincItem *g1; - ZincItem *g2; - printf("create group1\n"); - g1 = zn->itemCreateGroup (NULL); - printf("create group2\n"); - g2 = zn->itemCreateGroup (g1); - - printf("create rect\n"); - ZincItem *rect; - rect = zn->itemCreateRectangle (g1, 10, 10, 100, 100); - zn->itemSetFilled (rect, 1); - zn->itemSetFillcolor (rect, red); - printf("create arc\n"); - ZincItem *arc; - arc = zn->itemCreateArc (NULL, 10, 10, 200, 200); - - zn->itemSetClosed (arc, 1); - zn->itemSetExtent (arc, 230); - zn->itemSetFilled (arc, 1); - zn->itemSetFillcolor (arc, gradient); - - printf ("create text\n"); - ZincItem *text = zn->itemCreateText (g2); - zn->itemSetText (text, texte); - zn->itemSetPosition (text, 10, 200); - delete text; - - printf ("create curve\n"); - path = new ZincPath(5,5); - path->lineTo (100,5); - path->lineTo (200,100); - ZincItem *curve = zn->itemCreateCurve (g2, path); - path->lineTo (200,200); - delete curve; - - printf("create icon\n"); - ZincImage *image = zn->createImageFromFile ("paper.gif"); - ZincItem *icon = zn->itemCreateIcon (g2, image); - zn->itemSetPosition (icon, 200, 10); - - printf("binding\n"); - zn->focus (arc); - zn->itemBind (arc, String(""), znCb, NULL); - zn->itemBind (arc, String(""), znCb2, NULL); - - -/* zn2 = new Zinc (ZINC_BACKEND_OPENGL); - ZincItem *rect2; - rect2 = zn2->itemCreateRectangle (NULL, 10, 10, 100, 100); - zn2->focus (rect2); - zn2->itemSetFilled (rect2, 1); - zn2->itemSetFillcolor (rect2, red); - zn2->setWidth (600); - zn2->setHeight (400); - zn2->itemBind (rect2, String(""), znCb2, NULL); -*/ - Zinc::zincMainLoop (); - - delete g1; - delete g2; - delete icon; - delete image; - delete arc; - delete rect; - delete (zn); - } - catch (ZincException e) - { - printf("ERROR : %s\n",e.what ()); - } -} diff --git a/zinclib.d/test/test.svg b/zinclib.d/test/test.svg deleted file mode 100644 index 78b81f2..0000000 --- a/zinclib.d/test/test.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - -]> - - - - - - diff --git a/zinclib.d/test/widget.cpp b/zinclib.d/test/widget.cpp deleted file mode 100644 index 3a47ba7..0000000 --- a/zinclib.d/test/widget.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/** items.cpp - * zinclib/tests - * - * This software is the property of IntuiLab SA, France. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Some tests for zinclib - * - * 08/03/05 - * - * Contributors: - * Benoit Peccatte - * - */ - - -#include "Zinc.hpp" -//global variable -Zinc *zn; -Zinc *zn2; - -//prepare constants -//black color -String black = String("white"); -// red color -String red = String("blue"); -// sample text -String texte = String("Hello world"); -// sample gradient -String gradient = String("=axial 0 | blue | white 50 | red"); - - -void znCb (Zinc *zinc, ZincItem *item, ZincEvent *event, void *userData) -{ - printf ("Callback1 : x=%d y=%d k=%d t=%ld K=%s w=%d h=%d X=%d Y=%d b=%d\n", - event->x, event->y, event->k, event->t, event->K.c_str (), - event->w, event->h, event->X, event->Y, event->b ); -} - - -void znCb2 (Zinc *zinc, ZincItem *item, ZincEvent *event, void *userData) -{ - printf ("Callback2 : x=%d y=%d k=%d t=%ld K=%s w=%d h=%d X=%d Y=%d b=%d\n", - event->x, event->y, event->k, event->t, event->K.c_str (), - event->w, event->h, event->X, event->Y, event->b ); -} - -void znCb3 (Zinc *zinc, ZincEvent *event, void *userData) -{ - printf ("Callback3 : x=%d y=%d k=%d t=%ld K=%s w=%d h=%d X=%d Y=%d b=%d\n", - event->x, event->y, event->k, event->t, event->K.c_str (), - event->w, event->h, event->X, event->Y, event->b ); -} - -//Let's test all item types -int main (int argc, char** argv) -{ - //catch exceptions - try - { - //don't forget to load zinc - Zinc::loadZinc (argv[0]); - - //create the widget - zn = new Zinc (ZINC_BACKEND_OPENGL); - - //give it parameters - zn->setWidth (600); - zn->setHeight (400); - zn->setTitle("window1"); - - //change background color - printf ("Backcolor %s\n",zn->getBackcolor ().c_str()); - // test background color - zn->setBackcolor (black); - printf ("Backcolor %s\n",zn->getBackcolor ().c_str()); - - //change foreground color - printf ("Forecolor %s\n",zn->getForecolor ().c_str()); - // test foreground color - zn->setForecolor (red); - printf ("Forecolor %s\n",zn->getForecolor ().c_str()); - - ZincItem *g1; - ZincItem *g2; - //create a group - g1 = zn->itemCreateGroup (NULL); - // create another group (with parent) - g2 = zn->itemCreateGroup (g1); - - //create a rectangle - ZincItem *rect; - rect = zn->itemCreateRectangle (g1, 10, 10, 100, 100); - // fill the rectangle - zn->itemSetFilled (rect, 1); - // in red - zn->itemSetFillcolor (rect, red); - - //test change group - zn->chggroup (rect, g2); - ZincItem *g = zn->group (rect); - printf("Group %x\n", (int)g); - delete g; - zn->chggroup (rect, g1); - - // test bindings - zn->focus (rect); - zn->itemBind (rect, String(""), znCb, NULL); - zn->itemBind (rect, String(""), znCb2, NULL); - zn->itemBind (rect, String(""), znCb2, NULL,true); - - //test widget properties - printf ("Borderwidth %d\n", zn->getBorderwidth ()); - zn->setBorderwidth (3); - printf ("Borderwidth %d\n", zn->getBorderwidth ()); - - // fonts - ZincFont *font = zn->createFont ("courier", 24); - printf ("setFont\n"); - zn->setFont (font); - printf ("fontAscent %d\n", zn->getFontAscent (font)); - ZincItem* text = zn->itemCreateText (NULL); - zn->itemSetText (text, texte); - zn->itemSetPosition (text, 10, 300); - printf ("itemsetFont\n"); - zn->itemSetFont (text, font); - delete text; - delete font; - - //test a second widget - zn2 = new Zinc (ZINC_BACKEND_OPENGL); - zn2->setWidth (600); - zn2->setHeight (800); - zn2->setHeight (400); - zn2->setHeight (600); - zn2->setTitle("window2"); - printf("Dimension %d x %d\n", - zn2->getWidth(), zn2->getHeight()); - ZincItem *rect2; - - //something on the 2nd widget - rect2 = zn2->itemCreateRectangle (NULL, 100, 100, 100, 100); - - //binding on the 2nd widget directly - zn2->focus (rect2); - zn2->itemSetFilled (rect2, 1); - zn2->itemSetFillcolor (rect2, gradient); - zn2->bind (String(""), znCb3, NULL); - zn2->bind (String(""), znCb3, NULL,true); - zn2->unbind (String("")); - zn2->bind (String(""), znCb3, NULL); - - //exception test - try - { - zn->itemSetClip (rect2, rect2); - } - catch (ZincException &e) - { - printf("Exception OK SUCCESS %s OK SUCCESS\n", e.what()); - } - - delete rect; - delete rect2; - delete g1; - delete g2; - - //run all this - Zinc::zincMainLoop (); - - // delete the widget - delete (zn); - } - catch (ZincException &e) - { - printf("ERROR : %s\n",e.what ()); - } - catch (std::exception &e) - { - printf("STD ERROR : %s\n",e.what ()); - } -} -- cgit v1.1