You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.7KB

  1. /**
  2. \page migration_1_3 Migrating Code from FLTK 1.1 to 1.3
  3. This appendix describes the differences between the FLTK
  4. 1.1.x and FLTK 1.3.x functions and classes.
  5. \section migration_1_3_fltk_1_0 Migrating From FLTK 1.0
  6. If you want to migrate your code from FLTK 1.0 to FLTK 1.3,
  7. then you should first consult Appendix \ref migration_1_1.
  8. \section migration_1_3_fl_scroll Fl_Scroll Widget
  9. Fl_Scroll::scroll_to(int x, int y) replaces Fl_Scroll::position(int x, int y).
  10. This change was needed because Fl_Scroll::position(int,int) redefined
  11. Fl_Widget::position(int,int), but with a completely different function (moving
  12. the scrollbars instead of moving the widget).
  13. Please be aware that you need to change your application's code for all
  14. Fl_Scroll-derived widgets, if you used Fl_Scroll::position(int x, int y)
  15. to position <b>the scrollbars</b> (not the widget itself).
  16. The compiler will not detect any errors, because your calls to
  17. \b position(int x, int y) will be calling Fl_Widget::position(int x, int y).
  18. \section migration_1_3_unicode Unicode (UTF-8)
  19. FLTK 1.3 uses Unicode (UTF-8) encoding internally. If you are only using
  20. characters in the ASCII range (32-127), there is a high probability that
  21. you don't need to modify your code. However, if you use international
  22. characters (128-255), encoded as e.g. Windows codepage 1252, ISO-8859-1,
  23. ISO-8859-15 or any other encoding, then you will need to update your character
  24. string constants and widget input data accordingly.
  25. Please refer to the \ref unicode chapter for more details.
  26. \note It is important that, although your software uses only ASCII characters
  27. for input to FLTK widgets, the user may enter non-ASCII characters, and FLTK
  28. will return these characters with UTF-8 encoding to your application, e.g.
  29. via Fl_Input::value(). You \b will need to re-encode them to \b your (non-UTF-8)
  30. encoding, otherwise you might see or print garbage in your data.
  31. \section migration_1_3_int_coords Widget Coordinate Representation
  32. FLTK 1.3 changed all Widget coordinate variables and methods, e.g.
  33. Fl_Widget::x(), Fl_Widget::y(), Fl_Widget::w(), Fl_Widget::h(), from
  34. short (16-bit) to int (32-bit) representation. This should not affect
  35. any existing code, but makes it possible to use bigger scroll areas
  36. (e.g. Fl_Scroll widget).
  37. \htmlonly
  38. <hr>
  39. <table summary="navigation bar" width="100%" border="0">
  40. <tr>
  41. <td width="45%" align="LEFT">
  42. <a class="el" href="migration_1_1.html">
  43. [Prev]
  44. Migrating Code from FLTK 1.0 to 1.1
  45. </a>
  46. </td>
  47. <td width="10%" align="CENTER">
  48. <a class="el" href="index.html">[Index]</a>
  49. </td>
  50. <td width="45%" align="RIGHT">
  51. <a class="el" href="development.html">
  52. Developer Information
  53. [Next]
  54. </a>
  55. </td>
  56. </tr>
  57. </table>
  58. \endhtmlonly
  59. */