From 501690edce2cecc356334fc42e7f429907cdfa1e Mon Sep 17 00:00:00 2001 From: Fabien Costantini Date: Fri, 17 Oct 2008 11:08:15 +0000 Subject: Last test does keep history, lets add all related files and patch them afterwards... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6447 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/src_doc/migration_1_1.dox | 172 ++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 documentation/src_doc/migration_1_1.dox (limited to 'documentation/src_doc/migration_1_1.dox') diff --git a/documentation/src_doc/migration_1_1.dox b/documentation/src_doc/migration_1_1.dox new file mode 100644 index 000000000..17a498cc0 --- /dev/null +++ b/documentation/src_doc/migration_1_1.dox @@ -0,0 +1,172 @@ +/** + + \page migration_1_1 G - Migrating Code from FLTK 1.0 to 1.1 + + +This appendix describes the differences between the FLTK +1.0.x and FLTK 1.1.x functions and classes. + +\section migration_1_1_color Color Values + +Color values are now stored in a 32-bit unsigned integer +instead of the unsigned character in 1.0.x. This allows for the +specification of 24-bit RGB values or 8-bit FLTK color indices. + +FL_BLACK and FL_WHITE now remain black and +white, even if the base color of the gray ramp is changed using +Fl::background(). +FL_DARK3 and FL_LIGHT3 can be used instead to +draw a very dark or a very bright background hue. + +Widgets use the new color symbols FL_FORGROUND_COLOR, +FL_BACKGROUND_COLOR, FL_BACKGROUND2_COLOR, +FL_INACTIVE_COLOR, and FL_SELECTION_COLOR. +More details can be found in the chapter +Enumerations. + +\section migration_1_1_cutnpaste Cut and Paste Support + +The FLTK clipboard is now broken into two parts - a local +selection value and a cut-and-paste value. This allows FLTK to +support things like highlighting and replacing text that was +previously cut or copied, which makes FLTK applications behave +like traditional GUI applications. + +\section migration_1_1_file_chooser File Chooser + +The file chooser in FLTK 1.1.x is significantly different +than the one supplied with FLTK 1.0.x. Any code that directly +references the old FCB class or members will need +to be ported to the new +Fl_File_Chooser +class. + +\section migration_1_1_functions Function Names + +Some function names have changed from FLTK 1.0.x to 1.1.x in +order to avoid name space collisions. You can still use the old +function names by defining the FLTK_1_0_COMPAT +symbol on the command-line when you compile +(-DFLTK_1_0_COMPAT) or in your source, e.g.: + +\code +#define FLTK_1_0_COMPAT +#include +#include +#include +\endcode + +The following table shows the old and new function names: + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Old 1.0.x NameNew 1.1.x Name
contrast()fl_contrast()
down()fl_down()
filename_absolute()fl_filename_absolute()
filename_expand()fl_filename_expand()
filename_ext()fl_filename_ext()
filename_isdir()fl_filename_isdir()
filename_list()fl_filename_list()
filename_match()fl_filename_match()
filename_name()fl_filename_name()
filename_relative()fl_filename_relative()
filename_setext()fl_filename_setext()
frame()fl_frame()
inactive()fl_inactive()
numericsort()fl_numericsort()
+
+ +\section migration_1_1_images Image Support + +Image support in FLTK has been significantly revamped in +1.1.x. The Fl_Image class +is now a proper base class, with the core image drawing +functionality in the +Fl_Bitmap, +Fl_Pixmap, +and +Fl_RGB_Image +classes. + +BMP, GIF, JPEG, PNG, XBM, and XPM image files can now be +loaded using the appropriate image classes, and the +Fl_Shared_Image +class can be used to cache images in memory. + +Image labels are no longer provided as an add-on label type. +If you use the old label() methods on an image, the +widget's image() method is called to set the image +as the label. + +Image labels in menu items must still use the old labeltype +mechanism to preserve source compatibility. + +\section migration_1_1_keyboard Keyboard Navigation + +FLTK 1.1.x now supports keyboard navigation and control with +all widgets. To restore the old FLTK 1.0.x behavior so that only +text widgets get keyboard focus, call the +Fl::visible_focus() +method to disable it: + +\code +Fl::visible_focus(0); +\endcode + +\htmlonly +
+[Index]    +[Previous]  + \ref osissues    +[Next]  + \ref migration_1_3 + +\endhtmlonly +*/ -- cgit v1.2.3