From 74cbd55745e7c55a62be524279c707a572f6c688 Mon Sep 17 00:00:00 2001
From: Albrecht Schlosser 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,
-<FL/forms.H>.
To use any new features of FLTK, you should rewrite your code to not -use the inline functions and instead use "pure" 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 forms.H a lot.
Many parts of XForms use X-specific structures like XEvent in their interface. I did not emulate these! Unfortunately these -features (such as the "canvas" 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.
Fl_Free widgets emulate -the old Forms "free" widget. It may be useful for porting +the old Forms "free" widget. It may be useful for porting programs that change the handle() function on widgets, but you will still need to rewrite things.
Fl_Timer widgets are
@@ -49,8 +49,8 @@ inefficient and inaccurate compared to using
All instance variables are hidden. 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 "->x" with "->x()", etc. Replace
-"boxtype" with "box()".
const char * arguments to most FLTK methods are simply stored, while Forms would strdup() 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 Fl_Output
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.
-fdesign outputs a setting of a "fdui" instance variable to the main +
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 user_data() field of a window. To do this, search through the fdesign output for -all occurances of "->fdui" and edit to use "->user_data()" instead. +all occurances of "->fdui" and edit to use "->user_data()" instead. This will require casts and is not trivial.
The prototype for the functions passed to fl_add_timeout() and fl_set_idle_callback() callback are different.
@@ -123,9 +123,9 @@ IRISGL version of Forms. Most of these problems are the same ones encountered when going from old Forms to XForms:The file <FL/gl.h> defines replacements for a lot of IRISGL +
The file
An attempt has been made to emulate the "free" widget. This appears +handle() must return non-zero if it "understood" the event. +
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 -"free" widget, since the "handle" functions match.
+"free" widget, since the "handle" functions match.If your subclass draws into the overlay you are in trouble and will have to rewrite things a lot.
-| Forms | FLTK |
|---|---|
| MOUSE_X | Fl::event_x_root() |
-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*"); -+ +\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 */ -- cgit v1.2.3