Century Embedded Technologies Nano-X SDK and Developer's Guide | ||
---|---|---|
Prev | Appendix E. Forms Compatibility | Next |
You should be able to compile existing Forms or XForms source code by changing the include directory switch to your compiler so that the forms.h file supplied with FLTK is included. Take a look at forms.h to see how it works, but the basic trick is lots of inline functions. Most of the XForms demo programs work without changes.
You will also have to compile your Forms or XForms program using a C++ compiler. The FLTK library does not provide C bindings or header files.
Although FLTK was designed to be compatable with the GL Forms library (version 0.3 or so), XForms has bloated severely and it's interface is X-specific. Therefore, XForms compatibility is no longer 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.
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 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.