summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-12-07Mac OS: removed some code that was duplicated by checkSubwindowFrame run later.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10950 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-03Removed compilation warning with SDKs 10.3 and 10.4uManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10948 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-02Mac OS: send the setWantsBestResolutionOpenGLSurface:YES message in Manolo Gouy
Fl_X::create_GLcontext_for_window() where it is directly relevant. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10947 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-02Mac OS: support for high resolution OpenGL windows.Manolo Gouy
Methods Fl::event_x_pixel() and Fl::event_y_pixel() committed at r.10941 are removed. Instead method Fl_Gl_Window::pixels_per_unit() is added. The documentation explains in more detail how to write cross-platform FLTK code supporting high resolution OpenGL windows on retina displays. The examples/OpenGL3test.cxx app exercises Fl_Gl_Window::pixels_per_unit(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10945 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-12-01Mac OS: added Fl::event_x_pixel() and Fl::event_y_pixel() that return the ↵Manolo Gouy
mouse event position in pixel units that differ from FLTK units for OpenGL windows mapped to a retina display. On non Mac OS platforms, these are synonyms of Fl::event_x() and Fl::event_y(). The example/OpenGL3test demo program is modified to call these new functions. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10941 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-30Mac OS: fixed possible crash when closing fullscreen GL window with close ↵Manolo Gouy
button of title bar. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10937 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-30Mac OS: allow calling Fl_Gl_Window::pixel_w() before the window is shown.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-28Mac OS: support standard Mac OS localization procedure for system menu items.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10935 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-26Mac OS only: added the Fl_Mac_App_Menu::custom_application_menu_items() methodManolo Gouy
that allows customization of the application menu on the Mac platform. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10932 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-24Added new method Fl_Copy_Surface::draw_decorated_window()Manolo Gouy
that copies a window to the clipboard together with its title bar and borders. This requires very little new code because the capture of window decorations is shared with the Fl_Paged_Device::print window() method. The device test program is changed to call the new method. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10928 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-23WIN32: fixed printing of window borders and title bar on Windows 10Manolo Gouy
by Fl_Paged_Device::print_window(). The GetWindowRect() function gives inadequate results on Windows 10. DwmGetWindowAttributes() from dwmapi.dll gives adequate results. This new function is dynamically loaded at run-time, when dwmapi.dll is available. On Windows XP, dwmapi.dll is not available. On Windows 7, DwmGetWindowAttributes() returns with error, so GetWindowRect() is used. On Windows 10, DwmGetWindowAttributes() computes the correct window full rectangle. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10921 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-19Mac OS: have Fl_Paged_Device::print_widget() print top-level windows with Manolo Gouy
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-16Mac OS. This simpler algorithm is just as good: remove the constraintManolo Gouy
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-16Corrected typo.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10912 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-16Mac OS: with OS 10.11, the (green) window maximize button turns the window ↵Manolo Gouy
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-16Fixed typo in Doxygen doc.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10910 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-15Mac OS: Added necessary check because a non-FLTK window can be found Manolo Gouy
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-13Mac OS X: simplified code for moving and resizing subwindows.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10908 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-11Mac OS X: with OS 10.11 "El Capitan" window capture returns an ARGB image ↵Manolo Gouy
(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-10Mac OS X: added checks that subwindows do not leak out ofManolo Gouy
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-09Mac OS: fixed bad window resizing when presence of sub-sub-window and windowManolo Gouy
resized by top border. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10898 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-08Mac OS: improved control that subwindows do not leak outside their parentManolo Gouy
after window resize. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10893 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-07Mac OS only.Manolo Gouy
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-05Changed Fl_Multi_Browser behaviour on the Mac OS platform so multiple selectionManolo Gouy
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-03The ATSU API (old API for text formatting) has been removed from SDK 10.11.Manolo Gouy
This fixes STR#3262 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10878 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-10-27Added support for OpenGL V3 and higher.Manolo Gouy
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-21Mac OS and SDK 10.3: #define's necessary for gl_draw.cxx are better in the ↵Manolo Gouy
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-20More careful coding that does not read beyond the end of the image dataManolo Gouy
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-19More detailed comment.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10869 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-24X11: fix crash when creating an Fl_Image_Surface object before ↵Manolo Gouy
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-23Mac OS: fixed the Fl_Image_Surface class that produced flipped images when Manolo Gouy
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-23Mac OS: slightly simpler code for Fl_Image_Surface class. Manolo Gouy
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-22Make sure the FLTK and the system keep their representations of window ↵Manolo Gouy
coordinates synchronized. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10863 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-10Mac OS: slightly simpler code that does just the same thing.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10861 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-10Mac OS: 1) simpler tracking of window changes between retina/non retina ↵Manolo Gouy
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-08The Fl_Gl_Window public API offers 2 ways to control the OpenGL capabilities ↵Manolo Gouy
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-07Moved a few Mac-specific lines from Fl_Gl_Window::show() to Fl_Gl_Window::mode()Manolo Gouy
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-07Mac OS: added missing cast required by some compilers.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10856 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-09-07Mac OS: properly handle OpenGL profile requests independently from what SDK ↵Manolo Gouy
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-07Mac OS X: restored the possibility to set a GL context mode with theManolo Gouy
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-03Extended Mac OS support of gl_draw() functions to old Apple hardware that ↵Manolo Gouy
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-01Fix confusing argument value to fl_measure() in tooltip handling.Albrecht Schlosser
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-08-31Mac OS: Use the more standard GL_TEXTURE_RECTANGLE_ARB Manolo Gouy
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-31Improved use of the gl_texture_reset() function:Manolo Gouy
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-29Fixed bug in Mac OS version of gl_draw() that could produce truncated strings.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10847 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-28Moved Mac-specific type declaration to mac.HManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10846 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-27Removed the global variable inputContext_SEL.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-27Programs compiled with pre-10.7 SDKs can now fully use retina displays.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10844 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-27Improved handling of differences between OS versions in text input.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10843 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-25Fix potential Windows GDI leak (STR #3254).Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10842 ea41ed52-d2ee-0310-a9c1-e6b18d33e121