This is a big commit and there are too many changes to list them all.
The main changes are:
- rename all CMake build options to 'FLTK_*'
- export library targets with namespace (prefix) 'fltk::'
- standardize shared library target names with suffix '-shared'
- set public build properties on libraries for consumers
- document library names and aliases in README.CMake.txt
- document changes in "Migrating Code from FLTK 1.3 to 1.4"
- partial backwards compatibility for old user projects
Included but not directly related changes:
- fix Windows (Visual Studio) DLL build
- add CMake function fl_debug_target() to show target properties
- don't build test programs if FLTK is a subproject
- internal: reformat CMake code: remove space before '('
Thanks to Matthias and Manolo for their help, testing, and feeback.
Fl_Window_Driver::set_popup_window() is to be used to declare a window should be
positioned relatively to a previously mapped other window. This allows a platform
to process such windows differently from other windows if needed.
Menu and tooltip windows are so declared.
A call to Fl_Window_Driver::set_popup_window() also allows to distinguish a real
menu or tooltip window from a window marked by Fl_Window::set_menu_window()
or by Fl_Window::set_tooltip_window() but that's not a real menu or tooltip.
New member function bool Fl_Screen_Driver::screen_boundaries_known() returns
true by default. A platform where the position of windows inside a screen is hidden
(e.g., Wayland) returns false. This allows FLTK to refrain from trying to make sure
a computed position is inside a screen.
When an Fl_Text_Editor ended up under the mouse, it took
mousewheel events for itself, freezing navigation of a
parent's Fl_Scroll.
Patch handles mousewheel events for both up/down and left/right
by checking:
> If editor has no scrollbar (e.g. no content to scroll to),
then mousewheel events for that scrollbar are ignored
so the parent can be navigated.
> If editor has a scrollbar, it handles wheel events until scroller reaches
an extreme position (e.g. top or bottom), it starts ignoring wheel events
so the parent can be navigated.
Fixes also a similar crash occuring after use of set_tooltip_window().
Two bool member variables are added to class Fl_Window_Driver
to indicate true FLTK menu windows (i.e., created by Fl_Menu_Item::pulldown())
and true FLTK tooltip windows (i.e., Fl_Tooltip).
Member cb of struct wld_buffer is replaced by member frame_cb of struct wld_window.
This allows frame_cb to be used both for non-GL and for top-level GL windows.
Keyboard behavior for button types was not consistent with mouse
click behavior. This change avoids callbacks when pressed radio buttons
are pressed again.
Previous commits introduced too many changes to Fl_Button callbacks,
creating problems in user apps. This is the base for a second much
more specific fix to event flags.
Implement a less strict handling of resizing of a decorated window entirely covered
by a subwindow where throttling of fast resize commands is guided by the
value of the in_use member variable of the window's wld_buffer.