2006-10-29 17:16:03 +03:00
|
|
|
<HTML>
|
|
|
|
<HEAD>
|
|
|
|
<TITLE>Fl_Free</TITLE>
|
|
|
|
</HEAD>
|
|
|
|
<BODY>
|
2001-11-28 21:00:17 +03:00
|
|
|
<!-- NEW PAGE -->
|
1999-01-13 22:28:54 +03:00
|
|
|
<H2><A name=Fl_Free>class Fl_Free</A></H2>
|
|
|
|
<HR>
|
|
|
|
<H3>Class Hierarchy</H3>
|
|
|
|
<UL>
|
|
|
|
<PRE>
|
|
|
|
<A href=Fl_Widget.html#Fl_Widget>Fl_Widget</A>
|
1998-12-29 17:21:17 +03:00
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
+----<B>Fl_Free</B>
|
|
|
|
</PRE>
|
|
|
|
</UL>
|
|
|
|
<H3>Include Files</H3>
|
|
|
|
<UL>
|
|
|
|
<PRE>
|
|
|
|
#include <FL/Fl_Free.H>
|
|
|
|
</PRE>
|
|
|
|
</UL>
|
|
|
|
<H3>Description</H3>
|
2001-11-29 22:24:00 +03:00
|
|
|
Emulation of the Forms "free" widget. This emulation allows the free
|
|
|
|
demo to run, and appears to be useful for porting programs written in
|
|
|
|
Forms which use the free widget or make subclasses of the Forms
|
|
|
|
widgets.
|
|
|
|
<P>There are five types of free, which determine when the handle
|
1999-01-13 22:28:54 +03:00
|
|
|
function is called: </P>
|
|
|
|
<UL>
|
|
|
|
<PRE>
|
1998-12-29 17:21:17 +03:00
|
|
|
#define FL_NORMAL_FREE 1
|
|
|
|
#define FL_SLEEPING_FREE 2
|
|
|
|
#define FL_INPUT_FREE 3
|
|
|
|
#define FL_CONTINUOUS_FREE 4
|
|
|
|
#define FL_ALL_FREE 5
|
1999-01-13 22:28:54 +03:00
|
|
|
</PRE>
|
|
|
|
</UL>
|
2001-11-29 22:24:00 +03:00
|
|
|
<P>An FL_INPUT_FREE accepts FL_FOCUS events. A FL_CONTINUOUS_FREE sets
|
|
|
|
a timeout callback 100 times a second and provides a FL_STEP event,
|
|
|
|
this has obvious detrimental effects on machine performance.
|
1999-01-13 22:28:54 +03:00
|
|
|
FL_ALL_FREE does both. FL_SLEEPING_FREE are deactivated. </P>
|
|
|
|
<H3>Methods</H3>
|
|
|
|
<UL>
|
|
|
|
<LI><A href=#Fl_Free.Fl_Free>Fl_Free</A></LI>
|
|
|
|
<LI><A href=#Fl_Free.~Fl_Free>~Fl_Free</A></LI>
|
|
|
|
</UL>
|
2001-11-29 22:24:00 +03:00
|
|
|
<H4><A name=Fl_Free.Fl_Free>Fl_Free(uchar type, int, int, int, int,
|
1999-01-13 22:28:54 +03:00
|
|
|
const char*l, FL_HANDLEPTR hdl)</A></H4>
|
|
|
|
The constructor takes both the <TT>type</TT> and the <TT>handle</TT>
|
2001-11-29 22:24:00 +03:00
|
|
|
function. The handle function should be declared as follows:
|
1999-01-13 22:28:54 +03:00
|
|
|
<UL>
|
|
|
|
<PRE>
|
1998-12-29 17:21:17 +03:00
|
|
|
int
|
|
|
|
handle_function(Fl_Widget *w,
|
|
|
|
int event,
|
|
|
|
float event_x,
|
|
|
|
float event_y,
|
|
|
|
char key)
|
1999-01-13 22:28:54 +03:00
|
|
|
</PRE>
|
|
|
|
</UL>
|
2001-11-29 22:24:00 +03:00
|
|
|
This function is called from the the <TT>handle()</TT> method in
|
|
|
|
response to most events, and is called by the <TT>draw()</TT> method.
|
|
|
|
The <TT>event</TT> argument contains the event type:
|
1999-01-13 22:28:54 +03:00
|
|
|
<UL>
|
|
|
|
<PRE>
|
1998-12-29 17:21:17 +03:00
|
|
|
// 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
|
1999-01-13 22:28:54 +03:00
|
|
|
</PRE>
|
|
|
|
</UL>
|
|
|
|
<H4><A name=Fl_Free.~Fl_Free>virtual Fl_Free::~Fl_Free()</A></H4>
|
|
|
|
The destructor will call the handle function with the event <TT>
|
2001-11-28 21:00:17 +03:00
|
|
|
FL_FREE_MEM</TT>. </BODY></HTML>
|