Commit Graph

17 Commits

Author SHA1 Message Date
Albrecht Schlosser efe3ea7115 Add Fl_Grid based dialog demo program
This is a new test program for Fl_Grid based layout and a proof of
concept for a future dialog class based on Fl_Grid.
2023-11-18 18:37:55 +01:00
erco77 6842a43a31
Fl_Terminal widget (#800)
Pull Fl_Terminal widget from Greg's fork
2023-11-14 07:01:52 -08:00
Albrecht Schlosser 38871c5b31 Add Fl_Grid widget and test and demo programs
- FL/Fl_Grid.H: header file
- src/Fl_Grid.cxx: implementation

- examples/grid-simple.cxx: simple example program
- test/cube.cxx:            use Fl_Grid for layout
- test/grid_alignment.cxx:  test cell alignment and other functions
- test/grid_buttons.cxx:    demo program as discussed in fltk.general
- test/grid_login.cxx:      like test/flex_login.cxx but with Fl_Grid
- test/flex_login.cxx:      modified to match test/grid_login.cxx
2023-10-16 22:18:24 +02:00
Albrecht Schlosser 7e71cea54a Update .gitignore files
Add missing executables
2023-10-16 21:10:27 +02: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 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 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
engelsman 2d18c6f650
Documentation on widget coordinates and layout, plus new test programs (#304)
Add coordinates and layout section to user manual

add section to user manual to clarify the use of window-relative
coordinates in both Fl_Group and Fl_Window containers, and include
brief descriptions of current layout manager widgets in one place.

add test/coordinates.cxx, test/wizard.cxx and related screenshots
under documentation/src.

update CMakeLists.txt, Makefile and .gitignore for new files.

Co-authored-by: Albrecht Schlosser <albrechts.fltk@online.de>
2021-12-08 15:00:33 +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 5e7eede311 Add missing files (executables) to .gitignore files 2021-11-08 19:44:40 +01:00
Albrecht Schlosser 773467dee4 Refactor macOS bundle generation to avoid "quarantine"
macOS Big Sur 11.3 introduced a new "security feature" such that
app bundles created from existing bundle templates in downloaded
files (tar distibutions, expanded) could no longer be executed
without unsetting the "quarantine" attribute. This commit fixes
this by creating all bundles from scratch.

Known *workaround* for older tarballs and snapshots:

  $ xattr -d -r com.apple.quarantine xxx.app
2021-05-13 16:18:13 +02:00
Albrecht Schlosser 37175d1757 macOS: add resize-example apps to .gitignore 2021-03-01 14:53:11 +01:00
Albrecht Schlosser 135b8b9c86 Update dependencies 2021-02-18 12:55:51 +01: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 118c67c804 Git-ignore resize-example* test programs 2020-07-23 12:46:02 +02:00
Albrecht Schlosser c1b2e030c5 Update dependencies and .gitignore 2020-04-28 21:20:01 +02:00
Albrecht Schlosser 811033af19 Reorganize .gitignore file(s)
Move ignored files in /examples/ and /test/ to their own folders,
i.e. to examples/.gitignore and test/.gitignore, resp.
2020-04-20 14:25:08 +02:00