Commit Graph

8633 Commits

Author SHA1 Message Date
ManoloFLTK
4abb0d0a25 Comments only: place new class Fl_GTK_Printer_Driver in the inheritance description. 2019-11-05 17:17:37 +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
ManoloFLTK
04ec829bfb Fix fl_overlay_rect() under X11 on HighDPI display.
The mandelbrot demo program is fixed.
2019-11-01 08:26:22 +01:00
ManoloFLTK
034d49064e Restore support of 'configure --enable-x11' with macOS 10.15 Catalina 2019-10-31 11:25:56 +01:00
ManoloFLTK
9ff6ad7885 Continue CMake support of the Darwin+XQuartz+fink test platform 2019-10-31 07:30:39 +01:00
ManoloFLTK
031a7a8414 Merge remote-tracking branch 'refs/remotes/origin/master' 2019-10-30 21:14:15 +01:00
ManoloFLTK
527327b8e4 Restore CMake support of Darwin + XQuartz + fink test platform 2019-10-30 21:13:52 +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
8c6f1b8ece Restore CMake support of Darwin + XQuartz + fink 2019-10-30 18:57:47 +01:00
ManoloFLTK
98f16ae397 Fix path to header file 2019-10-30 17:48:05 +01:00
ManoloFLTK
2f64c6a861 Concentrate source code that supports Darwin + XQuartz + fink as test platform 2019-10-30 17:25:49 +01:00
ManoloFLTK
ffcf8bd0b7 Documentation: make clear that "Using OpenGL in Normal FLTK Windows" isn't useful with macOS. 2019-10-27 08:37:33 +01:00
ManoloFLTK
d1e346a7d2 Restore support of OpenGL on retina without Fl::use_high_res_GL(1)
Apparently the default value of the wantsBestResolutionOpenGLSurface
property changed with macOS Catalina 10.15
2019-10-26 08:47:25 +02:00
ManoloFLTK
4f8e692f30 Add default value of 0 for 1st arg of member function Fl_Printer::begin_job(). 2019-10-22 13:16:14 +02:00
ManoloFLTK
80f5740468 Avoid useless code when drawing directly. 2019-10-20 15:37:05 +02:00
ManoloFLTK
4d350b61c1 Rewrite for macOS 10.15 Catalina
Another way to support what occurs under macOS 10.15 where the bitmap graphics context
prepared by the system when drawRect: runs sometimes changes its number of bytes/row
even if the width and height are unchanged.
This is expected to perform better when the number of bytes/row alternates between
two values.
2019-10-14 15:41:53 +02:00
ManoloFLTK
9863fef25a Fix for macOS Catalina 10.15
Under Catalina, the bitmap graphics context prepared by the system when drawRect: runs
sometimes changes its number of bytes/row even if the width and height are unchanged.
2019-10-12 16:02:00 +02:00
ManoloFLTK
72e712efbd Faster processing of layer-backed views used with MacOS ≥ 10.14
Calls to CGBitmapContextCreateImage() and CGContextDrawImage() are replaced
by faster calls to memcpy().
2019-10-09 11:49:24 +02:00
ManoloFLTK
940b7ba13d Faster drawing of layer-based windows if entirely redrawn 2019-09-24 12:57:29 +02:00
Albrecht Schlosser
bce85d9511 CMake: copy 'tiny.png' to doc folder
The image 'tiny.png' was not copied to the documentation/html
directory when docs were built with CMake.
2019-09-16 17:17:54 +02:00
ManoloFLTK
e063852d29 Mention change in Fl_Printer::begin_job() for the X11 platform. 2019-09-15 16:08:20 +02:00
ManoloFLTK
c549b7acbd X11 platform: use Gnome printer dialog when the GTK library is available at run-time
The code to determine whether the GTK library is available is now in Fl_X11_System_Driver::probe_for_GTK()
called both by Fl_Printer::begin_job() and Fl_Native_File_Chooser.
New Fl::option OPTION_PRINTER_USES_GTK allows to deactivate use of
the Gnome print dialog.

Minor change in Fl_Native_File_Chooser: GTK version 3 is searched before version 2,
whereas the search order was the opposite before.
2019-09-15 15:57:29 +02:00
ManoloFLTK
000807cc1d Fix use of Xrender extension with old, 16-bit framebuffers.
Subject "Bug in 1.4 Displaying PNG under x64 Kernel x86 app." in fltk.general
contains a report by Darren Legge that presents the problem,
and a later post stating the code modification does fix the problem.
2019-09-11 16:06:19 +02:00
Albrecht Schlosser
cb387bd6ff Fix remaining compiler warnings of (STR 3529)
src/Fl_File_Chooser2.cxx
src/Fl_File_Icon2.cxx
src/Fl_Help_View.cxx

The only known warnings are now in src/Fl_x.cxx as mentioned in
comment #1.
2019-08-29 18:43:11 +02:00
Albrecht Schlosser
50ee013a01 Fix more compiler warnings (STR 3529)
test/colbrowser.cxx:   [-Wformat-overflow=]
test/file_chooser.cxx: [-Wformat-overflow=]

