Commit Graph

166 Commits

Author SHA1 Message Date
Matthias Melcher 8826dca106
Add close buttons for individual tabs in Fl_Tabs (#628)
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
2023-01-05 13:51:30 +01:00
Albrecht Schlosser 78cf29ba29 Improve and extend fl_contrast() (#370)
- 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.
2022-12-28 18:16:23 +01:00
Albrecht Schlosser b1ba37c5ba Add "Oxy" scheme (STR 2675, STR 3477)
This commit is similar to the patch given in STR 3477, oxy_v5.diff:
https://www.fltk.org/strfiles/3477/oxy_v5.diff

... with modifications, and updated to current FLTK code.
2022-11-25 00:00:48 +01:00
Albrecht Schlosser ecc47d0cc3 Refactor and simplify "arrow drawing" in widgets
"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
2022-11-22 19:32:54 +01:00
ManoloFLTK add3f0566c Add Doxygen description of FL_FREE_COLOR. 2022-09-18 11:57:15 +02:00
Kevin Routley 2de8f8579c
DOC: Provide a link to the "FLTK Standard Box Types" image (#397)
* 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>
2022-02-21 16:42:08 +01:00
Albrecht Schlosser 5438954d8c Generate FL/fl_config.h rather than FL/abi-version.h
... 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
2021-12-18 22:44:08 +01:00
Albrecht Schlosser d7af409f42 Remove "Figure x.y: " from html image captions
... as discussed in fltk.coredev for easier maintenance.

Also edit some minor issues.
2021-01-13 22:52:33 +01:00
Albrecht Schlosser a4f6badfcd Improve 'Fl_When' enum documentation 2020-08-24 15:14:48 +02:00
Albrecht Schlosser f09e17c3c5 Remove $Id$ tags, update URL's, and more
- 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.
2020-07-06 20:28:20 +02:00
Albrecht Schlosser 3f1f871585 Drop 1.0 compatibility; document 1.4 migration
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.
2020-01-08 18:41:50 +01:00
Albrecht Schlosser 86b0756e15 Update dependencies and fluid files, fix typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13036 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-30 10:41:16 +00:00
Manolo Gouy b3b29632fb Doc only: better doc of recently added events: FL_SCREEN_CONFIGURATION_CHANGED, FL_FULLSCREEN,...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-30 08:31:53 +00:00
Manolo Gouy cd399d9898 Support for GUI scaling: add API to get/set the scaling factor value.
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
2018-08-08 20:08:10 +00:00
Matthias Melcher 7b3e9347ba Android: move Android specific platform events to FL/android.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12724 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-09 21:21:23 +00:00
Matthias Melcher 626ecbfca0 Android: specific event for Android. Use Fl::add_system_handler() and Fl::event(), for example: FL_ANDROID_EVENT_LOW_MEMORY
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12720 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-07 23:01:50 +00:00
Albrecht Schlosser fbcd3a908a Clarify documentation of Fl_Boxtype.
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
2018-01-15 15:02:13 +00:00
Albrecht Schlosser 900314d4f4 Documentation and copyright updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12450 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-09-12 15:26:36 +00:00
Albrecht Schlosser a6803d71c6 Remove leading underscore from labeltyps as far as possible.
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
2017-09-12 13:05:48 +00:00
Albrecht Schlosser 322208b855 Add missing Fl_Labeltype and Fl_Boxtype definitions.
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
2017-09-11 18:54:10 +00:00
Albrecht Schlosser a804cbf366 Label alignment documentation clarifications.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12182 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-05 11:27:30 +00:00
Albrecht Schlosser a60f99d4a1 Improve label alignment docs and border case implementations.
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
2017-02-27 17:00:41 +00:00
Albrecht Schlosser 6d4b93e9c7 Finally remove FLTK_ABI_VERSION preprocessor macro from code.
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
2016-11-19 01:20:53 +00:00
Albrecht Schlosser d0fa58f700 Clarification and better documentation of ABI version configuration.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11804 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-09 18:47:06 +00:00
Manolo Gouy 562d29bd7c Remove platform-dependent code from Enumerations.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11596 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-13 10:48:14 +00:00
Matthias Melcher 50ee3bcd66 Mark places that need to be refactored with // PORTME:
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
2016-02-11 12:02:36 +00:00
Albrecht Schlosser 00dd296ff2 Bump version numbers for next minor release: FLTK 1.4.0.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11088 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-30 00:56:42 +00:00
Matthias Melcher acf6c881d3 Updated platform specific #if's to report unimplemented code when compiling with FL_PORTING defined and WIN32 and __APPLE__ undefined>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-03 22:54:29 +00:00
Manolo Gouy 7e025aac22 Added support for OpenGL V3 and higher.
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
2015-10-27 08:40:56 +00:00
Albrecht Schlosser bb3f67ecf7 Avoid strange warnings/error messages from 'make depend'.
Warning was for instance:
"../FL/Fl_Spinner.H":53:  FLTK_ABI_VERSION >= 10301^--- expecting )

Maybe a g++ bug ?


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10839 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-24 15:47:08 +00:00
Albrecht Schlosser 9adb181156 Make FL_ABI_VERSION configurable (STR #3161).
This commit adds the configure option --with-abiversion and the CMake option
OPTION_ABI_VERSION. Both options can be set e.g. to 10304 to build with
FL_ABI_VERSION = 10304 (FLTK 1.3.4).

For IDE builds there are new files ide/<IDE-NAME>/FL/abi-version.h that
can be edited to change the ABI version before the FLTK lib is built.
Note that this file MUST be copied to the include/FL directory if the
IDE-built library is to be installed.

The default is FL_ABI_VERSION = FL_MAJOR*10000 + FL_MINOR*100 + 0, i.e.
10300 for all FLTK 1.3.x versions to keep binary compatibility (ABI).

Todo: more tests and more documentation.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10786 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-12 19:23:55 +00:00
Albrecht Schlosser 94ddbc1995 Add FL_ABI_VERSION, FL_API_VERSION, Fl::abi_version(), and Fl::api_version().
The new constants are the API and ABI versions in int format, resp.
The new static methods return the compiled-in API and ABI versions, resp.

FLTK_ABI_VERSION is deprecated, but still defined (same as FL_ABI_VERSION).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10673 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-04 15:36:04 +00:00
Matthias Melcher d44b518c07 Added FL_ZOOM_GESTURE gesture for OS X.
Sadly, I have not commited any code in years, and despite the rumour that
I was hit by a train, or worse, move on to Qt, here I am, commmiting unwanted
code. Hopefully there are equivalents for this on other platforms?!


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10656 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-01 15:32:06 +00:00
Albrecht Schlosser 0f45a7adf5 [Version 1.3.4] Update version numbers - hopefully complete.
Note to devs: if I missed something, please mark follow-up commits with
[Version 1.3.4] so we can find the necessary commits for version updates.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10612 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-03-10 01:41:55 +00:00
Albrecht Schlosser c96a330e26 Fix documentation errors and clarify label alignment docs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10606 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-03-05 12:42:29 +00:00
Ian MacArthur e402a64457 Add some doxygen descriptions for the (previously undocumented) Fl_Multi_Label struct, and make some minor related adjustments to the docs for Fl_Label and Fl_Labeltype.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10553 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-04 13:12:43 +00:00
Albrecht Schlosser f5e9bf5087 Fix comments, trailing white space, and trailing commas in comments.
Note: there are no code changes in this commit.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10538 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-29 13:14:59 +00:00
Greg Ercolano 8862df4950 Added docs to Fl_Event referencing use of fl_eventnames[] and FL/names.h
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10506 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-28 21:09:30 +00:00
Greg Ercolano cdee5e204f Fixes STR #3169, comment #3.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10492 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-19 03:41:45 +00:00
Ian MacArthur 5403c17606 Sorry, I'm an idiot, I commited form the wrong tree,
and commited my non-default Enumerations.h header...




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10382 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-15 21:00:20 +00:00
Ian MacArthur f344e4a459 Adjust fluid/file.cxx so that it builds again on OSX.
I don't think this change will prevent the prior "fix"
workaround that Albrecht made from working on cygwin...

Probably!



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10381 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-15 20:51:39 +00:00
Albrecht Schlosser f1bf759c64 Remove extraneous comma from enum, fix compiler warning.
Thanks to Michael Baeuerle.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10376 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-14 09:53:01 +00:00
Manolo Gouy 8994406424 Updated three more copyright years.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10355 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-05 06:32:43 +00:00
Albrecht Schlosser aef482198e Bump version numbers to 1.3.3.
All fluid .fl files have been rewritten with fluid 1.3.3 and may differ
somehow, but there are no significant changes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10353 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-05 00:03:27 +00:00
Pierre Ossman 332dc1b7ac Add method to set any custom cursor, based on a Fl_RGB_Image object.
Also change our fallback cursors to use this method, so that fallback
cursors are handled in a platform independent manner. STR #2660.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-06-16 11:17:57 +00:00
Greg Ercolano c5d5ba1cf5 Applying the etorres gleam patch. STR #2672.
TODO: Xcode 4 ide needs fl_gleam.cxx added
      Test of Visual Studio IDE mods (which were hand-modified)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10113 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-02-25 04:24:41 +00:00
Greg Ercolano ba0c61b961 Small color documentation clarification/improvements:
o Added some references to the FLTK colormap diagram in obvious places (Fl_Color docs)
    o Added info regarding the 'reserved' colors
    o Added quotes to clarify RGBI description: "RGB" and "I"



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9856 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-02 16:47:57 +00:00
Manolo Gouy d879e4b2e8 Added support for JIS (Japanese) keyboards under Mac OS X.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-26 19:44:56 +00:00
Manolo Gouy 6432f87743 Set to version 1.3.2
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9742 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-09 18:45:57 +00:00
Matthias Melcher 8701434312 Upgrade version number to 1.3.1
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9707 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-06 21:13:54 +00:00