Commit Graph

818 Commits

Author SHA1 Message Date
ManoloFLTK
26e6c3f930 Add classes Fl_SVG_File_Surface and Fl_EPS_File_Surface to draw to SVG and EPS.
Test programs device and pixmap_browser use these new classes.
Class Fl_SVG_File_Surface can be optionally made non functional using the
--disable-svg configure option or turning off OPTION_USE_SVG in CMake.
Class Fl_EPS_File_Surface can be optionally made non functional using the
--disable-print configure option or turning off OPTION_PRINT_SUPPORT in CMake.
2020-06-27 09:56:00 +02:00
ManoloFLTK
46b89686df Allow using an Fl_SVG_Image object as window icon.
Fix for issue #90: Setting an svg image as a window icon causes a segfault.
2020-06-15 19:05:47 +02:00
ManoloFLTK
7f7e0e4ea1 Replace Fl_Window_Driver::is_a_rescale() by Fl_Window::is_a_rescale()
so it can be called by any user code.
2020-05-08 17:08:33 +02:00
ManoloFLTK
f386bd2cb7 Support case when window is fullscreen - continued 2020-05-04 11:33:43 +02:00
ManoloFLTK
6d24a355f0 Support case when captured window is fullscreen: no titlebar. 2020-05-04 11:33:43 +02:00
ManoloFLTK
c4342630f0 Update © year. 2020-04-23 11:30:06 +02:00
ManoloFLTK
f11a80482a Check for success of the FormatMessageW() call. 2020-04-23 11:28:18 +02:00
ManoloFLTK
2ced142adc Match variable type (DWORD) and format specifier 2020-04-22 16:58:48 +02:00
ManoloFLTK
2878fa95ab Add optional argument to Fl_Printer::begin_job() to inform caller when an error occurs.
This solves an issue raised in fltk.general :  Fl_Printer errors - how can I interpret them?
    https://www.fltk.org/newsgroups.php?s38419+gfltk.general+v38427
