summaryrefslogtreecommitdiff
path: root/src/forms_free.cxx
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2008-09-14 15:45:27 +0000
committerFabien Costantini <fabien@onepost.net>2008-09-14 15:45:27 +0000
commitce4d0fd5d86a1f725aba6093d9674b993d437d6c (patch)
tree4839ae652332f4ec80de23a21fb0ddd702a20330 /src/forms_free.cxx
parent7f4e2867e84826d237e48f01f25de168cfdb986b (diff)
Doxygen Documentation WP4 Done. Has all documentation content but should be completed in increment 2. Registered for WP5.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6239 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/forms_free.cxx')
-rw-r--r--src/forms_free.cxx29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/forms_free.cxx b/src/forms_free.cxx
index 5855f8b09..918086d79 100644
--- a/src/forms_free.cxx
+++ b/src/forms_free.cxx
@@ -41,6 +41,34 @@ void Fl_Free::step(void *v) {
Fl::add_timeout(.01,step,v);
}
+/**
+ The constructor takes both the type and the handle
+ function. The handle function should be declared as follows:
+ <UL>
+ <PRE>
+ int
+ handle_function(Fl_Widget *w,
+ int event,
+ float event_x,
+ float event_y,
+ char key)
+ </PRE>
+ </UL>
+ This function is called from the the handle() method in
+ response to most events, and is called by the draw() method.
+ The event argument contains the event type:
+ <UL>
+ <PRE>
+ // old event names for compatability:
+ #define FL_MOUSE FL_DRAG
+ #define FL_DRAW 0
+ #define FL_STEP 9
+ #define FL_FREEMEM 12
+ #define FL_FREEZE FL_UNMAP
+ #define FL_THAW FL_MAP
+ </PRE>
+ </UL>
+*/
Fl_Free::Fl_Free(uchar t,int X, int Y, int W, int H,const char *l,
FL_HANDLEPTR hdl) :
Fl_Widget(X,Y,W,H,l) {
@@ -51,6 +79,7 @@ Fl_Widget(X,Y,W,H,l) {
Fl::add_timeout(.01,step,this);
}
+/** The destructor will call the handle function with the event FL_FREE_MEM. */
Fl_Free::~Fl_Free() {
Fl::remove_timeout(step,this);
hfunc(this,FL_FREEMEM,0,0,0);