Commit Graph

10270 Commits

Author SHA1 Message Date
wcout 2ddfd9d949
Animated GIF support (Fl_Anim_GIF_Image class) (#375) 2023-01-21 17:27:58 +01:00
Matthias Melcher 1fc269b0d4
Move global FLTK options into new app fltk-admin (#560) 2023-01-21 17:14:41 +01:00
Matthias Melcher 4ddcbc81de No default values in plain C 2023-01-20 16:20:01 +01:00
Matthias Melcher 2c595e8dde STR 2822: function to count bytes in a UTF-8 string 2023-01-20 16:13:00 +01:00
Matthias Melcher cd5301ac37 STR 2843: FLUID align evenly now prefers correct gap size over correct width 2023-01-20 15:34:14 +01:00
Matthias Melcher b19c0e4f63 STR 2894: pressed_menubutton_ now protected in Fl_Menu_Button 2023-01-20 15:22:21 +01:00
Matthias Melcher 4f3f2bb30b STR 2909: Fl_Tile now forwards FL_RELEASE event to children 2023-01-20 14:04:22 +01:00
Matthias Melcher ab5cc5866d STR 3408: Fl_Scroll draws background inactive if needed 2023-01-20 13:51:17 +01:00
Matthias Melcher f4620329f1 STR 3461: fix menu linespacing 2023-01-20 13:44:13 +01:00
Matthias Melcher 18aaa32e45 STR 2658: documentation fixes on Fl::set_fonts 2023-01-20 12:35:56 +01:00
Albrecht Schlosser 0eeb6fe33e Fluid: improve contrast of comments in widget browser 2023-01-19 14:03:31 +01:00
ManoloFLTK 3774a0b0a9 Update bundled libjpeg to version 9e - cont'd 2023-01-17 14:08:57 +01:00
ManoloFLTK 3088a69c6e Update bundled libjpeg to version 9e - cont'd 2023-01-17 13:45:10 +01:00
ManoloFLTK 2f09e96b6d Update bundled libjpeg to version 9e (16 jan 2022) 2023-01-17 12:29:30 +01:00
ManoloFLTK 8941dd1ab7 Update bundled libpng to version 1.6.39 - cont'd 2023-01-17 10:44:22 +01:00
ManoloFLTK e480dc3871 Update bundled libpng to version 1.6.39 - cont'd 2023-01-17 10:36:52 +01:00
ManoloFLTK 39eba133de Update bundled libpng to version 1.6.39 (20 nov 2022) 2023-01-17 09:38:53 +01:00
ManoloFLTK b804c4b72c Update bundled zlib to version 1.2.13 (13 oct 2022) 2023-01-17 08:20:21 +01:00
Albrecht Schlosser 71eda122e8 Fix shared library build on Solaris as requested by STR 3378
I couldn't test this though.

Reference: https://www.fltk.org/str.php?L3378
2023-01-16 22:55:16 +01:00
ManoloFLTK 35b7473e70 Wayland menus: support tall popup menu + Sway support 2023-01-16 17:07:22 +01:00
ManoloFLTK ff3906bec0 Wayland menus: support tall popup menu 2023-01-16 16:00:54 +01:00
Albrecht Schlosser 991359fcbd Remove DartConfig.cmake as requested by STR 2059
This file was not in use and we currently don't intend to use CDash.
2023-01-16 01:14:16 +01:00
Albrecht Schlosser 420042aefb Improve examples/chart-simple demo program
Make sure that the first chart entry is not zero because this wouldn't
show the first part of FL_SPECIALPIE_CHART separated from the circle.
2023-01-16 00:30:32 +01:00
Albrecht Schlosser f44bdfb7cf Fl_Chart: minor update and additional documentation
Add forgotten parameter docs and some minor code fixes.
2023-01-16 00:08:47 +01:00
Albrecht Schlosser dde2d21b5d Improve deriving from Fl_Chart (STR 2022)
This commit makes the local, static drawing functions in the source
file available for subclasses by converting them to static protected
methods as requested by STR 2022.

The source and header files have been reformatted according to the
CMP, documentation for the new protected methods was added.

Source code *functionality* has not been changed.

This resolves and closes STR 2022.

Todo:
 - investigate whether these drawing methods wouldn't better be
   member functions and "convert" them if applicable
 - investigate whether the internal struct FL_CHART_ENTRY could become
   a local part of the Fl_Chart class, maybe Fl_Chart::Entry.
 - rename private member variables with trailing underscore (see CMP)
2023-01-15 23:48:00 +01:00
Albrecht Schlosser 02ca05c6b2 Fix memory leak warnings by "binding" images
Although the memory "leak" is not really an issue in this demo
program (memory is returned anyway), "fixing" the leak warning
issued by valgrind and address sanitizer demonstrates the new
feature to "bind" images.
2023-01-15 20:14:35 +01:00
ManoloFLTK f54c2b3430 Have files fl_attr.h and names.h visible by Doxygen
For some reason, the \file Doxygen command is absolutely required.
2023-01-15 11:00:48 +01:00
ManoloFLTK 761aa5e485 Rename static member Fl_Wayland_Window_Driver::tall_popup to new_popup
The new name reflects better the role of this bool member variable.
Also, add explanatory comments about the use of this variable.
2023-01-15 10:18:50 +01:00
ManoloFLTK c76285d457 Add necessary initialisation in test/mandelbrot
Detected by valgrind :
==16102== Conditional jump or move depends on uninitialised value(s)
==16102==    at 0x449A10: Drawing_Area::idle() (mandelbrot.cxx:143)
2023-01-14 20:07:30 +01:00
ManoloFLTK b5f9d6f38e More for "undefined reference to png_init_filter_functions_vsx" (#652) 2023-01-14 13:06:32 +01:00
ManoloFLTK 37775538c4 Extend commit a4b33f8 to other uses of function convert_crlf()
Helper function convert_crlf() from file fl_wayland_clipboard_dnd.cxx has been
repaired by commit a4b33f8 (13 jan 2023). But the same function was also in
file Fl_cocoa.mm. This commit moves the repaired code to class Fl_Screen_Driver
and has both fl_wayland_clipboard_dnd.cxx and Fl_cocoa.mm use it.
2023-01-14 09:56:09 +01:00
ManoloFLTK 82ac84a7c8 Fix "undefined reference to png_init_filter_functions_vsx" (#652)
Add two auxiliary source files needed to properly build libpng
for the ppc64 architecture.
2023-01-14 09:10:35 +01:00
ManoloFLTK c8b4a56735 Add missing initialisation after dynamic memory allocation 2023-01-14 08:16:23 +01:00
Albrecht Schlosser a4fdf92d06 Fix set_fonts() in Xlib/xft and Cairo Graphics_Driver
src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx:
 - fix font_name_process() out of bounds memory access
 - unify/align font_name_process() code (see also Xlib/xft)
 - fix font name string allocation

src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
 - unify/align font_name_process() code (see also Cairo_Graphics)
 - fix font name string allocation

Todo: move common code to Fl_Graphics_Driver or another common file.
2023-01-13 22:39:23 +01:00
ManoloFLTK f3e21ddad2 Fix for "Rename Fl_X* Fl_Window::i private class member" (#223) 2023-01-13 21:16:17 +01:00
ManoloFLTK dd6b9b90ee Wayland menus: add missing use of scaling factor 2023-01-13 19:37:06 +01:00
Albrecht Schlosser 59bf6dc059 Fix "alloc-dealloc-mismatch" in Fl_Native_File_Chooser_Kdialog
Error was reported by Address Sanitizer (ASAN) when picking a file.
Platform: Unix/Linux.

==1734703==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete []) on 0x607000108420
    #0 0x7f3357d846ef in operator delete[](void*) ../../../../src/libsanitizer/asan/asan_new_delete.cc:168
    #1 0x4e195f in Fl_Native_File_Chooser_Driver::strfree(char*) ../../src/Fl_Native_File_Chooser.cxx:262
...
0x607000108420 is located 0 bytes inside of 66-byte region [0x607000108420,0x607000108462)
allocated by thread T0 here:
    #0 0x7f3357d0a3ed in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cc:445
    #1 0x57951a in Fl_Kdialog_Native_File_Chooser_Driver::filter(char const*) ../../src/Fl_Native_File_Chooser_Kdialog.cxx:245
    #2 0x4e14a0 in Fl_Native_File_Chooser::filter(char const*) ../../src/Fl_Native_File_Chooser.cxx:176
2023-01-13 18:15:51 +01:00
Albrecht Schlosser a4b33f8e76 Wayland: Fix "heap-buffer-overflow" error
- replace strchr() with memchr() because buffer is not nul-terminated
- fix '*(p+1)' potentially accessing memory out of bounds

This fix also prevents
- multiple memmove() calls
- multiple searches from the beginning of the string
2023-01-13 16:44:06 +01:00
Albrecht Schlosser 54e75dc902 Improve debug output of Fl_String
- add newline (\n) before string output
- remove quotes (')
2023-01-13 16:41:40 +01:00
ManoloFLTK 6a5c326c39 Fix for "Screen resolution change (win32)" (#651) 2023-01-13 15:15:02 +01:00
ManoloFLTK 7dd7cfcf95 Wayland Fix "Error "heap-use-after-free" when scaling twice" (#650) 2023-01-12 21:28:03 +01:00
ManoloFLTK 66860c2e83 Improve "Implementation note about menu windows under Wayland" 2023-01-12 21:27:17 +01:00
Albrecht Schlosser a29c0e36fd Add Fl_Scheme_Choice to examples/tree-custom-draw-items
- add Fl_Scheme_Choice widget for quick scheme selection
- fix label alignment of selection box
- set selection_color()
- set selectbox()
- make the tree the resizable() of the window
2023-01-12 19:21:09 +01:00
Albrecht Schlosser bafd3fd3d7 Add Fl_Scheme_Choice widget and use it in test programs
This widget offers the selection of all known FLTK schemes as a simple
widget based on Fl_Choice.

Some test and demo programs use Fl_Scheme_Choice to enable the developer
or user to switch schemes quickly for comparison.

Todo:
 - add features to add new schemes during runtime (partially done)
 - update status when the scheme is changed by Fl::scheme("...")
2023-01-12 19:21:09 +01:00
Albrecht Schlosser 79832b679f Add the initial version of class Fl_Scheme
This basic version of class Fl_Scheme contains only static methods that
are needed for Fl_Scheme_Choice and further extensions.
2023-01-12 19:21:09 +01:00
Matthias Melcher 76a5c7b081 FLUID: Fix wrong use of `Fl_Scroll::position()` 2023-01-12 14:38:11 +01:00
ManoloFLTK b375d07d32 New static member Fl_Window *Fl_Wayland_Window_Driver::previous_floatingtitle 2023-01-12 11:58:53 +01:00
ManoloFLTK 62e33973a1 New static member bool Fl_Wayland_Window_Driver::tall_popup 2023-01-12 11:36:20 +01:00
ManoloFLTK 32b966ef8f Remove repeated code in classes menuwindow and menutitle 2023-01-12 10:33:41 +01:00
ManoloFLTK b8d9f2282f Remove useless #include directives 2023-01-12 10:33:41 +01:00