... if _WIN32_IE is not defined. Older MinGW versions would
otherwise not define SHGFP_TYPE_CURRENT which is needed since
commit 5a4e7caa54 that fixes
GitHub issue #710: "Fl_Preferences not stored on Windows 10".
This commit is based on Ian's work as discussed in fltk.coredev, thread
"fltk-1.4 build error in Fl_WinAPI_System_Driver.cxx with 32-bit mingw"
on Apr 20, 2023.
This initialization would prevent changing the 'selectbox' type
automatically when changing the FLTK scheme.
It would also require to set the FLTK scheme *before* the constructor
of Fl_Tree_Prefs (i.e. Fl_Tree) is executed which is unexpected and
error prone for user code.
It is up to the user program to set another boxtype after the
constructor if needed.
Compiler warning: comma at end of enumerator list [-Wpedantic]
Note 1: I decided to fix these warnings although trailing commas in
enums are allowed at least since C++11.
Note 2: I fixed only public headers because these headers may be
compiled in user code. To do: check internal headers.
fltk-config has been extended to allow more than one source file
and additional compiler flags and link libraries. This commit adds
documentation (no functional changes).
- add public getter and setter for
- document the new methods
- document that these methods are not yet used internally
- remove unnecessary friend declaration 'NEEDS_KEYBOARD' flag
- simplify Fl::focus(Fl_Widget *) using the new methods.
This commit fixes two similar warnings:
"cast between incompatible function types from ‘void (*)(Fl_Widget*)’
to ‘void (*)(Fl_Widget*, void*)’ [-Wcast-function-type]"
Unfortunately `execute_process(COMMAND pkg-config ...)` used for
CMake versions lower than 3.4 appends a trailing newline ('\n')
to the output variable which must be removed.
Replace double slash '//' returned by pkg-config with a single '/'
for consistency (applies to all CMake versions).
Tested with CMake 3.2.3 but we should probably raise the minimal
CMake version to a more recent version in the future.
Also refactor, reformat, and simplify code:
- move all variable substitutions to the beginning of the file
- simplify Cairo support and nesting of 'if' clauses
- unify indenting: 4 spaces, no tabs