Commit Graph

8611 Commits

Author SHA1 Message Date
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
Greg Ercolano
c03583a8bc Add small code example, moved widget screenshot higher on doc page 2019-07-26 12:14:49 -07:00
ManoloFLTK
8c7b7eea4b Fl_Copy_Surface: more detailed Doxygen description. 2019-07-20 08:59:15 +02:00
ManoloFLTK
f20c07d757 X11: support copy/paste of image via clipboard within a single app
X11 requires to process differently paste if both copy and paste are within the
same app or are in 2 separate apps. This was implemented for paste of text.
It's now also implemented for paste of image.
2019-07-18 17:46:10 +02:00
ManoloFLTK
3679dd5fbd Fl_GDI_Copy_Surface_Driver: add BITMAP version of graphics to clipboard
When copying graphical data to the clipboard with Fl_Copy_Surface,
both a vectorial and a bitmap versions of the graphics are copied.
2019-07-18 17:11:03 +02:00
ManoloFLTK
af5fb2aeb3 Fl_WinAPI_Printer_Driver::end_page(): make sure rotation stops when the page ends 2019-07-13 19:50:46 +02:00
ManoloFLTK
58dad3bda2 Fl_Quartz_Copy_Surface_Driver: minor code reorganisation. 2019-07-08 08:56:07 +02:00
ManoloFLTK
3c41e2d372 Correct guard for adequate version of macOS SDK 2019-07-06 09:22:06 +02:00
ManoloFLTK
71faa15432 Add support for macOS 10.15 "Catalina"
This is relatively to Catalina public beta for now.
2019-07-06 09:16:39 +02:00
Albrecht Schlosser
a7c9fd88b3 Fix a subtle bug in Fl_Menu_::menu_end()
This bug could cause memory allocation/free errors and eventually
cause a crash.
2019-07-03 17:35:03 +02:00
ManoloFLTK
ef1c937606 Fix a bug appeared in macOS 10.15 Catalina Beta about GUI scaling transient window.
The bug is that the app freezes for a few seconds before the yellow transient window is closed
if the close message is set from within a timer callback.
If the window to close returns NO to the canBecomeKeyWindow message, the bug does not occur.
Anyway it's good that canBecomeKeyWindow returns NO for a window with the OUTPUT flag.
2019-07-03 15:21:31 +02:00
Albrecht Schlosser
a46060495d Update CMake README file for cross compilation
Add linker flags to create "native" Windows executables.
2019-07-03 13:41:42 +02:00
ManoloFLTK
6b03d4a913 Prepare for support of macOS 10.15 Catalina
Drawing the window titlebar to a PDF context does not work with Catalina Beta.
2019-06-29 23:32:30 +02:00
Albrecht Schlosser
42b8cb7bb8 Add method Fl_Menu_::menu_end() (STR 3523)
This method can be called after all menu modifications to make sure
the menu() array is relocated (copied from the internal working area)
to a private place owned by the Fl_Menu_ instance.

menu_end() is now called in Fl_Menu_Button::popup() to make sure
the menu array is in private storage.

This fixes STR 3523 w/o user code changes. Calling menu_end() is
in most cases optional.

Todo: call menu_end() where useful (or necessary), e.g. in
  Fl_Choice, Fl_Menu_Bar, etc. ?
2019-06-27 16:04:03 +02:00
Albrecht Schlosser
44b2b7126c Update dependency system
Try to make `make depend' independent of locale.
2019-06-22 23:42:39 +02:00
Greg Ercolano
d31b89798f Fix missing quotes in CMakeLists.txt change. 2019-06-22 09:50:10 -07:00
Greg Ercolano
5592996ed3 Small fix for build error caught by git's build system. 2019-06-22 09:36:26 -07:00
Greg Ercolano
446c707771 Additional Makefile rules and source files for issue #29.
This adds source png and xcf files for checkers pieces.
Also adds Makefile rules using xxd to convert .png -> .h as requested by Albrecht
in issue #29, (hmm, no comment numbers github?)..message dated "June 22nd 2019 4:22am PDT".
2019-06-22 09:18:37 -07:00
Greg Ercolano
c9c51dbc48 Fix issue #29: Updated buggy/ugly checkers piece icons
OP noticed our one-bit xbm images demonstrated an X11 driver bug
on certain hardware. While it's good that our test programs show the bug
(e.g. test/bitmap), it's bad that our games do.

Removed the 16 xbm files used by checkers which simulated transparency
with dithered images, and replaced with 4 "hexdump" png files that are
cleaner/simpler looking for such lores pieces (46x46 pixels).

Will follow up with a separate commit for the source .png and gimp .xcf
file I used for making the pieces.
2019-06-22 09:02:06 -07:00
ManoloFLTK
35376256e2 Simpler list of virtual member functions of Fl_Gl_Window_Driver 2019-06-21 21:47:00 +02:00
ManoloFLTK
71f645a6ed Fix building for Windows platform when HAVE_GL_OVERLAY is set to 1 2019-06-19 13:11:09 +02:00
ManoloFLTK
8e6ba19e3e Rename variable from txt_buf to alpha_buf 2019-06-19 08:04:48 +02:00
Albrecht Schlosser
fb3479aff2 Avoid "uninitialized memory" error in gl_draw
As discussed in fltk.general, valgrind reported errors when gl_draw()
is called and the text is converted to a texture (i.e. when testing
whether the texture already exists).

We need a length check to make sure we don't overrun text buffers.

See threads "gl_draw" and "gl_draw - [General Use]", respectively,
started on Jun 19, 2019.
2019-06-18 17:49:49 +02:00