summaryrefslogtreecommitdiff
path: root/documentation/migration.html
blob: 060fe7f139ab9edd7fe52f69cb04693aa24e49cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<HTML>
<BODY>

<H1 ALIGN="RIGHT">G - Migrating Code from FLTK 1.0.x</H1>

<P>This appendix describes the differences between the FLTK
1.0.x and FLTK 1.1.x functions and classes.</P>

<H2>Color Values</H2>

<P>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.

<H2>Cut and Paste Support</H2>

<P>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.

<H2>File Chooser</H2>

<P>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 <TT>FCB</TT> class or members will need
to be ported to the new <A
HREF="Fl_File_Chooser.html"><TT>Fl_File_Chooser</TT></A>
class.</P>

<H2>Image Support</H2>

<P>Image support in FLTK has been significantly revamped in
1.1.x. The <A HREF="Fl_Image.html"><TT>Fl_Image</TT></A> class
is now a proper base class, with the core image drawing
functionality in the <A
HREF="Fl_Bitmap.html"><TT>Fl_Bitmap</TT></A>, <A
HREF="Fl_Pixmap.html"><TT>Fl_Pixmap</TT>, and <A
HREF="Fl_RGB_Image.html"><TT>Fl_RGB_Image</TT></A> classes.

<P>BMP, GIF, JPEG, PNG, XBM, and XPM image files can now be
loaded using the appropriate image classes, and the <A
HREF="Fl_Shared_Image.html"><TT>Fl_Shared_Image</TT></A> class
can be used to cache images in memory.

<P>Image labels are no longer provided as an add-on label type.
If you use the old <TT>label()</TT> methods on an image, the
widget's <TT>image()</TT> method is called to set the image
as the label.

</BODY>
</HTML>