Commit Graph

6354 Commits

Author SHA1 Message Date
Manolo Gouy
511ec0bb3d Mac OS: have Fl_Paged_Device::print_widget() print top-level windows with
rounded bottom corners as they appear on screen.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10916 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-19 16:33:44 +00:00
Manolo Gouy
0d2517331c Mac OS only: simpler definition of the pdfdata private member of the Fl_Copy_Surface class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10915 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-18 15:53:46 +00:00
Manolo Gouy
364dfaf802 Mac OS. This simpler algorithm is just as good: remove the constraint
altogether for subwindows; keep it unchanged for windows.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10913 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-16 16:48:01 +00:00
Manolo Gouy
31c9c98434 Corrected typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10912 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-16 08:59:33 +00:00
Manolo Gouy
535b477e7c Mac OS: with OS 10.11, the (green) window maximize button turns the window fullscreen so
it covers the dock and the system menu bar. The default behavior of a subwindow of such
a fullscreen window is to be prevented to cover the menu bar (which makes not much sense 
because this bar is covered by the main window). If the location of the subwindow within
its parent window expected by FLTK would have it cover the menu bar, Mac OS moves
it down. The subwindow therefore does not lie where FLTK wants it.
This patch overrides the adequate method of the NSWindow class to prevent this bad behavior.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10911 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-16 08:47:18 +00:00
Manolo Gouy
c319e9bcc9 Fixed typo in Doxygen doc.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10910 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-16 05:34:38 +00:00
Manolo Gouy
ebffeb8edd Mac OS: Added necessary check because a non-FLTK window can be found
as child of an FLTK window when turning a window full-screen.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10909 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-15 10:45:59 +00:00
Manolo Gouy
ba26f2c194 Mac OS X: simplified code for moving and resizing subwindows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10908 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-13 10:55:38 +00:00
Manolo Gouy
647821fa71 Mac OS X: with OS 10.11 "El Capitan" window capture returns an ARGB image (it used to return RGBA)
whereas OpenGL window capture returns RGBA as before. Capturing a window with subwindow(s)
requires ARGB <--> RGBA conversion when Quartz and OpenGL windows are mixed.
The OpenGL-inside-Quartz case was taken care of before.
Here, the Quartz-inside-OpenGL case is properly handled.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10900 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-11 07:46:15 +00:00
Manolo Gouy
68f3cc6d88 Mac OS X: added checks that subwindows do not leak out of
enclosing window when they are programmatically resized or moved.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10899 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-10 06:39:37 +00:00
Manolo Gouy
f00901534a Mac OS: fixed bad window resizing when presence of sub-sub-window and window
resized by top border.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10898 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-09 10:25:16 +00:00
Manolo Gouy
4ad9e7c6b8 Mac OS: improved control that subwindows do not leak outside their parent
after window resize.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10893 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-08 19:00:17 +00:00
Manolo Gouy
8a4acc5b05 Mac OS only.
Allow proper initial display of a subwindow-containing window in iconized state
(previously, the subwindow was not displayed in the icon).
Also fixes a problem with subwindows when the screen resolution was changed
while the window was iconized.
Tested with Mac OS 10.11, 10.6 and 10.3.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10891 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-07 17:20:33 +00:00
Albrecht Schlosser
144c656360 Fixed missing image release as described in STR #2840.
Thanks to OP (Nikego) and Matt!


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10888 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-07 00:11:45 +00:00
Manolo Gouy
da6dff26fc Changed Fl_Multi_Browser behaviour on the Mac OS platform so multiple selection
is done by cmd-click rather than ctrl-click, as is expected on this platform.
Also, updated the documentation to describe the effects of ctrl-, shift- and cmd-clicks.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10882 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-05 17:54:16 +00:00
Albrecht Schlosser
d7d57f9113 Fixed copyright year, updated CHANGES.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10881 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-03 15:45:41 +00:00
Albrecht Schlosser
2aae73febc Fix out-of-bounds memory access in fluid (STR #3263).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10880 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-03 15:08:54 +00:00
Manolo Gouy
2f7e5487b2 Added OpenGL 3 support in 1.3.4
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10879 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-03 14:51:55 +00:00
Manolo Gouy
1c16aaced2 The ATSU API (old API for text formatting) has been removed from SDK 10.11.
This fixes STR#3262

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10878 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-03 14:36:36 +00:00
Manolo Gouy
848744bcf0 Removed compilation warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10877 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-28 05:43:38 +00:00
Manolo Gouy
7e025aac22 Added support for OpenGL V3 and higher.
On the X11/MSWindows platforms, this requires external installation of the GLEW library.
This fixes STR#3198 and STR#3257.
Added two new examples programs.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10876 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-27 08:40:56 +00:00
Albrecht Schlosser
43e4f8a661 Fix doxygen comment of Fl::abi_check()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10875 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-24 09:55:18 +00:00
Ian MacArthur
5fdf556251 Revised documentation for using FLTK with
multithreaded programs.

Per STR 3223



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10874 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-23 21:10:36 +00:00
Manolo Gouy
04d0d5f6be Documentation: explicit what #include commands are needed to use
the Fl_Gl_Window::mode(int *) method.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10873 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-21 17:13:11 +00:00
Manolo Gouy
1095d4db41 Mac OS and SDK 10.3: #define's necessary for gl_draw.cxx are better in the library source
than in the public header file FL/gl.h

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10872 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-21 14:37:27 +00:00
Manolo Gouy
6fc9f11eb2 Doc: use plural with 'data'.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10871 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-21 06:12:32 +00:00
Manolo Gouy
accbfd9f66 More careful coding that does not read beyond the end of the image data
when an ARGB system image is converted to the RGBA format.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10870 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-20 14:53:37 +00:00
Manolo Gouy
57e603e6bc More detailed comment.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10869 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-19 14:41:24 +00:00
Manolo Gouy
07e37d23d5 Added message about Fl_Image_Surface.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10868 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-19 13:16:04 +00:00
Manolo Gouy
3d5a8e5588 Added several items since FLTK 1.3.3 was released.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10867 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-19 12:11:48 +00:00
Manolo Gouy
430636e91d X11: fix crash when creating an Fl_Image_Surface object before fl_open_display() but after Fl::visual().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10866 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-24 08:04:07 +00:00
Manolo Gouy
fe61175546 Mac OS: fixed the Fl_Image_Surface class that produced flipped images when
the app draws directly to it, without using Fl_Image_Surface::draw(Fl_Widget*, int, int).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10865 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-23 13:51:42 +00:00
Manolo Gouy
2af2d88dce Mac OS: slightly simpler code for Fl_Image_Surface class.
The new code does not call fl_begin_offscreen() in set_current().
That is safer because there is not always a matching fl_end_offscreen().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-23 05:16:57 +00:00
Manolo Gouy
2dd9d06818 Make sure the FLTK and the system keep their representations of window coordinates synchronized.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10863 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-22 05:43:37 +00:00
Manolo Gouy
a3b43d569c Documentation: added warning that Fl_Gl_Window::mode(const int * a), although public, is
subject to change, and that Fl_Gl_Window::mode(int a) is the adequate stable API.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10862 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-18 15:29:30 +00:00
Manolo Gouy
bf5822bb8b Mac OS: slightly simpler code that does just the same thing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10861 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-10 14:53:16 +00:00
Manolo Gouy
157eb68eae Mac OS: 1) simpler tracking of window changes between retina/non retina displays.
2) improved window creation in iconized state (child windows still don't show in icon, though).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10860 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-10 13:09:38 +00:00
Manolo Gouy
fa9880e7fe The Fl_Gl_Window public API offers 2 ways to control the OpenGL capabilities of a window:
1) Fl_Gl_Window::mode(int m) is platform-independent and uses an argument containing bit flags
(e.g., FL_DOUBLE, FL_RGB8) to express desired capabilities. The m argument is assigned to
the mode_ private member variable of the Fl_Gl_Window object.
2) Fl_Gl_Window::mode(const int *a) is highly platform-dependent. It uses a zero-ending
array of attributes or attribute-value pairs to express capabilities. This member function
can be used on the X11 and the Mac OS platforms, but not with MSWindows.
Before this patch, the mode_ private member variable of the Fl_Gl_Window object
is assigned 0 by this member function.

