This work is based on PR 1068 (patch by @CendioHalim) and
extended to store button status (4,5) in Fl::event_state() like
it's done for other mouse buttons (1-3).
Changes:
- new symbol: FL_BUTTON4 = side button 1 = "back"
- new symbol: FL_BUTTON5 = side button 2 = "forward"
- modified : FL_BUTTONS now includes bits for two side buttons
Note: the status of these new buttons is not maintained by X11,
therefore we need to maintain them in internal variables for
this platform.
Language wrappers can have major issues with FLTK auto deleting
all children of a group if a group is deleted. This event gives individual
widget the opportunity to override auto delete.
- Restrict FL_BUTTONS mask to only three valic mouse buttons.
Pseudo mouse buttons 4-7 are used for FL_MOUSEWHEEL events and
are no longer reflected in Fl::event_buttons().
- Return only state of mouse buttons 1-3 in Fl::event_buttons().
Buttons 4-7 are not "sticky" (used for FL_MOUSEWHEEL).
- Keep undefined keyboard related bits in Fl::event_state() for
backwards compatibility and transparency. These bits may be masked
out in a later release.
- Document Fl::event_state() bits for X11 in src/Fl_x.cxx.
Note: this is a bug fix for X11 only, Wayland and other platforms are
not affected.
- swap 3rd and 4th parameter of fl_contrast()
- change 'Fl_Fontsize fs' to a neutral 'int size' parameter
- clarify documentation of fl_contrast_level() and that different
contrast algorithms use different level values
- clarify that level 39 for the CIELAB mode results in "sufficient"
contrast, i.e. /readable/ text which is the only intention of
fl_contrast().
Reasoning: swapping the arguments looks more natural, i.e. the context
before another argument (size) is what one would usually expect. Since
the 'size' argument doesn't have be a font size, making it a simple
'int size' is more flexible and correct for future extensions.
Tabs were drawn incorrectly when children's box was not FL_NO_BOX
Current solution is cleaned up and always redraws tabs area
without leaving breadcrumbs behind
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.
Add close buttons for Fl_Tabs
Introducing callback reasons
FLUID shows all FL_WHEN_... options
Adding Fl_Tabs overflow types
Improved test/tabs to show new features
- Add internal fl_contrast_cielab() as the new default.
- Keep old function as internal fl_contrast_legacy().
- Add fl_contrast_mode() to switch between fl_contrast() functions.
- Add fl_contrast_level() to fine tune fl_contrast() per mode.
- Add option to register and use a custom contrast function.
- Add test/contrast.cxx test program.
- Move all fl_contrast() related code to a new file src/fl_contrast.cxx.
- Add fl_lightness() convenience function for perceived lightness.
- Add fl_luminance() convenience function for physical luminance.
"Arrows" in widgets are those GUI elements mostly represented by
triangles pointing in a particular direction as in scrollbars,
choice widgets, some menus, valuators and Fl_Counter widgets.
The code has been simplified and standardized such that all these
GUI elements are drawn identically per FLTK scheme.
Widget authors no longer need to write code to calculate arrow sizes
and draw polygons etc.
Different schemes can and do implement different drawing functions.
Todo: see comments "FIXME_ARROW" in src/Fl_Menu_Button.cxx and
src/Fl_Menu.cxx
* Provide a link to the "FLTK standard box types" image
The doc for Box Types has the text "see figure 1" which does not exist! [It is figure 5.3 in PDF, no number in HTML].
This change provides a hyperlink which allows the reader to actually navigate to the cited figure.
Confirmed to work as desired in HTML; I don't have LATEX so cannot confirm the PDF.
* Add figure title "Standard Box Types" (#397)
Co-authored-by: Albrecht Schlosser <albrechts.fltk@online.de>
... as discussed in fltk.coredev in thread "RFC: introduce public
config header <FL/fl_config.h>", see:
https://groups.google.com/g/fltkcoredev/c/xLCs1AIXMVo/m/MHZpQggzAQAJ
- Rename abi-version.h to fl_config.h, rename input files,
update dependencies, .gitignore, CMake, configure and Makefiles.
- Include Cairo options in FL/fl_config.h
- Rename FLTK_USE_CAIRO to FLTK_HAVE_CAIROEXT for consistency.
- Include <FL/fl_config.h> in config.h and wherever necessary,
fix include order (move FL/Fl.H to the top) and more.
- Move USE_X11 to fl_config.h and rename to FLTK_USE_X11
- Do not include <config.h> in Cairo demo program which is no
longer required in Cairo programs since FLTK 1.4.0
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files
The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
The FLTK 1.0 compatibility support by defining macro 'FLTK_1_0_COMPAT'
did no longer work since FLTK 1.3.x and nobody complained. Hence we
can safely remove this "feature".
Documentation changes:
- Drop chapter 'Migrating Code from FLTK 1.0 to 1.1'
- Drop chapter 'Migrating Code from FLTK 1.1 to 1.3'
- Add chapter 'Migrating Code from FLTK 1.3 to 1.4'
The removed chapters are still available in FLTK 1.3 docs.
Also, define an FLTK event triggered when the scaling is changed and an option
to disable the transient window showing the new scaling factor.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13011 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Fl_Boxtype enum values with leading underscore are reserved and should
not be used. Use the name w/o leading underscore instead.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12633 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Removed obsolete '\todo' item from docs (done with recent commits).
Removed redundant code from label assignment (e.g. use FL_IMAGE_LABEL
instead of label type assignment + use of _FL_IMAGE_LABEL).
See recent commits.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12448 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Some labeltypes and boxtypes were missing a #define for the enum
without a leading underscore and the corresponding setup function
to initialize the internal table of boxtypes and labeltypes, for
instance _FL_MULTI_LABEL. This is now fixed so (hopefully) all boxtypes
and labeltypes can and _should_ be used w/o leading underscore.
Note: if there are still boxtypes or labeltypes that can't be used w/o
leading underscore this should be considered a bug and is to be fixed ASAP.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12443 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Make clear that some alignment bit combinations are "illegal" and yield
undefined behavior that can be changed without notice.
Fix label alignment in some border cases where illegal bit combinations like
FL_ALIGN_LEFT and FL_ALIGN_RIGHT or FL_ALIGN_TOP and FL_ALIGN_BOTTOM are
both set, respectively.
Todo: There appears to be inconsistent handling WRT these "illegal" cases,
for instance with inside labels as opposed to outside labels, such that
the behavior seems to be unpredictable. See test/label.cxx.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12181 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
FLTK_ABI_VERSION has been renamed to FL_ABI_VERSION in FLTK 1.4.0.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12121 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Searching for __APPLE, WIN32 or X11 did give me many false results. I instead marked most ifdef's that I would like to get rid of with the text // PORTME:, so they can be easily found by a global search.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11155 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
On the X11/MSWindows platforms, this requires external installation of the GLEW library.
This fixes STR#3198 and STR#3257.
Added two new examples programs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10876 ea41ed52-d2ee-0310-a9c1-e6b18d33e121