Commit Graph

1139 Commits

Author SHA1 Message Date
ManoloFLTK 36cd0a397c New Fl_ICO_Image class to read Windows .ico icon files
Many thanks to @darealshinji for contributing all the code
for this new FLTK image class (see branch Fl_ICO_Image of https://github.com/darealshinji/fltk).
2022-12-09 10:43:20 +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
ian fca63db4ab Minor update to unittest_text to add support for showing the text baseline in testing. 2022-12-07 11:17:55 +00:00
Matthias Melcher 9f92972729
Implement fl_complex_polygon() for OpenGL (#570) 2022-12-05 19:27:12 +01:00
Matthias Melcher bf825f8ebd
Add a unit test for drawing complex shapes (#565) 2022-11-30 22:40:52 +01:00
Matthias Melcher 130a504a39
Add i18n to test/preferences (#555)
To test the output of FLUID code and demonstrate
i18n, preferences emulates GNU gettext.
2022-11-25 16:58:50 +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 624eda17bc Fix whitespace errors and dependencies
(no code changes)
2022-11-16 21:10:14 +01:00
Albrecht Schlosser 8d636d931e Fix Visual Studio compiler warnings 2022-11-11 19:27:00 +01:00
Matthias Melcher e6c3cae6f2 Testing emojis in test/utf8. 2022-11-08 23:55:33 +01:00
Matthias Melcher 51ce2b9235 Removed i18n from test/preferences.fl 2022-11-07 09:36:33 +01:00
Greg Ercolano b663e272e7 Speed up test/table open time
Only showing table's callbacks after table is initialized.
We're only interested in user interaction.
2022-11-06 21:37:50 -08:00
Matthias Melcher c4bb4e192e Fixing _define before _include. 2022-11-06 16:19:53 +01:00
ManoloFLTK 2ffd4e4f1a Replace all calls to sprintf() by calls to snprintf(). 2022-09-26 16:12:18 +02:00
Greg Ercolano 0fd10e9fde Updated fltk logo for docs and help_dialog using logo from the website. 2022-09-23 12:46:35 -07:00
Albrecht Schlosser 64548e2f3a Improve layout, fix resizing of test/demo
Add an invisible box as resizable() to 'demogrp' to avoid bad resizing
behavior while the debug terminal is enabled. The old version would
disable some buttons including the 'exit' button if the window was
resized to a smaller size.

Simplify the popup menu (remove strcmp()).
2022-08-08 17:35:56 +02: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 713d276b1c Fl_Flex: support different margin sizes, improve docs
Support different margin sizes on all four edges. Default margin
  and gap size is now 0 (compatible with Fl_Pack).

Doxygen: move the description from the constructor to the class
  declaration which constitutes a "description".

Make some methods virtual and/or 'const'.

Clarify demo programs, make them even more "FLTK style".
2022-08-07 16:00:41 +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 a2fe4f5910 test/buttons: reorder buttons, remove unnecessary includes
Reorder buttons in the expected <tab> order (left to right, top down),
make window resizable, and remove unnecessary #include statements.
2022-07-27 19:44:37 +02:00
Albrecht Schlosser 6f883d87d7 Add active/inactive button to unittest_schemes.cxx
... to test the deactivated status of integrated widgets.
2022-07-27 19:07:36 +02:00
ManoloFLTK fad867a5d3 Modify test/cairo_test.cxx to show roles of OPTION_CAIRO and OPTION_CAIROEXT.
Also make clear that these options require, for now, Fl_Double_Window to work cross-platform.
2022-04-12 09:20:34 +02:00
Albrecht Schlosser 9e147fe8c0 Fix build of test/unittests with shared libraries
- set variables UNITTEST_LIBS and UNITTEST_LIBS_SHARED appropriately
- use these variables in build instructions

This includes normal and shared builds with and w/o OpenGL.
2022-04-09 17:19:20 +02:00
Albrecht Schlosser 6c07d7b597 Clean up test/.gitignore
- remove no longer used filenames
- reorder to separate generated files from executables
- add comment on how to create list of generated files
2022-04-07 17:56:15 +02:00
ManoloFLTK 61d72c76d2 Restore building when HAVE_GL is 0 2022-03-22 20:43:02 +01:00
Albrecht Schlosser 34b89f8466 MSVC: use fl_snprintf() rather than snprintf()
Note that this fix includes "../src/flstring.h" which makes the source
file no longer compileable without the full source code, e.g. by
using "fltk-config --compile ...". This might be fixed later. (?)
2022-03-21 17:05:32 +01:00
Albrecht Schlosser a773fdc44b Fix whitespace, update dependencies and fluid files 2022-03-03 17:20:24 +01:00
Albrecht Schlosser 7810cda145 Fix Visual Studio build warnings 2022-02-26 18:19:43 +01:00
Albrecht Schlosser 406f2c33f4 Update dependencies 2022-02-21 20:44:04 +01:00
Albrecht Schlosser 570a05a33c Fix compiler warning [-Wunused-but-set-variable] 2022-02-21 16:51:20 +01:00
Albrecht Schlosser fd8170525b Fix typos and copyright 2022-02-19 12:55:06 +01:00
ManoloFLTK 9a326dbe01 Account for presence of terminal panel in the size_range() call. 2022-02-08 18:56:59 +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
ManoloFLTK 2ef4a81d18 Minor improvement in Fl_Mac_App_Menu::custom_application_menu_items(). 2022-02-05 09:01:51 +01:00
Matthias Melcher 303e8de483 More natural shading for Checkers pieces. 2022-01-29 00:25:34 +01:00
Matthias Melcher adfb9d83f6 Checkers pieces scaling. 2022-01-28 14:22:53 +01:00
Matthias Melcher 2dc6010d5a New Checkers pieces created by me from scratch.
Remove possible licensing issues. Added vector file.
2022-01-28 13:45:14 +01:00
Albrecht Schlosser 8e42f772f5 Remove obsolete image file (#31)
The checkers pieces are now maintained as .png images, the original
(Gimp) image is obsolete.
2022-01-28 00:52:11 +01:00
Matthias Melcher cdb51045dd
Background color attribute for Fl_Text_Display. (#378)
* Background color attribute for Fl_Text_Display.

* Adding attributes.

* Avoid clipping horizontal

* Fl_Text_Display underlining.

* Better line positions

* Typos, testing.

* Documentation.
2022-01-27 23:50:06 +01:00
Matthias Melcher 84c0b7495b #31, HiDPI checkers, animation timing 2022-01-26 22:55:22 +01:00
Matthias Melcher 573921677c Removed GL Button from test/cube 2022-01-26 17:40:38 +01:00
Albrecht Schlosser 04ccc8cc46 Remove experimental platforms Android, Pico, SDL (PR #376)
... as discussed in fltk.coredev: "FLTK 1.4.0 release schedule"
https://groups.google.com/g/fltkcoredev/c/PDbHTRpXVh0/m/JqboexZ_AwAJ
2022-01-23 18:12:47 +01:00
Albrecht Schlosser c0f5080cb0 Fix compiler warnings [-Wunused-variable]
... and missing return value [-Wreturn-type]
2022-01-21 13:38:26 +01:00
Matthias Melcher 09eff7243a
Fixing and upgrading Fl_Preferences (#374)
* Added filename function to Fl_Preferences

Static function to get filename before opening.
Member to get filename after opening.
Bug fixes for memory mapped preferences.

* ERROR is a macro on Windows, don't use it

* Added Fl_Preferences::dirty().

User can now check if the database will be written
when flushed or destroyed.
Flush returns a crude error code.

* Fl_Preferences::get binary data returns # of bytes read.

* Verified group deletion code

* Fl_Preferences ignores locale.

This will make .prefs files interchangeable
between different computers.

* Updating the Preferences Mode to ignore locale.

* Fixes in docs.
2022-01-19 16:08:29 +01:00
Albrecht Schlosser 4041608e94 Update fluid files and generated files
fluid/widget_panel.cxx: apply previous fluid fix
2022-01-16 19:47:16 +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
Michael R Sweet ea34edc1ea
Tweak blocks game to use higher update rates and slightly larger window. 2022-01-01 10:01:23 -05:00