summaryrefslogtreecommitdiff
path: root/documentation/common.html
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2006-08-23 20:38:30 +0000
committerMatthias Melcher <fltk@matthiasm.com>2006-08-23 20:38:30 +0000
commitcda7f614627d3bcf303ab1ad92d5d7fe53f3e3af (patch)
treea19c8f6ade7823df4dcaeea63781564b9f945d1d /documentation/common.html
parent0d0d5326ed4944cc97ea7f8e24e0a487f758dd3c (diff)
Adding more links to the global function reference list
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5351 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'documentation/common.html')
-rw-r--r--documentation/common.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/documentation/common.html b/documentation/common.html
index ef171b2d2..9c2084de6 100644
--- a/documentation/common.html
+++ b/documentation/common.html
@@ -507,6 +507,27 @@ method to select your label type.</P>
<P>The <TT>Fl::set_labeltype</TT> method can also be used to overload
an existing label type such as <TT>FL_NORMAL_LABEL</TT>.</P>
+<H4><A NAME="add_symbol">Making your own symbols</A></H4>
+
+<P>It is also possible to define your own drawings and add
+them to the symbol list, so they can be rendered as part of
+any label.</P>
+
+<P>To create a new symbol, you implement a drawing function
+<tt>void drawit(Fl_Color c)</tt> which typically uses the
+<a href="drawing.html#complex">complex drawing functions</a>
+to generate a vector shape inside a two-by-two units sized box
+around the origin. This function is then linked into the symbols
+table using <tt>fl_add_symbol</tt>:</P>
+
+<UL><PRE>
+int fl_add_symbol(const char *name, void (*drawit)(Fl_Color), int scalable)
+</PRE></UL>
+
+<P><i>name</i> is the name of the symbol without the "@"; <i>scalable</I>
+must be set to 1 if the symbol is generated using scalable vector drawing
+functions.</P>
+
<H2>Callbacks</H2>
<P>Callbacks are functions that are called when the value of a