The Fl_Gl_Window::flush() member function tests whether the FL_DOUBLE flag
is ON in the mode_ variable, and changes code path accordingly. Therefore,
the second API to control OpenGL capabilities fails when a double-buffered
GL context is required, because the code path followed by Fl_Gl_Window::flush() 
does not match the GL context requirements.

With this patch,  Fl_Gl_Window::mode(const int *a) scans the content of its 
array argument, and sets the FL_DOUBLE bit of the mode_ member variable
if the array requires a double-buffered GL context.

This patch does that for the X11 platform. The same was introduced for the
Mac OS platform at r. 10854.  The MSWindows platform does not use the
Fl_Gl_Window::mode(const int *a) API.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10859 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-08 11:43:48 +00:00
Manolo Gouy
a650237edf Moved a few Mac-specific lines from Fl_Gl_Window::show() to Fl_Gl_Window::mode()
where it is more easily understood.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10858 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-07 15:52:41 +00:00
Manolo Gouy
d7094249f0 Documentation: better descriptions of Fl_Gl_Window::mode() and Fl_Gl_Window::can_do().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10857 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-07 15:48:55 +00:00
Manolo Gouy
1e1f1c33bd Mac OS: added missing cast required by some compilers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10856 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-07 10:45:00 +00:00
Manolo Gouy
60ad983b4e Mac OS: properly handle OpenGL profile requests independently from what SDK version is used at compile time.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10855 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-07 09:26:19 +00:00
Manolo Gouy
34beb4c4dd Mac OS X: restored the possibility to set a GL context mode with the
Fl_Gl_Window::(const int *a) member function that uses a zero-ending
array of system-dependent attributes.
This procedure failed whenever a double buffer was asked for.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10854 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-07 05:52:17 +00:00
Manolo Gouy
dc01deda00 Mac OS platform: Allow compilation of user code with non-Apple compiler.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10853 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-05 15:36:28 +00:00
Manolo Gouy
6242bf0513 Extended Mac OS support of gl_draw() functions to old Apple hardware that does not
implement the GL_EXT_texture_rectangle extension.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10852 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-03 17:29:25 +00:00
Albrecht Schlosser
298c734201 Fix typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10851 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-01 15:15:21 +00:00
Albrecht Schlosser
d99d22cf91 Fix confusing argument value to fl_measure() in tooltip handling.
The argument 'draw_symbols' was inconsistently set with the intended
tooltip label alignment. This was confusing, but didn't do any harm
since the value was != 0 anyway.

Also added the 'image' and 'draw_symbols' argument to fl_draw() call.
Defined static constant draw_symbols_ for potential later inclusion in
Fl_Tooltip class and code clarification.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10850 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-01 14:27:45 +00:00
Manolo Gouy
e31c8cd758 Mac OS: Use the more standard GL_TEXTURE_RECTANGLE_ARB
extension name instead of old GL_TEXTURE_RECTANGLE_EXT.
Also, use the GL_BGRA format that is preferred for GL textures, 
according to "Optimal Data Formats and Types" from 
"Best Practices for Working with Texture Data".

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10849 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-31 16:59:10 +00:00
Manolo Gouy
feab968e26 Improved use of the gl_texture_reset() function:
it is necessary only if all GL windows have been deleted.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10848 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-31 16:43:41 +00:00
Manolo Gouy
529927e0b8 Fixed bug in Mac OS version of gl_draw() that could produce truncated strings.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10847 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-29 07:04:08 +00:00