Commit Graph

8585 Commits

Author SHA1 Message Date
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
ManoloFLTK
23484c30a9 Slightly simpler Fl_WinAPI_Screen_Driver::init() 2019-06-18 13:35:39 +02:00
ManoloFLTK
643533b4b8 Windows platform: resize all windows after screen configuration events 2019-06-16 23:41:51 +02:00
ManoloFLTK
62bce5b50a Make FLTK Windows apps "Per-Monitor-V2 DPI Aware"
Per-Monitor V2 awareness mode is supported on Windows 10 1703 or above
and has window title bars correctly scaled on HighDPI screens.
Before this commit, FLTK Windows apps were "Per-Monitor-V1 DPI Aware".

FLTK apps detect at run-time whether the V2 mode is possible.
2019-06-16 12:00:38 +02:00
ManoloFLTK
aa9f0a6962 Move Fl_Cocoa_Window_Driver::capture_titlebar_and_borders() to Fl_Cocoa_Window_Driver.cxx from Fl_cocoa.mm 2019-06-12 10:02:11 +02:00
ManoloFLTK
b238ec26e5 Fix Fl_WinAPI_Window_Driver::capture_titlebar_and_borders() when window titlebar is partially out of screen 2019-06-11 18:51:10 +02:00
Greg Ercolano
fe08c686be Last commit typo: latex docs fix 2019-06-06 11:14:08 -07:00
Greg Ercolano
bca3ae0b17 Added example for mac Application -> Preferences 2019-06-06 11:09:29 -07:00
ManoloFLTK
94fffb701c Add one argument to Fl_Screen_Driver::read_win_rectangle()
The new argument gives the window to be captured, or NULL to indicate capture
from the current offscreen.
Calling this function becomes easier because less dependent on global variables.
2019-06-06 18:28:49 +02:00
ManoloFLTK
50b1c08780 Merge remote-tracking branch 'origin/master' 2019-06-06 17:41:56 +02:00
ManoloFLTK
228f1105ac Fix in Fl_Xlib_Graphics_Driver::font_unscaled() necessary when changing drawing surfaces 2019-06-06 17:41:14 +02:00
Albrecht Schlosser
c5cc558d6f Fix typo in CMake macro FL_ADD_LIBRARY 2019-06-04 18:21:04 +02:00
ManoloFLTK
5ab26a17b0 Better use of the did_view_resolution_change message sent to FLViewLayer 2019-06-03 21:09:03 +02:00
ManoloFLTK
ad1747008c X11+Pango: fix case when function pango_font_get_glyph_extents() fails 2019-06-03 17:22:30 +02:00
ManoloFLTK
cb2d9c1212 X11+Pango: font names visible in the fonts and utf8 apps are usable for Fl::set_font(Fl_Font, const char*) 2019-06-02 17:19:35 +02:00
ManoloFLTK
e6bccc081f X11+Pango: call pango_font_description_from_string() less often
Previously, each time fl_font(fnum, fsize) was called, functions
pango_font_description_free() and pango_font_description_from_string()
would be called.

Now, pango_font_description_from_string() is called only once, the first time
an Fl_Font is used.
2019-05-30 15:28:08 +02:00
ManoloFLTK
7c4239915f Fix Fl_X11_Window_Driver::capture_titlebar_and_borders() for scaled, partially visible windows 2019-05-27 13:36:29 +02:00
ManoloFLTK
2cbc743c6a Slightly simplify Fl_X11_Window_Driver::capture_titlebar_and_borders() 2019-05-25 18:43:08 +02:00
ManoloFLTK
a471c67f67 Add default argument values to reimplementations of Fl_Widget_Surface::draw_decorated_window 2019-05-25 18:39:26 +02:00
ManoloFLTK
efbd60cb12 Restore the value of global variable fl_window 2019-05-25 17:43:18 +02:00
ManoloFLTK
fce4923212 Merge remote-tracking branch 'origin/master' 2019-05-25 11:59:48 +02:00
ManoloFLTK
0d3a374396 Call virtual member Fl_Surface_Device::end_current() when necessary
Rename member function Fl_Surface_Device::end_current_() to end_current(),
set it protected, and make it called by the destructor of all classes
derived from Fl_Surface_Device that re-implement end_current().
This way, end_current() runs equally if Fl_Surface_Device()::pop_current()
is called before or after the drawing surface is deleted.
2019-05-25 11:59:16 +02:00
Albrecht Schlosser
f711bb7cfc Fix version of removal of deprecated method
Removal of methods breaks the ABI, hence we need to wait until 1.5.0
2019-05-25 11:32:37 +02:00
ManoloFLTK
bf50352afe Remove Fl_Copy_Surface_Driver::draw_decorated_window() that is unnecessary 2019-05-24 14:05:41 +02:00
ManoloFLTK
084c30381d Fix Fl_Cocoa_Printer_Driver::draw_decorated_window() for GUI scaling - cont'd 2019-05-23 21:32:27 +02:00
ManoloFLTK
44baf1d978 Merge remote-tracking branch 'origin/master' 2019-05-23 16:21:39 +02:00
ManoloFLTK
294875058d Fix Fl_Cocoa_Printer_Driver::draw_decorated_window for scaled GUI.
Support for scaled GUI was missing when the window titlebar is not layer-based.
2019-05-23 16:21:21 +02:00