2020-04-22 16:01:33 +02:00
ManoloFLTK
e3ad0ee441 Avoid useless multiplication by 1 operations. 2020-04-21 09:38:39 +02:00
ManoloFLTK
f3e83d3ce5 MacOS: show print chooser panel as a sheet. 2020-04-12 17:18:44 +02:00
ManoloFLTK
6a01871f32 Give example of use of Fl_Native_File_Chooser::USE_FILTER_EXT option. 2020-04-10 18:41:24 +02:00
ManoloFLTK
7793fa812a Update standard file headers 2020-04-05 16:53:37 +02:00
ManoloFLTK
e8185abf22 Fix Fl_X11_Window_Driver::capture_titlebar_and_borders() for resizable window. 2020-04-03 16:32:28 +02:00
ManoloFLTK
10a9a0440e Rewrite Fl_Xlib_Graphics_Driver::get_font_name() with less lines of code. 2020-03-20 10:47:19 +01:00
ManoloFLTK
214f14db8a Fix Fl::get_font_name() under X11+Xft-Pango 2020-03-20 10:20:30 +01:00
ManoloFLTK
a66fea7527 Minor rewriting for more readable code. 2020-03-15 08:16:59 +01:00
ManoloFLTK
4b2dbe3bb4 Fix when using Fl_Scroll inside Fl_Overlay_Window 2020-03-12 21:38:13 +01:00
ManoloFLTK
55132049c7 Complete fix for "[fltk.general] scroll and overlay window" dated 7 march 2020. 2020-03-10 06:37:47 +01:00
ManoloFLTK
a1115f13e3 Improve use of fl_scroll within Fl_Overlay_Window on macOS.
This is a partial fix for "[fltk.general] scroll and overlay window"
dated 7 march 2020.
Mixing of Fl_Scroll and Fl_Overlay_Window is now OK also
on a retina display, but there are still problems when the window
is scaled.
2020-03-08 20:16:34 +01:00
Albrecht Schlosser
4c1b92eb52 Implement fl_putenv() as cross-platform putenv() 2020-02-10 12:10:40 +01:00
Albrecht Schlosser
dcb848ca3e Remove empty file from compilation 2020-02-09 16:08:46 +01:00
ManoloFLTK
7cb0c2311c Fix computation of Fl_Window::decorated_h() on macOS when screen is scaled. 2020-02-06 16:01:19 +01:00
ManoloFLTK
fbf20b7225 Protect against situation where HAVE_DLSYM && HAVE_DLFCN_H && !defined(RTLD_DEFAULT) 2020-01-30 18:49:34 +01:00
ManoloFLTK
62cc0bba74 Restore compilability when HAVE_DLFCN_H = 0 2020-01-27 17:34:56 +01:00
ManoloFLTK
794eb962eb GTK printer chooser: add code to support choice of paper size and orientation 2020-01-24 18:05:46 +01:00
ManoloFLTK
a47df74431 Fix preservation of the caller's locale when running GTK dialogs.
There are now 2 kinds of GTK libraries (V2 and V3) and two dialogs
the file chooser and the printer chooser.
2020-01-22 18:44:49 +01:00
Albrecht Schlosser
bcc2f4c575 Fix Fl_PostScript_Graphics_Driver::clip_box() 2020-01-20 12:56:32 +01:00
ManoloFLTK
6aa9357b17 Have Fl_Quartz_Copy_Surface_Driver use retina resolution for resulting bitmap 2020-01-19 12:02:51 +01:00
OKAMURA, Yasunobu
dd3bf0791e Fix JIS Keyboard dead keys 2020-01-16 16:17:36 +01:00
Albrecht Schlosser
dfaab4ae90 Fix uninitialized vars in calls to fl_clip_box() (issue #6)
The main fixes are only to avoid static code analyzer warnings reported
in issue #5, but there are also minor bug fixes included. These bug
fixes are more of theoretical concerns though.

Close #6.
2020-01-15 21:23:26 +01:00
ManoloFLTK
3265d439f3 Slightly improve Fl_Quartz_Graphics_Driver::copy_offscreen() when macOS ≥ 10.4 2020-01-15 18:18:59 +01:00
ManoloFLTK
2990717d6e Implement Fl_Window::icon() and default_icon() for macOS
The implementation is effective for macOS 10.10 and above.
Demo program test/device uses the new implementation.
2020-01-11 14:57:58 +01:00
Albrecht Schlosser
2411336e84 Fix X11 RTL text clipping (STR 2798) - part 2
Yet another fix for RTL text...
2020-01-09 00:35:42 +01:00
Albrecht Schlosser
2df013931b Improve X11 coordinate clipping for text (STR 2798)
Text outside the 16-bit X11 coordinate space must be clipped before
calling X11 draw functions, otherwise text might appear anywhere
in the window because X11 would "truncate" the coordinates instead
of proper clipping (X11 handles only 16-bit coordinates).
2020-01-08 19:50:35 +01:00
MatthiasM
27d22aeed6 Fixed previous commit for MSWindows. 2020-01-03 18:13:14 +01:00
MatthiasWM
c82d3878a4 Linux build: typos and stupidities to prev. commit 2020-01-03 17:55:08 +01:00
Matthias Melcher
462b681679 Linux/MSWindows: improved Fl_Preferences file path checking 2020-01-03 17:42:22 +01:00
Matthias Melcher
8147199a41 macOS: checking Fl_Preferences file path improved
zlib: removed warning
2020-01-03 17:05:52 +01:00
Matthias Melcher
db6fa8bf86 Merge remote-tracking branch 'refs/remotes/origin/master' 2019-12-31 18:33:01 +01:00
Matthias Melcher
c0237a1f04 Limiting file access for Fl_Preferences.
Added Fl_Preferences::file_access() and various flags that make it possible to limit or completely deny file access to the preferences system, either for the core library or for the application or both.
2019-12-31 18:30:04 +01:00
Albrecht Schlosser
35a3e7cc16 Fix Fl::add_timeout() under Linux (STR 3516)
See comment 14 (excerpt):

"The current implementation basically handles add_timeout() the same
way as repeat_timeout(), i.e. add_timeout() *calls* repeat_timeout().
However, repeat_timeout() intentionally *corrects* the timeout value
by the value found in the global variable 'missed_timeout_by' which
is set when the timer expires, directly before the timer callback
is called. This variable is never reset."

This commit resets the variable as necessary in Fl::add_timeout().
2019-12-26 17:19:05 +01:00
Matthias Melcher
bd77a6e976 Android Image driver was incomplete and did not compile. 2019-12-22 18:47:27 +01:00
Albrecht Schlosser
0a124ac7e1 Fix Fl::add_timeout() in draw() under Linux (STR 3188)
Timeouts queued during Fl_Widget::draw() - called by Fl::flush() -
would not be serviced unless other events were processed. For
Details see STR 3188.
2019-12-09 17:53:58 +01:00
ManoloFLTK
cc4801133f X11 + pango: Sort font names ignoring case. 2019-11-08 10:09:18 +01:00
ManoloFLTK
2445797e45 Reorganise use of virtual member function Fl_Surface_Device::end_current() 2019-11-07 14:28:20 +01:00
ManoloFLTK
da29db9f9c Slightly simpler code to support fl_overlay_rect() on HighDPI screens. 2019-11-02 11:41:42 +01:00
ManoloFLTK
ecdb386f3d Fix HiDPI support under X11 to read/draw RGB image from/to display. 2019-11-01 14:32:07 +01:00
Albrecht Schlosser
1f9d027bb6 Fix typo and debug output when loading libgtk
A recent commit changed the library name, supposedly unintended.

While testing I found that the debug statements generated confusing
output (both "selected GTK-3" and "selected GTK-2") when GTK-3 was
available.
2019-10-30 19:00:12 +01:00
ManoloFLTK
98f16ae397 Fix path to header file 2019-10-30 17:48:05 +01:00