Commit Graph

9858 Commits

Author SHA1 Message Date
ManoloFLTK
d23963af60 Remove useless Fl_Wayland_Window_Driver::show_with_args_begin/end(). 2022-08-15 19:23:57 +02:00
ManoloFLTK
82fa5ea19c Fix Fl_Wayland_Window_Driver::decoration_sizes(). 2022-08-15 18:40:11 +02:00
ManoloFLTK
d325fa504e Replace call to CreateFont() by call to CreateFontW(). 2022-08-13 12:25:04 +02:00
ManoloFLTK
d1d3cc9afa Add virtual Fl_Cairo_Graphics_Driver::cache_size() member function. 2022-08-12 19:47:04 +02:00
Albrecht Schlosser
ab61c03433 Improve automatic documentation generation
This removes the need to edit the copyright year before generating
  the documentation (every year, in several files) and adds some
  technical information (doxygen generation date, doxygen version,
  and FLTK Git revision) in both HTML and PDF docs.

- auto-generate copyright year (current year) used in several places
- include FLTK Git revision in HTML and PDF docs
- include generation date and doxygen version
- replace special html footer which didn't work well with default footer
2022-08-12 17:49:53 +02:00
ManoloFLTK
b8c227a8f2 Fix Fl_Xlib_Graphics_Driver for drawing tiled images.
Conflicting demands arise in the implementation of class Fl_Xlib_Graphics_Driver
for drawing images with the XRender library :

1) Issue #163 leads to use a bilinear filter to draw-and-scale images.
2) This tends to blur the edges of drawn areas which is bad for tiled images
(that is because the edges get alpha values, even for an opaque source image).

This commit resolves the conflict adding a means to detect whether the library
is busy drawing a tiled image. If so, the bilinear filter is not applied, drawn areas
don't  have blurred edges, resulting in a nice tiling.

With this commit, these test apps perform correctly:
- tiled_image is correct at all scaling factor values also when modified
to use a depth-3 or a depth-4 Fl_RGB_Image as tile;
- unittests - Drawing Images is correct at all scaling factor values;
- pixmap_browser scales correctly up and down JPEG and PNG images.
2022-08-10 10:53:29 +02:00
Albrecht Schlosser
7d7784d140 GitLab CI/CD: generate pdf documentation
Remove build artifacts from normal builds (libs and executables).
  These were never meant to be provided but forgotten to remove
  after tests.

Try to build fltk.pdf (may be removed later)

Store fltk.pdf in 'public' folder to be available online in docs
  and downloadable as "artifact"