Increase buffer size.
2019-08-29 17:58:24 +02:00
Albrecht Schlosser
6e683783f4 Fix another compiler warning (STR 3529)
fluid/template_panel.{fl|cxx}:

  .../fluid/template_panel.cxx:261:44: warning: ‘%s’ directive output
  may be truncated writing up to 255 bytes into a region of size
  between 0 and 1023 [-Wformat-truncation=]

Solution: increase buffer size from 1024 to 1400.
2019-08-29 17:32:26 +02:00
Albrecht Schlosser
ba8db654ff Fix one compiler warning (STR 3529)
fluid/undo.cxx: fix warning [-Wformat-truncation=]

This fix also removes some static variables and simplifies the
function undo_filename(). It does no longer copy the full filename
string back to a given buffer. Now it returns a pointer to the
internal filename string.

Summary: fix compiler warning, save memory, simplify a function, and
  speed up code by not copying data unnecessarily.
2019-08-29 17:17:37 +02:00
Greg Ercolano
62e39e5559 Added new method Fl_Tree_Item::event_on_item() 2019-08-27 16:53:57 -07:00
Greg Ercolano
3340b33bf1 Added NULL checks in Fl_Tree_Item::move() 2019-08-27 16:46:36 -07:00
Greg Ercolano
0d329a4699 Fix STR #3432: fixed drag+drop on folder
With reference to Sanch's patch from the STR, plus some extra mods
for handling edge conditions (such as root()) and comment clarifications.
2019-08-27 16:39:43 -07:00
ManoloFLTK
4a58bf4dc2 Add example "Fitting an SVG image to a resizable Fl_Box" to doc of Fl_SVG_Image. 2019-08-27 18:38:56 +02:00
ManoloFLTK
17d155d916 Fix window moving between retina/non-retina display with a GL subwindow. 2019-08-27 17:44:31 +02:00
Greg Ercolano
4870cde0a6 More fixes for STR #3527; handle usericons, etc 2019-08-25 01:13:35 -07:00
Greg Ercolano
eed1d364d9 Small tooltip improvements for test/tree app 2019-08-25 01:08:12 -07:00
Greg Ercolano
521a5ef17c Fixes STR #3527: Fl_Tree small drags on open/close icons change selection 2019-08-24 23:07:21 -07:00
ManoloFLTK
1b77967823 Add check useful with macOS 10.15 public beta (Catalina). 2019-08-23 14:17:06 +02:00
Greg Ercolano
7e656413ff Added simple "draw an 'X'" example. 2019-08-22 12:15:41 -07:00
ManoloFLTK
33eb87940d Fix a case when fl_read_window() did not capture subwindows correctly.
The case was under macOS with a non-GL parent window mapped to a retina display
containing a GL subwindow and if the app did not call Fl::use_high_res_GL(1).
2019-08-21 12:01:51 +02:00
Greg Ercolano
5255640e7a Added table-with-right-column-stretch-fit.cxx example 2019-08-20 06:34:09 -07:00
ManoloFLTK
e16eea32be Avoid repetition of the same multiplication. 2019-08-19 09:34:42 +02:00
ManoloFLTK
8c39007b26 Improved implementation of layer-backed views under macOS ≥ 10.14
This new implementation does all screen drawing through the drawRect: method.
The benefit is that [[NSGraphicsContext currentContext] CGContext] provides
a system-built drawing context whose product ultimately appears on screen.
Feed-back from the fldigi FLTK application shows that this procedure is
measurably faster that the previous one when drawing a rapidly changing image.
2019-08-18 21:56:12 +02:00
Greg Ercolano
8070d645a9 Merge branch 'master' of github.com:fltk/fltk 2019-08-14 12:13:28 -07:00
Greg Ercolano
e3042481ee Added new example code: howto-remap-numpad-keyboard-keys.cxx 2019-08-14 12:11:38 -07:00
Albrecht Schlosser
292739664f Support copy function in Fl_Color_Chooser
Users can press ctrl-c (or ctrl-x) while using the fl_color_chooser()
function or the Fl_Color_Chooser widget to copy the current color
selection to the clipboard.
2019-08-12 19:07:28 +02:00
ManoloFLTK
716e7b18f3 Better definition of 'struct dirent' for the MinGW32 compiler 2019-08-04 09:35:42 +02:00
Albrecht Schlosser
84c5523f99 Restore "silent" compilation of examples
'.SILENT:' statement had been commented out in previous commit.
2019-07-28 18:22:57 +02:00
Greg Ercolano
9e4c207e27 Added example images for Fl_[Hold/Multi]_Browser 2019-07-26 13:32:18 -07:00
Greg Ercolano
6046da2992 Added new browser-simple.cxx example 2019-07-26 13:07:36 -07:00
Greg Ercolano
a51012db9b Modified indent + bracing for author's example code 2019-07-26 12:18:52 -07:00