Commit Graph

10239 Commits

Author SHA1 Message Date
Matthias Melcher
12da87ba0c
Adding length checks for in-memory image data (see #542) (#592)
SVG is now decompressed in memory
Bitmap invalid array length handling to return an error
RGB Image data reader to return error if image data is too short
FLUID: Add size argument to bitmap and JPEG data
2022-12-17 16:01:35 +01:00
Matthias Melcher
08f6741d7b
Make unittest conform to CMP (#597)
Update unittest README
2022-12-17 13:16:57 +01:00
ManoloFLTK
07041ea06e CHANGES.txt: Reorganize text about HighDPI support and GUI scaling 2022-12-17 08:34:58 +01:00
ManoloFLTK
3a55545dc0 Complete and consolidate Fl_Native_File_Chooser-related changes 2022-12-17 08:34:58 +01:00
Greg Ercolano
118bf55c38 Added backspace handling to simple terminal ansi() mode
This addresses a comment from MoAlyousef in issue #577
	on 12/15/2022 requesting backspace processing.
2022-12-16 10:48:32 -08:00
ManoloFLTK
41f37613ec Derive Fl_Zenity_Native_File_Chooser_Driver from Fl_Kdialog_Native_…
Also add Fl::option(OPTION_FNFC_USES_ZENITY)
2022-12-16 16:21:23 +01:00
Trent McPheron
576271fb04 Add Zenity-based file chooser based on the KDialog one (HugLifeTiZ)
If available, it is used on Linux regardless of the current desktop because
it offers free XDG portal integration, which means it picks the correct file
chooser on all desktops, and allows for meaningful file selection in sandbox
environments like Flatpak.
2022-12-16 16:21:23 +01:00
ManoloFLTK
2ddb27f0f2 Fix for "Recent macos build issues" (#598) 2022-12-16 08:06:41 +01:00
Albrecht Schlosser
44a2547394
Rename some Fl_Flex methods for FLTK compliance (#594)
Change some method names to comply with FLTK style as discussed
in fltk.coredev, thread "Fl_Flex method name question".

* Rename Fl_Flex::margins(...) to Fl_Flex::margin(...)
  (use singular form for all margin related methods)

* Remove Fl_Flex::setSize() and isSetSize() "backwards compatibility" methods

* Rename Fl_Flex::set_size(...) to fixed(...)

Note: the latter affects existing (pre-release) fluid (.fl) files: you may
  want to edit and replace "set_size_tuples" with "fixed_size_tuples"
2022-12-15 16:46:40 +01:00
ManoloFLTK
2fd1866f49 macOS: Add "Show hidden files" button to native file chooser 2022-12-15 12:10:41 +01:00
Albrecht Schlosser
64d8c913be Fix trailing whitespace and dependencies 2022-12-13 15:58:56 +01:00
Albrecht Schlosser
5b3bd50001 Fix compiler warning: unused variable 2022-12-13 15:58:27 +01:00
Albrecht Schlosser
b82ea16d69 Fix compiler warning [-Wmaybe-uninitialized]
Fl_BMP_Image.cxx:228:30: warning: ‘width’ may be used uninitialized in this function
  228 |       int maskSize = (((width*Bpp+3)&~3)*height) + ...
      |                         ~~~~~^~~~
2022-12-13 15:51:54 +01:00
ManoloFLTK
0e3acd27fb Add information about Wayland support by FLTK on the RaspberryPi 2022-12-13 15:22:24 +01:00
ManoloFLTK
496c7dd84b Fix for "Build on FreeBSD fails: linux/input.h not found" (#584) 2022-12-13 10:16:23 +01:00
ManoloFLTK
79e26cf19a Package libxinerama-dev is required for the Wayland platform 2022-12-12 17:31:06 +01:00
Greg Ercolano
6a047855db Move utf-8 box drawing string into .cxx
It was decided today it is ok to use utf-8 strings in source,
so consolidating.
2022-12-11 11:00:08 -08:00
Greg Ercolano
821d2fdf82 Added Unicode Boxes unittest and README-unittests.txt
This test helps check for issues with multiline widgets
drawing text properly.

The README-unittests.txt was added to help developers
add new unit tests easily.
2022-12-11 10:18:06 -08:00
ManoloFLTK
3834a23248 Add new members Fl_Widget::bind_{de}image(Fl_Image*) to CHANGES.txt 2022-12-11 11:05:55 +01:00
ManoloFLTK
19c1ab504f Use correct syntax to befriend a class 2022-12-11 08:50:59 +01:00
Matthias Melcher
a5adbd99ca
Add option to bind images to a widget (#589)
Adding image binding to FLUID as well
2022-12-10 23:22:24 +01:00
ManoloFLTK
8dcd121d44 Text positioning different in 1.4.x vs 1.3.x (#568) - cont'd
@wcout reports that we get better results if function pango_font_metrics_get_height()
is not used until version 1.50.6 and above of libpango. The difference is specially visible
with underscore characters in unscaled, standard DPI displays. This commit does that.
2022-12-10 19:00:09 +01:00
Greg Ercolano
234a33c12f Docs: add widget screenshot for Fl_Hor_Nice_Slider 2022-12-10 07:53:28 -08:00
Matthias Melcher
a8051301b0
Fluid preview now copies text attributes (#587) 2022-12-10 16:33:48 +01:00
Matthias Melcher
a23c77c5a1
Defer opening the display as much as possible (#586) 2022-12-10 16:21:07 +01:00
Matthias Melcher
60d6e9be14 Fixes some VC compiler warnings 2022-12-10 16:03:29 +01:00
Albrecht Schlosser
8dea6505e9 Windows: fix memory leak caused by RegisterDragDrop (#569)
- call RevokeDragDrop() when the window is hidden
- do not delete the *static* FLDropTarget object
2022-12-10 15:03:30 +01:00
Matthias Melcher
98d97daf11 Fixes some implicit type cast warnings 2022-12-10 13:34:00 +01:00
Matthias Melcher
fa41211cca
FLUID event handling and UI changes (#575)
* Full support o when()
* Making undo suspend nesting
* Finally correct undo handling for Label: input
* Documentation.
* Adding more undo checkpoints for the Widget Panel
* Quick selection of default user_data types
* Pulldown menu for system colors
* Make sure that partially typed text fields are propagated before saving
2022-12-10 13:11:49 +01:00
Matthias Melcher
5673072271
Fixes OpenGL complex polygons when scaling (#576)
Also fixes gap()
2022-12-10 13:10:36 +01:00
ManoloFLTK
df059de37e "Public members Fl::awake_ring_*_ should be private" (#559) - cont'd 2022-12-10 10:19:54 +01:00
Albrecht Schlosser
e72fa007e7 Make Fl_ICO_Image::idcount() const
... and fix docs and alignment
2022-12-09 22:51:37 +01:00
Albrecht Schlosser
ceb268fd34 Suppress (GitHub CI/wayland) compiler warning
[ 15%] Building CXX object src/CMakeFiles/fltk.dir/Fl_Text_Display.cxx.o
.../fltk/src/Fl_Text_Display.cxx: In constructor ‘Fl_Text_Display::Fl_Text_Display(int, int, int, int, const char*)’:
.../fltk/src/Fl_Text_Display.cxx:122:57: warning: ‘void* __builtin_memset(void*, int, long unsigned int)’ writing between 4 and 8589934584 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
  122 |     for (int i=1; i<mNVisibleLines; i++) mLineStarts[i] = -1;
      |                                          ~~~~~~~~~~~~~~~^~~~
.../fltk/src/Fl_Text_Display.cxx:120:39: note: at offset 4 into destination object of size 4 allocated by ‘operator new []’
  120 |   mLineStarts = new int[mNVisibleLines];
      |                                       ^

This warning is IMHO obsolete because the code in question should not
be executed at all (mNVisibleLines == 1). However, the compiler seems
to substitute this with '__builtin_memset(...)' and analyzes "correctly"
that memory at offset 4 would be overwritten but not that the written
size would be 0.

The "fix" uses a compiler macro and #if to clarify that this code must
not be executed and should not be compiled (see comment why this code
exists).
2022-12-09 18:56:09 +01:00
ManoloFLTK
59be6a7ef9 Fix for "Public members Fl::awake_ring_*_ should be private" (#559) 2022-12-09 18:50:04 +01:00
ManoloFLTK
36ef15963a Comment only: put Fl_Display_Cairo_Graphics_Driver in class hierarchy 2022-12-09 18:47:55 +01:00
ManoloFLTK
eb2572deaf Add new Wayland-specific fl_wl_compositor() function 2022-12-09 17:06:35 +01:00
wcout
632661fa64 Fix Fl_Text_Display drawing of line numbers (#578)
The formerly undrawn rectangle beneath (or above) the line numbers is now filled with FL_BACKGROUND_COLOR.
Additionally the small rectangle between the scrollbars is now filled with FL_BACKGROUND_COLOR instead of FL_GRAY for consistency.
2022-12-09 16:55:06 +01:00
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
0bb30d8f92 Fix typo in comment 2022-12-08 20:40:03 +01:00
Albrecht Schlosser
54a62eb951 Fix trailing whitespace 2022-12-08 19:48:31 +01:00
Alex
30dd944c74 build: harden build.yml permissions
Signed-off-by: Alex <aleksandrosansan@gmail.com>
2022-12-08 19:39:06 +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
ManoloFLTK
b9a9f7f10c Simpler prototype of Fl_Wayland_Graphics_Driver::buffer_commit() member - cont'd 2022-12-08 15:22:08 +01:00
ManoloFLTK
4d8ae8ccd0 Libdecor: update to upstream commit 25f29fef 3 dec 2022 2022-12-08 12:41:41 +01:00
ManoloFLTK
503492db78 Simplify prototype of Fl_Wayland_Graphics_Driver::buffer_commit() member 2022-12-08 10:16:06 +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
ManoloFLTK
cbd37a2870 Wayland: fix progressive drawing as in test/mandelbrot 2022-12-07 08:46:50 +01:00
ManoloFLTK
90c7e6bcb1 Fix issue #537 without damaging test/mandelbrot 2022-12-06 14:46:11 +01:00
Matthias Melcher
0d485b34a2
Fixing fl_complex_polygon() compilation for WIN32 (#571) 2022-12-05 19:57:30 +01:00
Matthias Melcher
9f92972729
Implement fl_complex_polygon() for OpenGL (#570) 2022-12-05 19:27:12 +01:00