Commit Graph

107 Commits

Author SHA1 Message Date
Albrecht Schlosser 5175192755 CMake: build shared libs with OPTION_CAIROEXT (issue #250)
- remove separate libfltk_cairo to avoid cyclic dependencies, but
- keep a dummy libfltk_cairo in 1.4.0 for backwards compatibility
- move cairo/Fl_Cairo.cxx to src/Fl_Cairo.cxx
- add preliminary Cairo support for Visual Studio (MSVC)

Static linking is not affected by this change, but users building
with hand-made Makefiles will have to remove libfltk_cairo starting
with FLTK 1.4.0. The dummy library can be linked for backwards
compatibility but it will be removed later (in 1.4.x or 1.5.0).

The shared FLTK library libfltk.{so|dylib|dll|..} depends on libcairo
if and only if FLTK is built with one of the Cairo options. This has
always been the case for OPTION_CAIROEXT but is now also true if only
OPTION_CAIRO is selected, i.e. FLTK programs linked with a Cairo
enabled shared FLTK library will also be linked with libcairo. The same
is true for configure options --enable-cairo and --enable-cairoext,
respectively.

Preliminary Cairo support for MSVC now detects a Cairo installation
using the CMake variable FLTK_CAIRO_DIR which must be set by the user.
Note that this feature is temporary and may be changed in the future
for a better and more comfortable version.
2023-03-09 17:34:05 +01:00
Albrecht Schlosser 4e75549e7b Update dependencies and fix whitespace errors
- replace tabs with spaces
- remove trailing whitespace
2023-02-02 17:09:14 +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 64d8c913be Fix trailing whitespace and dependencies 2022-12-13 15:58:56 +01:00
Albrecht Schlosser 823dc5acc4 Fix compilation warning, update dependencies
Warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
2022-12-08 19:09:18 +01:00
Albrecht Schlosser 624eda17bc Fix whitespace errors and dependencies
(no code changes)
2022-11-16 21:10:14 +01:00
Albrecht Schlosser a5b9cc888b Add option to test Fl_Flex in test/pack.cxx
This new feature demonstrates that Fl_Flex can be used (almost) as
a drop-in replacement of Fl_Pack.

Add missing file to examples/.gitignore.
2022-08-08 11:07:40 +02:00
Albrecht Schlosser f37aca15e9 Add Fl_Flex widget from Karsten Pedersen (issue #255)
This work is based on the repository and latest commit:
  https://github.com/osen/FL_Flex.git

  commit 36e4ed75a00daac825b87e81295818b4650991f5
  Author: Karsten Pedersen <...>
  Date:   Fri Apr 23 12:06:16 2021 +0000

    Added Fltk (LGPL) license.

This widget is similar to Fl_Pack and supports either one row or one
column of widgets but has some more features. Test and demo programs
are included:

  test/flex_login.cxx: simple "login window" demo program
  test/flex_demo.cxx:  slightly more complex demo program

The original demo programs can still be compiled and built with
the new widget provided you '#include <FL/Fl_Flex.H>'.
Backwards compatible methods are included (except debug()).

The original widget has been modified to match FLTK standards and
enhanced in several ways, including:

- support box frames
- add HORIZONTAL and VERTICAL enum values (as in Fl_Pack)
- add horizontal() method (as in Fl_Pack)
- use type() rather than internal 'direction' variable
- add standard widget constructor (x, y, w, h, label)
- add margin and gap accessors rather than hard coding constants
- improve test and demo programs
- add documentation
- replace <vector> with array as required by FLTK CMP
- rename camelCase method names, keeping old names for compatibility:
  - change 'setSize(Fl_Widget*, int)'   to 'set_size(Fl_Widget*, int)'
  - change 'bool isSetSize(Fl_Widget*)' to 'int set_size(Fl_Widget*)'
- remove debug() method
- add a way to "unset" fixed size: set_size(Fl_Widget *, 0)
- add layout() method to force recalculation of children
- unify resizeRow() and resizeCol() methods to avoid code duplication
- improve widget size calculation.
2022-08-01 15:33:20 +02:00
Albrecht Schlosser 15bbfeb975 Configure/make: update dependencies 2022-07-27 19:45:08 +02:00
Albrecht Schlosser 406f2c33f4 Update dependencies 2022-02-21 20:44:04 +01:00
Matthias Melcher db0a1f4bae
OpenGL implementation of all `fl_` "Drawing Fast Shapes" graphics calls (#385)
* Fix build system for unites,

* Updated unittest to check OpenGL drawing.

Making sure that OpenGL drawing is exactly the same
as native drawing to make FLTK widget rendering
look the same in GL windows.

* Make OpenGL optional.

* Implemented clipping in OpenGL

* unites drawing fast shapes

* Fixed CMake

* Updating unittest.

Added tests for fl_pi and fl_arc (int)
Renamed tab to render complex shapes.

* Improved OpenGL FLTK drawing emulation.

* Fixed GTK ROUND DOWN BOX

* Fixing Makefile for unittest

* Correctly aligning OpenGL text.

* Fixed text alignment in GL windows.

Explained the "FLTK over GL " example in Cube.

* Overlapping test.

* Better GL graphics alignment.

* Drawing the focus rect.

* Adding Alpha Channel support for GL.

* Added FLTK-on-GL documentation.
2022-02-06 15:22:24 +01:00
Albrecht Schlosser 788ca208f7 Rename FL/Fl_String_class.H to FL/Fl_String.H
This is part 2 of the final fix for a previous name clash on case
insensitive file systems (fl_string.h vs. Fl_String.H).
2022-01-16 19:47:16 +01:00
Albrecht Schlosser 92e9181a0a Rename FL/fl_string.h to FL/fl_string_functions.h
This is part 1 of the final fix for a previous name clash on case
insensitive file systems (fl_string.h vs. Fl_String.H).
2022-01-16 19:47:16 +01:00
Albrecht Schlosser 9d474dfcdf Fix whitespace and Makefile dependencies
No code changes
2022-01-05 22:00:54 +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 7a7e50df6e Rename FL/Fl_String.H to FL/Fl_String_class.H
The previous name existed already with different case (fl_string.h)
in the FL folder which broke the build on macOS and Windows.

This may be a temporary fix - until I find a better way.
2021-12-04 15:34:41 +01:00
Albrecht Schlosser b6de09cff2 Re-enable nested (aka recursive) common dialogs (STR 3242, #282)
Apply Fl_Dialog_r10831.patch as given in STR 3242:
https://www.fltk.org/strfiles/3242/Fl_Dialog_r10831.patch

Reformat, add missing pieces, rename private members, cleanup...

Improve documentation, add fl_choice_n() (issue #282)

New methods fl_input_str() and fl_password_str() return Fl_String
2021-12-04 14:49:27 +01:00
Albrecht Schlosser ca89f48c0b Add "Save PNG" feature to clipboard viewer demo 2021-11-18 14:20:24 +01:00
Albrecht Schlosser 0bc06e8f1a Reformat and move clipboard demo from examples to test folder
The clipboard demo is more a test program than an example and very
useful even if the examples are not built.

Also update dependencies.
2021-11-18 13:44:41 +01:00
Albrecht Schlosser ff4288fc2b Add new resize examples to Makefile, update dependencies 2021-11-08 17:48:57 +01:00
Duncan Gibson 7407d9c8d0 Add new resize example to test and dox (PR #165)
add example(s) showing Albrecht's innovative overlap resizable
technique to the "How does resizing work?" documentation and tests

See "resizable question" original discussion thread under:
https://www.fltk.org/newsgroups.php?gfltk.general+v:39635
2021-11-08 16:18:58 +01:00
Albrecht Schlosser 14f842708d Fix indenting, whitespace errors and dependencies
(no code changes)
2021-10-27 20:52:08 +02:00
Albrecht Schlosser 64296707d9 Include bitmap files rather than copying the source code
There's no need to blow up the source file by including the bitmap
file literally in the source code. Use '#include' instead.

Another benefit is that the original source file is referenced in
the source code so it is not accidentally removed.
2021-05-08 15:23:17 +02:00
Albrecht Schlosser 2f73df4f3e Rename 'srs.xbm' to its original name 'sorceress.xbm' 2021-05-08 15:21:23 +02:00
Albrecht Schlosser 206675a3b1 Fix examples build (configure/make)
Fix more issues caused by moving fltk-versions from examples to test
and adding examples to the CMake build process (gitlab-ci)
2020-08-21 20:00:00 +02:00
Albrecht Schlosser 4d0b04456e Update dependencies + fluid/generated files 2020-08-03 13:03:14 +02:00
ManoloFLTK 8d4b0c15f7 Move class Fl_SVG_File_Surface from libfltk to libfltk_images.
File examples/SVG_File_Surface.cxx is no longer useful because it was a very
partial implementation of what is now class Fl_SVG_File_Surface.
2020-06-29 11:36:09 +02:00
Albrecht Schlosser 1078b8fe43 Update dependencies
Change sort order using -f (--ignore-case):
  fold lower case to upper case characters
2020-06-13 12:50:06 +02:00
Albrecht Schlosser c1b2e030c5 Update dependencies and .gitignore 2020-04-28 21:20:01 +02:00
Albrecht Schlosser 8c4930a7d7 Upgrade bundled libpng from 1.6.16 to 1.6.37
Release: 1.6.37 - April 14, 2019

For further details see README.bundled-libs.txt.
2020-01-09 19:26:29 +01:00
Albrecht Schlosser 97e30260ec Update dependencies and .gitignore 2020-01-04 01:54:30 +01:00
Albrecht Schlosser 44b2b7126c Update dependency system
Try to make `make depend' independent of locale.
2019-06-22 23:42:39 +02:00
Greg Ercolano 446c707771 Additional Makefile rules and source files for issue #29.
This adds source png and xcf files for checkers pieces.
Also adds Makefile rules using xxd to convert .png -> .h as requested by Albrecht
in issue #29, (hmm, no comment numbers github?)..message dated "June 22nd 2019 4:22am PDT".
2019-06-22 09:18:37 -07:00
Albrecht Schlosser debc1a39ce Update dependencies 2019-03-25 13:16:05 +01:00
Albrecht Schlosser bb91970122 Update dependencies (now sorted)
The main dependencies (makedepend files) are now sorted alphabetically
with one dependency per line.
2019-01-18 16:27:32 +01:00
Albrecht Schlosser 9177c6e4cc Fix dependencies (STR 3506)
test/fracviewer.cxx wouldn't be compiled if the ABI version was
changed with configure and `make' was executed w/o `make clean'.
Add 'fracviewer.cxx' to list of source files to fix this.

Also add missing unittest_scrollbarsize.cxx to dependencies of
unittests.o.

Finally run `makedepend' to update dependencies.

Note: cherry-picked from branch-1.3 and adjusted to fit master (1.4)
2019-01-18 14:09:44 +01:00
Albrecht Schlosser d490abdce3 Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12987 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-27 20:44:46 +00:00
Albrecht Schlosser efc3ec1b7b Remove unnecessary dependency on FL/Fl_Rect.H.
Fl_Rect.H is no longer included by Fl_Group.H to avoid unnecessary
dependencies on Fl_Rect.H. Currently it is only needed to access the
array returned by the protected method bounds().

Also clarified documentation.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12827 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12 12:58:10 +00:00
Albrecht Schlosser 5e98a9e292 Remove unused variable, update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12826 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-10 21:10:53 +00:00
Albrecht Schlosser 42d8aba117 Replace FL/x.H with FL/platform.H - step 2 (STR #3435).
This second step replaces FL/x.H with FL/platform.H in all source files.
Dependencies have been adjusted as well.

This commit completes the replacement of FL/x.H with FL/platform.H.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31 21:17:17 +00:00
Albrecht Schlosser cc595ce4ed Replace FL/x.H with FL/platform.H - step 1.
This first step replaces FL/x.H with FL/platform.H but keeps a small
FL/x.H that #include's FL/platform.H for backwards compatibility.
Documentation sources in documentation/src/*.dox have been fixed,
but references in other source files need to be fixed in another step.
Dependencies have been adjusted.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12640 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31 17:46:48 +00:00
Albrecht Schlosser aff3a0ac12 Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12493 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-13 15:00:06 +00:00
Albrecht Schlosser 3a5e2f074b Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-18 15:18:46 +00:00
Albrecht Schlosser d9460d787b Update dependencies (makedepend).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12303 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07 19:42:12 +00:00
Albrecht Schlosser 680631b834 Fix dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-19 10:53:04 +00:00
Albrecht Schlosser 26601983c6 Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11957 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-20 13:35:44 +00:00
Albrecht Schlosser 3d28ff46fb Update dependencies.
Note: the manually edited dep's have not been updated.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11385 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-19 22:23:34 +00:00
Albrecht Schlosser 425867ad2a Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11238 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-27 01:26:10 +00:00
Albrecht Schlosser e1f5f5f7ec Update dependencies.
Note: we should really get rid of that!


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11219 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-26 11:17:48 +00:00
Albrecht Schlosser 01cbcc8406 Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10811 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-22 23:20:47 +00:00