summaryrefslogtreecommitdiff
path: root/documentation/forms.dox
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2008-09-17 21:13:03 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2008-09-17 21:13:03 +0000
commit74cbd55745e7c55a62be524279c707a572f6c688 (patch)
tree42413a44b04943949c1e9057d25895a51b3c4295 /documentation/forms.dox
parenta2eaf60572320f112e3e9bebb57dbe14450258f0 (diff)
Another bunch of doxygen updates: *.dox. Fixed links and many html tags.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6287 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'documentation/forms.dox')
-rw-r--r--documentation/forms.dox62
1 files changed, 31 insertions, 31 deletions
diff --git a/documentation/forms.dox b/documentation/forms.dox
index b2cb92ade..6db19983e 100644
--- a/documentation/forms.dox
+++ b/documentation/forms.dox
@@ -12,7 +12,7 @@ new name so you don't write over the old one.
<P>You will need to edit your main code considerably to get it to link
with the output from FLUID. If you are not interested in this you may
have more immediate luck with the forms compatibility header, <TT>
-&lt;FL/forms.H&gt;</TT>. </P>
+<FL/forms.H></TT>. </P>
<H2>Using the Compatibility Header File</H2>
You should be able to compile existing Forms or XForms source code by
changing the include directory switch to your compiler so that the <TT>
@@ -29,17 +29,17 @@ a goal of FLTK. Compatibility was limited to things that were free, or
that would add code that would not be linked in if the feature is
unused, or that was not X-specific. </P>
<P>To use any new features of FLTK, you should rewrite your code to not
-use the inline functions and instead use &quot;pure&quot; FLTK. This will make
+use the inline functions and instead use "pure" FLTK. This will make
it a lot cleaner and make it easier to figure out how to call the FLTK
functions. Unfortunately this conversion is harder than expected and
even Digital Domain's inhouse code still uses <TT>forms.H</TT> a lot. </P>
<H2>Problems You Will Encounter</H2>
<P>Many parts of XForms use X-specific structures like <TT>XEvent</TT>
in their interface. I did not emulate these! Unfortunately these
-features (such as the &quot;canvas&quot; widget) are needed by most large
+features (such as the "canvas" widget) are needed by most large
programs. You will need to rewrite these to use FLTK subclasses. </P>
<P><A href=Fl_Free.html#Fl_Free><TT>Fl_Free</TT></A> widgets emulate
-the <I>old</I> Forms &quot;free&quot; widget. It may be useful for porting
+the <I>old</I> Forms "free" widget. It may be useful for porting
programs that change the <TT>handle()</TT> function on widgets, but you
will still need to rewrite things. </P>
<P><A href=Fl_Timer.html#Fl_Timer><TT>Fl_Timer</TT></A> widgets are
@@ -49,8 +49,8 @@ inefficient and inaccurate compared to using <A href="Fl.html#Fl.add_timeout">
<P><I>All instance variables are hidden.</I> If you directly refer to
the x, y, w, h, label, or other fields of your Forms widgets you will
have to add empty parenthesis after each reference. The easiest way to
-do this is to globally replace &quot;-&gt;x&quot; with &quot;-&gt;x()&quot;, etc. Replace
-&quot;boxtype&quot; with &quot;box()&quot;. </P>
+do this is to globally replace "->x" with "->x()", etc. Replace
+"boxtype" with "box()". </P>
<P><TT>const char *</TT> arguments to most FLTK methods are simply
stored, while Forms would <TT>strdup()</TT> the passed string. This is
most noticable with the label of widgets. Your program must always
@@ -61,11 +61,11 @@ may want to try the <A href=Fl_Output.html#Fl_Output><TT>Fl_Output</TT></A>
<P>The default fonts and sizes are matched to the older GL version of
Forms, so all labels will draw somewhat larger than an XForms program
does. </P>
-<P>fdesign outputs a setting of a &quot;fdui&quot; instance variable to the main
+<P>fdesign outputs a setting of a "fdui" instance variable to the main
window. I did not emulate this because I wanted all instance variables
to be hidden. You can store the same information in the <TT>user_data()</TT>
field of a window. To do this, search through the fdesign output for
-all occurances of &quot;-&gt;fdui&quot; and edit to use &quot;-&gt;user_data()&quot; instead.
+all occurances of "->fdui" and edit to use "->user_data()" instead.
This will require casts and is not trivial. </P>
<P>The prototype for the functions passed to <TT>fl_add_timeout()</TT>
and <TT>fl_set_idle_callback()</TT> callback are different. </P>
@@ -123,9 +123,9 @@ IRISGL version of Forms. Most of these problems are the same ones
encountered when going from old Forms to XForms:
<H3>Does Not Run In Background</H3>
The IRISGL library always forked when you created the first window,
-unless &quot;foreground()&quot; was called. FLTK acts like &quot;foreground()&quot; is
-called all the time. If you really want the fork behavior do &quot;if
-(fork()) exit(0)&quot; right at the start of your program.
+unless "foreground()" was called. FLTK acts like "foreground()" is
+called all the time. If you really want the fork behavior do "if
+(fork()) exit(0)" right at the start of your program.
<H3>You Cannot Use IRISGL Windows or fl_queue</H3>
If a Forms (not XForms) program if you wanted your own window for
displaying things you would create a IRISGL window and draw in it,
@@ -148,7 +148,7 @@ of your program, call <TT>Fl::wait()</TT> and then check these
variables, acting on them as though they are events read from <TT>
fl_queue</TT>. </P>
<H3>You Must Use OpenGL to Draw Everything</H3>
-<P>The file <TT>&lt;FL/gl.h&gt;</TT> defines replacements for a lot of IRISGL
+<P>The file <TT><FL/gl.h></TT> defines replacements for a lot of IRISGL
calls, translating them to OpenGL. There are much better translators
available that you might want to investigate. </P>
<H3>You Cannot Make Forms Subclasses</H3>
@@ -158,15 +158,15 @@ subclass of <TT>Fl_Widget</TT>. It is important to note that the <TT>
handle()</TT> method is not exactly the same as the <TT>handle()</TT>
function of Forms. Where a Forms <TT>handle()</TT> returned non-zero,
your <TT>handle()</TT> must call <TT>do_callback()</TT>. And your <TT>
-handle()</TT> must return non-zero if it &quot;understood&quot; the event.
-<P>An attempt has been made to emulate the &quot;free&quot; widget. This appears
+handle()</TT> must return non-zero if it "understood" the event.
+<P>An attempt has been made to emulate the "free" widget. This appears
to work quite well. It may be quicker to modify your subclass into a
-&quot;free&quot; widget, since the &quot;handle&quot; functions match. </P>
+"free" widget, since the "handle" functions match. </P>
<P>If your subclass draws into the overlay you are in trouble and will
have to rewrite things a lot. </P>
-<H3>You Cannot Use &lt;device.h&gt;</H3>
- If you have written your own &quot;free&quot; widgets you will probably get a
-lot of errors about &quot;getvaluator&quot;. You should substitute:
+<H3>You Cannot Use <device.h></H3>
+ If you have written your own "free" widgets you will probably get a
+lot of errors about "getvaluator". You should substitute:
<CENTER><TABLE border=1 WIDTH=90% summary="Mapping of Forms valuators to FLTK.">
<TR><TH align=center>Forms</TH><TH align=center>FLTK</TH></TR>
<TR><TD>MOUSE_X</TD><TD>Fl::event_x_root()</TD></TR>
@@ -181,21 +181,21 @@ lot of errors about &quot;getvaluator&quot;. You should substitute:
</TABLE></CENTER>
Anything else in <TT>getvaluator</TT> and you are on your own...
<H3>Font Numbers Are Different</H3>
- The &quot;style&quot; numbers have been changed because I wanted to insert
+ The "style" numbers have been changed because I wanted to insert
bold-italic versions of the normal fonts. If you use Times, Courier,
or Bookman to display any text you will get a different font out of
FLTK. If you are really desperate to fix this use the following code:
-<UL>
-<PRE>
-fl_font_name(3,&quot;*courier-medium-r-no*&quot;);
-fl_font_name(4,&quot;*courier-bold-r-no*&quot;);
-fl_font_name(5,&quot;*courier-medium-o-no*&quot;);
-fl_font_name(6,&quot;*times-medium-r-no*&quot;);
-fl_font_name(7,&quot;*times-bold-r-no*&quot;);
-fl_font_name(8,&quot;*times-medium-i-no*&quot;);
-fl_font_name(9,&quot;*bookman-light-r-no*&quot;);
-fl_font_name(10,&quot;*bookman-demi-r-no*&quot;);
-fl_font_name(11,&quot;*bookman-light-i-no*&quot;);
-</PRE>
+
+\code
+fl_font_name(3,"*courier-medium-r-no*");
+fl_font_name(4,"*courier-bold-r-no*");
+fl_font_name(5,"*courier-medium-o-no*");
+fl_font_name(6,"*times-medium-r-no*");
+fl_font_name(7,"*times-bold-r-no*");
+fl_font_name(8,"*times-medium-i-no*");
+fl_font_name(9,"*bookman-light-r-no*");
+fl_font_name(10,"*bookman-demi-r-no*");
+fl_font_name(11,"*bookman-light-i-no*");
+\endcode
*/