2022-08-09 21:41:31 +02:00
ManoloFLTK
92f6962b59 Fix Fl_Xlib_Graphics_Driver for tiled-depth 3 images.
Modifying test/tiled_image to make it use a depth-3 image for
tiling (rather than an Fl_Pixmap) shows the filter does require
to use PictOpOver as the render op in the XRenderComposite call.
2022-08-09 17:43:48 +02:00
ManoloFLTK
1562396ec0 Fix Fl_Xlib_Graphics_Driver for RGB image drawing under XQuartz. 2022-08-09 16:05:53 +02: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
d20de5bc0a Fix src/Makefile: add missing directory to 'clean' target 2022-08-08 11:33:45 +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
e6c2503453 Add Fl_Flex demo "howto-flex-simple" to examples
This demo program uses an Fl_Flex widget with one row of buttons.
2022-08-07 18:01:59 +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
ManoloFLTK
f5b14397dd Wayland platform: fix declaration of local variable 'scale'. 2022-08-07 10:49:11 +02:00
ManoloFLTK
5dfc64ef32 Wayland platform: move repeated code into Fl_Wayland_Graphics_Driver::buffer_commit(). 2022-08-07 10:43:38 +02:00
ManoloFLTK
b25549ffa7 Wayland: make sure wl_surface_frame() is followed by wl_surface_commit(). 2022-08-06 17:30:44 +02:00
ManoloFLTK
149673863d Wayland: fix regression from 50d26b0 in test/mandelbrot. 2022-08-06 16:50:58 +02:00
ManoloFLTK
33ea30432f Check for error while communicating with Wayland - cont'd. 2022-08-06 10:27:17 +02:00
ManoloFLTK
e73e13120e Check for error while communicating with Wayland. 2022-08-06 10:07:38 +02:00
Albrecht Schlosser
128aa08be8 Improve docs about FLTK coordinate systems
Enlarge the screenshot of test/coordinates for better readability in
html and pdf docs.
2022-08-03 16:39:44 +02:00
ManoloFLTK
169c6980d1 Fl_Darwin_System_Driver: use explicit unicode characters, comment out coding sequences. 2022-08-02 17:48:39 +02:00
Albrecht Schlosser
c8565bf4f3 Fix Fl_Flex unsetting of set_size()
Don't add the widget to the array if size == 0 (unset) but it has
not been in the array (or it's called twice).
2022-08-01 19:56:08 +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
ManoloFLTK
de8e6de25b Mention support of macOS 13.0 "Ventura". 2022-07-31 13:55:24 +02:00
ManoloFLTK
c411778e71 Add support of macOS Ventura 13.0 2022-07-30 12:13:05 +02:00
Albrecht Schlosser
29a3062b02 Improve check mark visibility for small sizes
This looks a little better and more like FLTK 1.3
2022-07-27 20:20:33 +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
3932ed261f Fix for issue #471 for the Wayland platform. 2022-07-27 17:52:58 +02:00
ManoloFLTK
f77c4737bb Fix for issue #471: Different Fl_Window::resize() behavior between v1.3.8 and v1.4 2022-07-27 16:53:43 +02:00
ManoloFLTK
d6832f210c Fl_Sys_Menu_Bar: allow use of more keys as menu shortcuts. 2022-07-27 00:52:09 +02:00
ManoloFLTK
f582e06224 Fl_Sys_Menu_Bar: allow use of escape and tab as menu shortcuts. 2022-07-26 19:01:41 +02:00
ManoloFLTK
2241bab478 Remove useless variables and preprocessor directives. 2022-07-26 18:58:44 +02:00
ManoloFLTK
f61dfc3c05 Remove redundant Fl_Xlib_Graphics_Driver::scale_bitmap_for_PostScript() under USE_XFT=1. 2022-07-26 10:01:51 +02:00
ManoloFLTK
acc9075a58 Remove redundant Fl_PostScript_Graphics_Driver::color() under Pango. 2022-07-26 09:39:30 +02:00
ManoloFLTK
d026f29993 Document the class hierarchy below Fl_System_Driver. 2022-07-26 09:29:49 +02:00
ManoloFLTK
237c0c1393 Add Pango version check for Fl_PostScript_Graphics_Driver 2022-07-24 18:03:11 +02:00
ManoloFLTK
cd60ea17b0 Add Fl_PostScript_File_Device::set_current() and end_current() members. 2022-07-24 08:46:52 +02:00
ManoloFLTK
2cedae1ece Fl_Cairo_Graphics_Driver: simpler handling of font size. 2022-07-21 13:57:02 +02:00
ManoloFLTK
4ae905cc9d Change prototype of virtual Fl_Graphics_Driver::pango_font_description(). 2022-07-20 08:37:21 +02:00
ManoloFLTK
536c32ee99 Fl_Cairo_Graphics_Driver: simpler way to construct the PangoLayout object. 2022-07-18 22:58:02 +02:00
Albrecht Schlosser
3560ff450f Remove empty line 2022-07-16 16:52:26 +02:00
Leon Winter
9d27ec8754 beep: use maximum loudness for error, otherwise system-default 2022-07-16 16:52:26 +02:00
Leon Winter
3dd8c314d6 Let beep use system default settings
Please note that the parameter 'percent' of XBell(3).
Given the value of 100, the system defined setting
(normally specified via xset) is ignored and the
percent of 100 is used instead. When calling the
bell from fltk with FL_BEEP_DEFAULT I would expect
to get the default (system specified) percent setting.
2022-07-16 16:52:26 +02:00
Albrecht Schlosser
d73327e181 Document that Fl_Help_View can't be used with FL_NO_BOX
This widget overrides FL_NO_BOX internally by FL_UP_BOX for all
practical purposes, e.g. draw(). This has been this way since
its initial release and can't be changed.
2022-07-14 20:05:21 +02:00
ManoloFLTK
2327ede74c Add explanatory comments about text handling by Fl_Cairo_Graphics_Driver. 2022-07-11 12:11:04 +02:00
Albrecht Schlosser
79ce6547ce Fix non-xft build referencing fl_get_font_xfld() (#461)
This is only one part of issue 461 which describes two build errors
on "Raspberry Pi4 bullseye". It turned out that the build didn't
find Xft.
2022-07-09 22:05:46 +02:00
Albrecht Schlosser
d9d3406be8 Upgrade the bundled nanosvg library to current version
For details see README.bundled-libs.txt.
2022-07-09 14:37:46 +02:00