From 4a6299fbccf79be61bef4955fb67260e01e26a42 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 24 Jun 2002 15:22:57 +0000 Subject: Add FLTK_1_0_COMPAT symbol for 1.0.x compatible names. Document this in the migration appendix, and add a section on keyboard focus. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2316 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 3 +++ FL/Enumerations.H | 12 ++++++++++-- FL/filename.H | 17 +++++++++++++++-- documentation/migration.html | 27 +++++++++++++++++++++++++-- 4 files changed, 53 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index cb5638841..ffb500fa5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ CHANGES IN FLTK 1.1.0 + - Now support FLTK_1_0_COMPAT symbol to define + compatibility macros for the old FLTK 1.0.x function + names to the 1.1.x names. - Now translate the window coordinates when a window is shown, moved, or resized. This should fix the "menus showing up at the wrong position" bug under XFree86. diff --git a/FL/Enumerations.H b/FL/Enumerations.H index 92e6f1454..9598098e5 100644 --- a/FL/Enumerations.H +++ b/FL/Enumerations.H @@ -1,5 +1,5 @@ // -// "$Id: Enumerations.H,v 1.18.2.14.2.24 2002/06/09 13:35:49 easysw Exp $" +// "$Id: Enumerations.H,v 1.18.2.14.2.25 2002/06/24 15:22:57 easysw Exp $" // // Enumerations for the Fast Light Tool Kit (FLTK). // @@ -394,8 +394,16 @@ enum Fl_Damage { FL_DAMAGE_ALL = 0x80 }; +// FLTK 1.0.x compatibility definitions... +# ifdef FLTK_1_0_COMPAT +# define contrast fl_contrast +# define down fl_down +# define frame fl_frame +# define inactive fl_inactive +# endif // FLTK_1_0_COMPAT + #endif // -// End of "$Id: Enumerations.H,v 1.18.2.14.2.24 2002/06/09 13:35:49 easysw Exp $". +// End of "$Id: Enumerations.H,v 1.18.2.14.2.25 2002/06/24 15:22:57 easysw Exp $". // diff --git a/FL/filename.H b/FL/filename.H index 4df4e4223..73bc17e1b 100644 --- a/FL/filename.H +++ b/FL/filename.H @@ -1,5 +1,5 @@ /* - * "$Id: filename.H,v 1.11.2.4.2.7 2002/05/02 14:15:46 easysw Exp $" + * "$Id: filename.H,v 1.11.2.4.2.8 2002/06/24 15:22:57 easysw Exp $" * * Filename header file for the Fast Light Tool Kit (FLTK). * @@ -96,9 +96,22 @@ FL_EXPORT int fl_filename_list(const char *d, struct dirent ***list, Fl_File_Sort_F *sort = fl_numericsort); # endif /* __cplusplus */ +// FLTK 1.0.x compatibility definitions... +# ifdef FLTK_1_0_COMPAT +# define filename_absolute fl_filename_absolute +# define filename_expand fl_filename_expand +# define filename_ext fl_filename_ext +# define filename_isdir fl_filename_isdir +# define filename_list fl_filename_list +# define filename_match fl_filename_match +# define filename_name fl_filename_name +# define filename_relative fl_filename_relative +# define numericsort fl_numericsort +# endif // FLTK_1_0_COMPAT + #endif /* FL_FILENAME_H */ /* - * End of "$Id: filename.H,v 1.11.2.4.2.7 2002/05/02 14:15:46 easysw Exp $". + * End of "$Id: filename.H,v 1.11.2.4.2.8 2002/06/24 15:22:57 easysw Exp $". */ diff --git a/documentation/migration.html b/documentation/migration.html index 68a03357f..9e50b0533 100644 --- a/documentation/migration.html +++ b/documentation/migration.html @@ -32,8 +32,19 @@ class.

Function Names

Some function names have changed from FLTK 1.0.x to 1.1.x in -order to avoid name space collisions. The following table shows -the old and new function names:

+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.: + + + +

The following table shows the old and new function names:

@@ -117,5 +128,17 @@ as the label.

Image labels in menu items must still use the old labeltype mechanism to preserve source compatibility. +

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: + +

+ -- cgit v1.2.3