aboutsummaryrefslogtreecommitdiff
path: root/zinclib.d/doc/HOWTO
diff options
context:
space:
mode:
authorlecoanet2005-05-10 14:55:18 +0000
committerlecoanet2005-05-10 14:55:18 +0000
commit5abe4bd15642bbc83f46553aa5275430b14f5f91 (patch)
treeee9303b7dbeb1df88debd5ddef167db86df3bdac /zinclib.d/doc/HOWTO
parentb8356d1bffb6a8fcb83af50fe8725140ae0ddd47 (diff)
downloadtkzinc-5abe4bd15642bbc83f46553aa5275430b14f5f91.zip
tkzinc-5abe4bd15642bbc83f46553aa5275430b14f5f91.tar.gz
tkzinc-5abe4bd15642bbc83f46553aa5275430b14f5f91.tar.bz2
tkzinc-5abe4bd15642bbc83f46553aa5275430b14f5f91.tar.xz
*** empty log message ***
Diffstat (limited to 'zinclib.d/doc/HOWTO')
-rw-r--r--zinclib.d/doc/HOWTO56
1 files changed, 56 insertions, 0 deletions
diff --git a/zinclib.d/doc/HOWTO b/zinclib.d/doc/HOWTO
new file mode 100644
index 0000000..6d41c5b
--- /dev/null
+++ b/zinclib.d/doc/HOWTO
@@ -0,0 +1,56 @@
+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);
+