summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-11-24Fix for [fltk.coredev] reentrant calls with Fl_Window::resizeManoloFLTK
2021-11-19Refactor and improve "Print front window" dialogAlbrecht Schlosser
src/print_button.cxx: "Print front window" implementation (new file) This is compiled and activated if USE_PRINT_BUTTON is defined. The feature can be fine controlled by environment variable 'FLTK_PRINT_BUTTON' (see docs in source file).
2021-11-19Fix doxygen docs of fl_draw_check()Albrecht Schlosser
.. as pointed out by Ian in fltk.coredev. Thanks.
2021-11-18Disable check mark debuggingAlbrecht Schlosser
2021-11-18Reformat and move clipboard demo from examples to test folderAlbrecht Schlosser
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-17Fix Fl_Window::decorated_w() in some X11 situations.ManoloFLTK
2021-11-16Add use of fl_capture_window() by test/deviceManoloFLTK
Also, rename fl_capture_window_part() to fl_capture_window().
2021-11-16Reformat to FLTK style, improve documentationAlbrecht Schlosser
No code changes. Replace '#define fl_clip ..' with an inline method.
2021-11-15Add fl_draw_check() to draw better check marks (issue #68)Albrecht Schlosser
This new function can and should be used to draw check marks in widgets that need it, e.g. Fl_Check_Browser (issue #68) and Fl_Check_Button.
2021-11-14Fix "failed to build with pango libarary" (issue #291)Albrecht Schlosser
The error was reported for "centos 6 with devtoolset-6 installed which contains gcc (GCC) 6.3.1 20170216 (Red Hat 6.3.1-3)". The fix includes the missing header files *and* makes sure that the correct conversions (to size_t) take place as in src/drivers/PostScript/Fl_PostScript_image.cxx.
2021-11-11Support all image depths (1-4) in fl_write_png()Albrecht Schlosser
2021-11-09Refactor fluid: make fl_write_png() publicAlbrecht Schlosser
The new function fl_write_png() was moved to its own file and is now publicly available ("exported") so other programs can use it. This function was used in fluid to write a window screenshot (.png) together with a template (.fl) to preferences storage.
2021-11-05Fix for issue #279 about detecting early retina with GL windows.ManoloFLTK
2021-11-05Fix X11 build with FLTK_CONSOLIDATE_MOTION turned offAlbrecht Schlosser
2021-11-05Make "FLTK_CONSOLIDATE_MOTION" user-definable (issue #76)Albrecht Schlosser
This undocumented macro is used on X11 and macOS platforms to consolidate mouse move events, i.e. to collect some events and send them later as one event. The old macro name CONSOLIDATE_MOTION has been renamed to FLTK_CONSOLIDATE_MOTION since it is now a "global" symbol. Users can define FLTK_CONSOLIDATE_MOTION in their build system, e.g. on the compiler commandline, as 0 or 1 to disable or enable this feature, respectively. In FLTK 1.3 the default was 0 (OFF) on macOS and 1 (ON) on X11. In FLTK 1.4 the default is always 0 (OFF).
2021-10-31Consistently make Fl_Paged_Device::begin_page call ↵ManoloFLTK
Fl_Surface_Device::push_current.
2021-10-27Fix focus box drawing on X11 (partial fix for issue #156)Albrecht Schlosser
This fixes focus box drawing on X11 for some broken graphics drivers with line width zero as discussed on issue #156 titled "Incorrect rendering on Alpine Linux". This title is not entirely correct. The issue has been observed on other Linux distros as well if the "modesetting" driver is in effect. This does not fix rectangle drawing (missing pixels) in general which is obviously caused by a similar or the same driver issue.
2021-10-27Fix indenting, whitespace errors and dependenciesAlbrecht Schlosser
(no code changes)
2021-10-22Test wether preprocessor variable __BLOCKS__ is definedManoloFLTK
2021-10-22Allow compiling with compiler without "blocks" support.ManoloFLTK
This corresponds to PR#284.
2021-10-06Fix a typoAlbrecht Schlosser
2021-10-06Simplify and fix the code of Fl_Scroll::bbox()Albrecht Schlosser
Declare Fl_Scroll::bbox() and Fl_Scroll::recalc_scrollbars() 'const'. These methods don't change the Fl_Scroll widget. Use Fl_Scroll::recalc_scrollbars() in Fl_Scroll::bbox() to simplify the code and to avoid code duplication. bbox() can now be called at any time and returns the correct values, no matter if draw() has been called before.
2021-10-06macOS: "Fix fullscreen window level corner cases"ManoloFLTK
This corresponds to changes of PR#277 (Author: Samuel Mannehed)
2021-10-02Improve GIF error handling, terminate on some errorsAlbrecht Schlosser
There's not much we can do if we find unknown data in the main parser loop. The best we can do is terminating. If we find a GIF trailer (0x3b) this means logical end of file. If we get there in the main loop the GIF file is empty (no image). This behavior is consistent with many other image viewers including browsers (Firefox and Chrome).
2021-10-02Separate Fl_GIF_Image constructors with and w/o length argAlbrecht Schlosser
Document clearly that reading from memory w/o the length argument (old constructor) is discouraged (deprecated).
2021-10-01Refactor class Fl_Image_Reader to FLTK coding styleAlbrecht Schlosser
... and separate constructors for memory reader with and w/o length argument for better documentation.
2021-09-28Make Fl_Image_Reader::name() 'const' (#271)Albrecht Schlosser
Thanks to @wcout for finding this.
2021-09-28Fix potential memory leak in GIF image reader (#271)Albrecht Schlosser
This could happen if a read error or end of file was encountered.
2021-09-27Add error checking and improve constructor of Fl_BMP_ImageAlbrecht Schlosser
- use new features of Fl_Image_Reader (read error and EOF checks) - add length argument to constructor reading from memory
2021-09-27Fix and improve Fl_GIF_Image (issue #271, #274)Albrecht Schlosser
- add error and EOF checks - fix transparent pixel index outside ColorMap (#271) - fix Fl_GIF_Image decoder bug (#274) - add Fl_Image_Reader::skip(unsigned int) - use new skip() method in GIF reader
2021-09-25Clarify return values and fix a minor issue (#271)Albrecht Schlosser
Fix: Fl_Image_Reader::seek() would not clear the error flag when reading from memory.
2021-09-25Enable error and EOF check in class Fl_Image_Reader (#271)Albrecht Schlosser
This is part 1 and a prerequisite for the fix of issue #271. It enables the user of this internal class (Fl_{BMP|GIF}_Image) to test for read errors and EOF (end of file) while reading. The method used to read data from memory got an optional third argument 'const long datasize = -1)' to limit the size of the memory block of data provided to the image reader. Default is -1 which means "unlimited" (backwards compatibility). Using only two arguments (w/o size limit) is deprecated and should only be done if the data size is not available.
2021-09-24macOS platform: facilitate use when another toolkit handles the system menu.ManoloFLTK
2021-09-12Fix malloc/delete mismatch (X11 only)Albrecht Schlosser
2021-08-30Fix two compiler warnings [-Wunused-variable]Albrecht Schlosser
2021-08-30Fix compiler warnings (Windows only)Albrecht Schlosser
src/Fl_Native_File_Chooser_WIN32.cxx:331:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 331 | while ( s=strchr(s,'\\') ) *s = '/'; | ~^~~~~~~~~~~~~~~ src/Fl_Native_File_Chooser_WIN32.cxx:336:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 336 | while ( s=strchr(s,'/') ) *s = '\\'; | ~^~~~~~~~~~~~~~
2021-08-28add fl_filename_match comments as per STR3186Duncan Gibson
add Notes: section to fl_filename_match documentation explaining case-sensitivity [or not] and use of \x see also https://www.fltk.org/str.php?L3186
2021-08-27Fix "Tooltip causing Window to 'unfocus' on Windows" (#261)Albrecht Schlosser
This fixes a regression introduced in FLTK 1.4 in commit 3bc5be71a39bf2ed9d9937a4f60df61dd6d3a2b4 ("Rewrite Fl_Tooltip.cxx for the driver model").
2021-08-27Remove compiler warnings '-Wextra-semi' (see also PR #266)Albrecht Schlosser
I compiled with `-Wextra-semi -Werror=extra-semi` on Linux and Windows (cross-compiled on Linux) and removed all "extra semicolon" warnings I could find. I didn't check on macOS (yet). Note: Linux configured with and w/o Pango but not w/o Xft. Compilation with other options (e.g. Cairo) might still emit such warnings.
2021-08-06Fix problem in native file chooser with macOS 12 "Monterey" (beta).ManoloFLTK
2021-08-05Have Fl_Quartz_Copy_Surface_Driver account for current display scaling factor.ManoloFLTK
2021-08-04macOS: account for deprecation of [NSBitmapImageRep ↵ManoloFLTK
initWithFocusedViewRect:] in macOS 10.14
2021-08-03macOS: fix paste of image for macOS 11.xManoloFLTK
With macOS 11.x, the pasteboard image can be found with floating point pixel values. This changes makes FLTK process adequately such image data.
2021-07-24Fix © year.ManoloFLTK
2021-07-24Remove useless friend declaration.ManoloFLTK
2021-07-21Call pthread's recursive mutex on Linux (Issue #245)Albrecht Schlosser
Add CMake test for PTHREAD_MUTEX_RECURSIVE Add autoconf/configure compile test for PTHREAD_MUTEX_RECURSIVE Replace "#ifdef PTHREAD_MUTEX_RECURSIVE" with "#ifdef HAVE_PTHREAD_MUTEX_RECURSIVE" and define HAVE_PTHREAD_MUTEX_RECURSIVE in config.h
2021-07-12macOS: fix fltk_cairo shared library (issue #250)Albrecht Schlosser
- add missing dependencies to build the shared libfltk_cairo(.dylib) - remove incorrect dependency on cairo from libfltk - add cairo_test-shared demo (linked with shared libs)
2021-07-08Harmonize and document syntax of config.h source filesAlbrecht Schlosser
- configh.in: add and improve comments, reorder statements - configh.cmake.in: add comments, fix whitespace - src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx: fix trailing whitespace
2021-07-08macOS: Fl::add_timeout() must always create a new timer (#248)Albrecht Schlosser
The old version would reschedule an existing timer if a matching timer existed already which was unique to macOS. The new behavior is consistent on all platforms and allows to create multiple timer entries with the same callback and userdata.
2021-07-07macOS: Fix a timer inconsistency and prevent a crashAlbrecht Schlosser
Calling Fl::repeat_timeout() instead of Fl::add_timeout() to create a timer would crash on macOS but fall back to Fl::add_timeout() on Windows and Unix/Linux. Although this is documented as "undefined behavior" a crash should always be avoided and the fallback is now consistent on all major platforms. In the future this may be documented as the standard behavior.