summaryrefslogtreecommitdiff
path: root/documentation/src/migration_1_5.dox
blob: cbe98919b2733e3f22a0eb54e2d858a371c312d6 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/**

 \page  migration_1_5   Migrating Code from FLTK 1.4 to 1.5

This appendix describes the differences between FLTK
1.4.x and FLTK 1.5.x functions and classes and potential requirements
to change source code. We also explain how code can be made compatible
so it can be compiled by FLTK 1.3.x, 1.4.x, and 1.5.x.

If you need to migrate your code from prior FLTK versions to FLTK 1.4,
please consult the relevant appendices in the FLTK 1.3 online documentation
or by downloading the FLTK 1.3 documentation.
See https://www.fltk.org/doc-1.3/migration_1_3.html and/or
https://www.fltk.org/software.php, respectively.


\section migration_1_5_cmake CMake is required to build FLTK

Building with configure/make and included Makefile's has been discontinued.
Since FLTK 1.5.0 CMake is required to build FLTK. Please see README.CMake.txt
for details.


\section migration_1_5_cxx_standard FLTK requires C++11 or higher

You need a compiler or build system capable of at least C++ standard C++11.
The compiler must be configured to run in C++11 mode or higher.

FLTK sets the required compiler options automatically (via CMake) for its own
build.

If you use "Modern CMake" (basically CMake in CONFIGURE mode) to build your
own projects the appropriate options are inherited from the properties of
the FLTK libraries as well. Otherwise you may need to set the compiler flags
to use at least C++11 yourself.


\section migration_1_5_forms Default for FORMS compatibility is now OFF

If you need (X)Forms compatibility you must set the CMake configure option

    FLTK_BUILD_FORMS:BOOL=ON

manually. In previous versions (up to 1.4.x) the default was 'ON', but since
Forms compatibility is not a primary goal of FLTK this is now optional.


(X)Forms support \b may be removed entirely in a future FLTK release. We
recommend all users to rewrite their code to use "native" FLTK code anyway.



\section migration_1_5_fl_override Simplified FL_OVERRIDE Macro

FLTK 1.4 defined a new macro \p FL_OVERRIDE as "override" if (and only if)
a recent C++ standard (C++11 or higher) was used to compile its code.

Since FLTK 1.5 this macro is unconditionally defined as 'override' because
FLTK requires C++11 anyway.

For more details please see \ref migration_1_4_fl_override.


\section migration_1_5_deprecated Deprecated methods and functions removed

Methods, functions, and global symbols that have been deprecated in FLTK 1.3
or earlier have been removed. If you need help with those functions because
your old code still uses one or more of them, please consult the FLTK 1.3 or
1.4 documentation for how to replace them with newer functions/methods.

The following (very likely incomplete) list may help to identify such removed
methods and functions:

Removed symbol            | Replace with ...
--------------------------|-------------------------
Fl::release()             | Fl::grab(0)



\htmlonly
<hr>
<table summary="navigation bar" width="100%" border="0">
<tr>
  <td width="45%" align="LEFT">
    <a class="el" href="migration_1_4.html">
    [Prev]
    Migrating Code from FLTK 1.3 to 1.4
    </a>
  </td>
  <td width="10%" align="CENTER">
    <a class="el" href="index.html">[Index]</a>
  </td>
  <td width="45%" align="RIGHT">
    <a class="el" href="license.html">
    Software License
    [Next]
    </a>
  </td>
</tr>
</table>
\endhtmlonly

*/