Commit Graph

414 Commits

Author SHA1 Message Date
Manolo Gouy
c90f1904fa Mac OS text input: fixed minor problem when typing cmd-key while there's marked text.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10037 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-12-20 18:29:02 +00:00
Manolo Gouy
c65852122c Added informative comment to Fl_Paged_Device::print_window()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10028 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-12-11 14:31:27 +00:00
Manolo Gouy
0e8f2f786b Removed use of deprecated NSStringPboardType constant.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10025 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-12-10 12:07:09 +00:00
Manolo Gouy
b11af6e5e1 Simplified the code that supports application opening by dropping file onto icon.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10024 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-12-09 12:12:26 +00:00
Manolo Gouy
076de1c617 Improved window printing by using a vectorial font for the window title.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10023 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-12-08 16:16:24 +00:00
Manolo Gouy
1f6585c15a The FLView object is now released just after the setContentView message is sent.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10022 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-11-30 21:50:00 +00:00
Manolo Gouy
05dd61d4ee Fix STR#3010: Program can crash under Mac OS when a dialog window is closed
if the opening of this dialog window made the previous window to be redrawn.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10021 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-11-29 18:14:49 +00:00
Manolo Gouy
6b67e50cbe Bracket calls to timer callbacks with fl_lock_function()/fl_unlock_function() as occurs under WIN32 and X11.
This was also missing in the FLTK 1.1 carbon version.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10019 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-11-13 15:49:48 +00:00
Manolo Gouy
1ad6b09de7 Fix mac-specific STR#2999. Use PostScript font name to ask the system for a font, and full font name
to display a font name.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10011 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-10-29 12:46:51 +00:00
Manolo Gouy
4827a696df Modified Fl_Paged_Device::print_window() so it works with any kind of Fl_Paged_Device instance.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10007 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-10-23 14:39:14 +00:00
Manolo Gouy
ce0e298a8a Removed some of the warnings mentioned in [fltk.coredev] New warnings with FLTK 1.3.x svn r9991
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9993 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-25 08:55:01 +00:00
Manolo Gouy
99f2010dce Remove errors with the Apple LLVM version 4.2 compiler.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9991 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-24 16:25:29 +00:00
Manolo Gouy
1029debb66 Clarification of change in constant used for text-containing pasteboards across Mac OS versions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-24 08:27:10 +00:00
Manolo Gouy
3d7d2938c7 Fixes the copy/paste implementation to run on many Mac OS versions.
Checked on 10.3, 10.5, 10.6 and 10.8

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9986 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-23 19:00:15 +00:00
Manolo Gouy
cedcc3f52e Fixed implementation of paste with NSPasteboard that did not work well under Mac OS 10.5
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9985 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-23 15:01:54 +00:00
Manolo Gouy
3baf5e0d58 Implemented copy/paste with Cocoa's NSPasteboard instead of Core Foundation's Pasteboard Manager
which allows quite simpler code.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9975 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-12 12:21:57 +00:00
Pierre Ossman
1d6cc80d59 STR 2636. Add ability to get notifications whenever the
clipboard changes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9974 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-11 12:54:40 +00:00
Manolo Gouy
65226e073e Fixed typo in comments.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9968 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-06 09:24:28 +00:00
Manolo Gouy
bc17e8c6f9 Removed linkage with undocumented function CPSEnableForegroundOperation() used to support
Mac OS 10.2 or below. This made no sense because the Copy/Paste implementation requires Mac OS 10.3.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9964 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-05 09:12:35 +00:00
Manolo Gouy
cc68c2e43c Copy directly pasteboard data when pasting if it's UTF-8 encoded.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9962 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-04 14:39:59 +00:00
Manolo Gouy
0585de060c Added fl_lock/unlock_function() calls for extra caution in - (void)applicationDidChangeScreenParameters:
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9959 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-04 09:30:18 +00:00
Manolo Gouy
12fbd8b6b4 Mac OS X text input: stop sending the FL_PASTE event after character palette events;
send instead FL_KEYBOARD as for regular text input. Fl::event_key() will return 0 during
palette events.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9927 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-05-29 09:12:38 +00:00
Manolo Gouy
110cd81b1e Call [NSWindow setRestorable:NO] for each FLTK window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9910 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-05-08 13:11:56 +00:00
Manolo Gouy
a2d821cc2e Use the [NSimage initWithCGImage:size:] message when possible.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9907 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-30 08:56:28 +00:00
Manolo Gouy
076eb8679f Changed © (copyright) date to 2013.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9898 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-26 14:15:25 +00:00
Manolo Gouy
c4494a94a7 Cosmetic improvement of image used when dragging non-text data.
Minimum OS version has been verified.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9892 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-19 09:20:56 +00:00
Manolo Gouy
53e2e603d0 Cosmetic improvement of image used when dragging non-text data.
Minimum OS version still has to be verified.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9891 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-18 16:15:59 +00:00
Manolo Gouy
6b69461ea9 Renamed src/Fl_Sys_Menu_Bar.cxx to src/Fl_Sys_Menu_Bar.mm because objective-c code is used.
Some code is transferred from Fl_cocoa.mm thus reducing somewhat this very large source file.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9885 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-16 14:02:42 +00:00
Manolo Gouy
850bda435b Removed processing of obsolete deadkey flag.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9882 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-15 13:34:46 +00:00
Manolo Gouy
4c97f14e88 Reduced the usage of global variables.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9878 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-15 11:00:24 +00:00
Manolo Gouy
42cc953b0b Mac OS text input: fixed processing of dead key followed by non-text key.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9817 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-02-09 13:54:58 +00:00
Manolo Gouy
914e7f9b09 Mac OS text input: removed the Fl::marked_text_length() function that's not necessary.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9816 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-02-08 11:58:19 +00:00
Manolo Gouy
b22744aac0 Mac OS text input: a single FL_KEYBOARD event is now sent when processing dead keys.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9812 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-02-02 15:46:00 +00:00
Manolo Gouy
49f8a3cfc9 Fix STR#2928: alt+e on US keyboard not processed correctly as shortcut on Mac OS.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9811 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-28 21:05:29 +00:00
Manolo Gouy
834c714f26 Mac OS: added support for internationalization of the application menu.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9809 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-25 16:28:49 +00:00
Manolo Gouy
b5a9c5218a Mac OS: changed memory allocation style of static NSBitmapImageRep* rect_to_NSBitmapImageRep().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9805 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-20 16:54:23 +00:00
Manolo Gouy
161bdb8973 Mac OS: fixed a crash when printing window with OS 10.5
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9804 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-19 14:07:34 +00:00
Manolo Gouy
511c14e47d Mac OS: fixed processing of system menu shortcuts that had been partly damaged in r.9799,
and fixed application menu with OS <= 10.3 that was duplicated.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9803 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-19 09:49:33 +00:00
Manolo Gouy
b08f91e529 r.9800 was a bad move; going back.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9801 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-18 17:12:39 +00:00
Manolo Gouy
a0ef82b7dc Simplification of the - (BOOL)[FLView performKeyEquivalent:(NSEvent*)theEvent] method.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9800 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-18 16:34:58 +00:00
Manolo Gouy
81da29ff12 Mac OS: reorganized the text input handling code. Added a detailed description of what the code does
for this rather complex issue in comments.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9799 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-17 17:40:53 +00:00
Manolo Gouy
9e67096dbb Mac OS: added support for the text input feature introduced in OS 10.7 "Lion" where pressing and holding
some key opens a window with possible accented characters: added [NSView windowLevel] useful for
fullscreen windows.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9793 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-14 09:07:34 +00:00
Manolo Gouy
482c4a5e0a Mac OS: added support for the text input feature introduced in OS 10.7 "Lion" where pressing and holding
some key opens a window with possible accented characters. This feature is used by the Fl_Input_ and
Fl_Text_Editor widgets. User-defined text input widgets can optionally use this feature, but the default
behavior is to not use it. Fl_Secret_Input turns it off, for example.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9792 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-13 15:25:37 +00:00
Manolo Gouy
e042966ae7 About the fix for a problem apparent with the "cube" test program:
if the cube window is moved around rapidly, the GL pixels leak away from where they should be.
This problem no longer occurs with Mac OS 10.7 and above. The fix is thus made effective
only when OS < 10.7.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9790 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-10 08:57:19 +00:00
Manolo Gouy
57771e16fd Fix STR#2915 where subwindow stayed hidden after hide() and then show().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9788 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-08 21:06:29 +00:00
Manolo Gouy
31e49fcf12 Mac OS: divided the FLDelegate object in two objects, FLWindowDelegate and FLAppDelegate.
This might help mixing FLTK and other window-creating systems.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9786 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-01-07 15:56:14 +00:00
Manolo Gouy
28a85d27e9 Mac OS text input: corrected processing of arrow keys during character composition.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9777 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-26 14:02:59 +00:00
Manolo Gouy
cf672dba0d Mac OS text input: defined a small API that user-defined text editing widgets can use to signal marked text.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9774 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-24 11:45:07 +00:00
Manolo Gouy
d7a5f3f04a Mac OS text input: corrected minor issue when text widget is in a subwindow (cont'd).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9772 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-20 16:00:04 +00:00
Manolo Gouy
4ab7e91c61 Mac OS text input: corrected minor issue when text widget is in a subwindow.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9770 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-20 15:12:32 +00:00
Manolo Gouy
81c98f228b Removed compilation warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9766 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-18 16:06:56 +00:00
Manolo Gouy
a59ec3744d Mac OS text input support: use primary selection for marked text in Fl_Text_Display + some reformatting.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9763 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-18 14:24:07 +00:00
Manolo Gouy
46abc078b4 Mac OS: improved text input support with visible display of marked text in text widgets.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9761 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-17 17:44:15 +00:00
Manolo Gouy
3eb27ccf3e Mac OS text input: set marked text as selected in text widgets so user is aware of it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9759 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-16 16:04:02 +00:00
Manolo Gouy
05d20db147 Mac OS text input: Fl::compose_state is a number of bytes (not of characters).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9757 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-15 22:03:55 +00:00
Manolo Gouy
22b4198e45 Mac OS: fixed [FLView keyDown:] for OS 10.3
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9755 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-15 14:19:42 +00:00
Manolo Gouy
5a054cd1b3 Mac OS: fixed [FLView keyDown:] for OS ≤ 10.5
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9754 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-14 23:36:59 +00:00
Manolo Gouy
9a2467ebc5 MacOS: towards implementing the NSTextInput protocol to support the text input management system (cont'd).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9753 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-14 21:29:45 +00:00
Manolo Gouy
1e4165ee7b MacOS: towards implementing the NSTextInput protocol to support the text input management system.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9752 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-14 08:36:13 +00:00
Manolo Gouy
4b6613cbd2 Fix STR #2890: MacOS unbundled applications don't appear in dock nor menu bar (cont'd).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9734 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-30 18:20:36 +00:00
Manolo Gouy
4b3855f8c5 Fix STR #2890: MacOS 10.8 unbundled applications don't appear in dock nor menu bar
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9729 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-21 11:37:57 +00:00
Manolo Gouy
98d5dd690d Mac OS: make clear that image capture from screen returns an image in premultiplied RGBA format (cont'd).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9725 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-17 14:57:55 +00:00
Manolo Gouy
9adccd6df6 Mac OS: make clear that image capture from screen returns an image in premultiplied RGBA format.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9723 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-15 12:28:29 +00:00
Manolo Gouy
302200668b Fixes STR #2887: Fl_Scroll widget fails under Mac OS X 10.8 on MacBook Pro with retina display.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9721 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-15 08:30:44 +00:00
Manolo Gouy
82878a7225 Fix a Mac OS bug appeared with OS X 10.8: when a file is dragged on the application icon,
a delay of several seconds occur until the first application window opens (cont'd).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9716 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-13 09:34:54 +00:00
Manolo Gouy
e8f8434054 Fix a Mac OS bug appeared with OS X 10.8: when a file is dragged on the application icon,
a delay of several seconds occur until the first application window opens.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9715 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-12 15:57:39 +00:00
Manolo Gouy
91a300f6b6 Added missing use of NSAutoreleasePool object in calc_mac_os_version().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9688 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-09-28 08:07:47 +00:00
Manolo Gouy
74496aa2cc Removed several deprecation warnings.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9685 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-09-27 12:49:39 +00:00
Manolo Gouy
6ec40d3676 Removed deprecation warning for FSCompareFSRefs().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9684 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-09-26 14:34:02 +00:00
Manolo Gouy
7ee7973040 Fix for bug described in fltk.development "fl_scroll not copying all channels on OS X"
http://www.fltk.org/newsgroups.php?s13117+gfltk.development+v13134+T0
Sending the CGImage message to an NSBitmapImageRep object seems to be the solution
when Mac OS X >=10.5.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9680 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-09-17 09:00:22 +00:00
Manolo Gouy
27e406f751 Mac OS: some optimization of timer objects + code reordering.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9618 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-06-16 08:49:52 +00:00
Manolo Gouy
51ca904eb3 Mac OS: improved Fl::repeat_timeout() so the next scheduled timeout is counted from the previous one.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9611 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-06-15 15:08:17 +00:00
Manolo Gouy
c0e01b24da Mac OS: added necessary fl_open_display() in Fl::y() and Fl_X::screen_work_area() functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9602 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-06-14 12:41:19 +00:00
Manolo Gouy
f656c0627c Mac OS: improved behavior when unhiding an application with minimized windows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9592 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-06-13 10:46:53 +00:00
Manolo Gouy
3ce92f408f Fixed STR#2848: Mac OS: close putative memory leak when detaching child threads.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9588 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-06-12 15:36:33 +00:00
Fabien Costantini
0ab2bd9dda Added cocoa improvement inspired for from ossman improvement STR2802 for modal windows...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9407 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-28 00:46:24 +00:00
Fabien Costantini
e67e798aeb Fixed build break on FLTK_ABI_VERSION >= 10302 introduce in r9293 as extern ref to fl_copy_offscreen would not be found anymore by linker... This can't be captured yet by the Jenkins continous intergration builds as the compilation is for the FLTK_ABIVERSION >= 10302
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9406 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-28 00:42:31 +00:00
Matthias Melcher
e2d3d400cd Reverted flags in Fl_Widget to protected.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9388 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-23 20:12:06 +00:00
Manolo Gouy
37ea8ba9e6 Mac OS: canBecomeKeyWindow returns NO also for menu windows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9324 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-04 19:53:11 +00:00
Manolo Gouy
cb32ceaf4d Fix STR#2818: (Mac OS) tooltip window takes focus away from input field.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9321 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-04 16:33:09 +00:00
Manolo Gouy
08ce2e07d3 Fix STR#2641: true fullscreen windows that cover all their screen including menu bar, task bar, dock.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-23 16:47:53 +00:00
Manolo Gouy
8cd98f5236 Mac OS: Allow keyboard input with borderless windows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9294 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-22 13:58:38 +00:00
Manolo Gouy
32d4bc4099 Fix STR#2810: removed all uses of function Fl_Device::class_name().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9293 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-18 18:48:29 +00:00
Manolo Gouy
7d0b5d05cb Simplified Fl_Paged_Device::print_window() under Mac OS
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9282 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-14 08:49:36 +00:00
Manolo Gouy
f6cb583e27 Replaced fl_copy_offscreen_with_alpha() by Fl_GDI_Graphics_Driver::copy_offscreen_with_alpha() and
fl_create_offscreen_with_alpha() by Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha()

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-12 11:55:50 +00:00
Manolo Gouy
4715e1593e Use a new Fl_Quartz_Graphics_Driver or Fl_GDI_Graphics_Driver instance when printing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9276 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-12 09:39:17 +00:00
Manolo Gouy
719f72b501 Mac OS: renamed compute_macKeyLookUp() to fl_compute_macKeyLookUp().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9271 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-10 08:45:44 +00:00
Manolo Gouy
739a6f89ae Mac OS: the macKeyLookUp table is now computed at program start from the vktab table
by compute_macKeyLookUp() in file src/Fl_get_key_mac.cx

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9270 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-09 21:35:45 +00:00
Manolo Gouy
b8d34a254f Fixed the use of FL_SUBMENU_POINTER in Fl_Sys_Menu_Bar objects (cont'd).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9223 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-01-12 16:00:07 +00:00
Manolo Gouy
2d4cf9e26b Some code simplifications.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9220 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-01-12 12:49:58 +00:00
Manolo Gouy
4be97ea19c Fixed the use of FL_SUBMENU_POINTER in Fl_Sys_Menu_Bar objects (Mac OS-specific).
Modified the menubar demo program to exercise the Fl_Sys_Menu_Bar class.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9218 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-01-11 16:16:31 +00:00
Manolo Gouy
67fdcb8fa3 Fix STR #2779: clang-detected error
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9192 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-29 14:41:33 +00:00
Manolo Gouy
eab4e1f2d5 Needed after r.9181 for the Gmsh program according to its author Christophe Geuzaine
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9191 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-29 11:50:18 +00:00
Manolo Gouy
a1a9dbd961 Improved the windowShouldClose message processing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9185 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-23 09:19:39 +00:00
Manolo Gouy
d92f2d765b Mac OS: fix possible crash when closing window with a callback that deletes it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9182 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-22 14:48:47 +00:00
Manolo Gouy
1962c2b6ed Fix STR #2775. Under Mac OS, fixed some erroneous window move/resize.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9181 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-22 12:33:49 +00:00
Manolo Gouy
12a0cb308e Fix STR #2769: Mac OS crash during creation of non-modal window on secondary screen
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9177 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-14 17:10:28 +00:00
Manolo Gouy
74720fd205 Mac OS: better window positioning on secondary displays at creation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9176 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-14 15:15:03 +00:00
Manolo Gouy
409afd29cc Mac OS: more accurate definition of the Window system-specific type.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9170 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-12 13:06:54 +00:00
Manolo Gouy
0cf73d4603 Mac OS: simpler processing of window closing events.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9161 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-30 17:23:42 +00:00
Manolo Gouy
8ff32e11d6 Mac OS: fixed the setting of the key window after a window is closed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9154 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-27 19:41:54 +00:00
Manolo Gouy
353f59a0ce Mac OS: restore the focus to the top FLTK window after closing the window opened by the
"About ..." item of the application menu. This issue appeared with OS X 10.7.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9152 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-26 12:42:41 +00:00
Manolo Gouy
8c552b377d Fl_cocoa.mm: removed useless fl_screen global variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9147 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-26 09:12:33 +00:00
Manolo Gouy
81fcaed456 Mac OS: the procedure used to restore visible focus to a window after using an Fl_Native_File_Chooser
window failed under OS X 10.7. It's replaced by a simpler, OS version-independent procedure.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9144 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-22 15:12:57 +00:00
Manolo Gouy
0ba6c0e381 Simplified window positioning on main screen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9135 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-18 12:18:22 +00:00
Manolo Gouy
55b744c225 When several screens, allow creation of window on secondary screen by Fl_Window::Fl_Window(x,y,w,h,title).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9134 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-18 11:46:29 +00:00
Manolo Gouy
9f15516f5e Mac OS: don't generate an FL_SCREEN_CONFIGURATION_CHANGED event at application startup.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9131 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-12 12:38:32 +00:00
Manolo Gouy
2df4196d8b About STR#2600 : some code factorization.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9101 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30 13:09:06 +00:00
Matthias Melcher
00e8e44cf4 OSX: Fixed screen updates durin DND operations
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30 09:38:35 +00:00
Manolo Gouy
c029bba113 Fix STR#2600 for the MSWindow and Mac OS platforms.
A new event FL_SCREEN_CONFIGURATION_CHANGED is introduced.
Fl::add_handler() allows to register a callback for this event.
The unix/X11 implementation is still missing.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9087 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30 08:03:22 +00:00
Manolo Gouy
d9cda5c3aa Fix STR#2695 & 2697: correct computation of work areas with multiple screens.
This introduces 3 new functions
static void Fl::screen_work_area(X,Y,W,H)
static void Fl::screen_work_area(X,Y,W,H,mx,my)
static void Fl::screen_work_area(X,Y,W,H,screen_no)
that compute screen work areas and are used by FLTK to position menu windows.

The Fl::x(),y(),w(),h() functions are made consistent across platforms: they return
the origin/size of the work area of the main screen (as far as possible, see below).

On the Mac OS platform, all screen functions reflect changes in screen number and 
positions without requiring the application to restart.

On the X11 platform, I did not find an API to compute the main screen work area
in all conditions. What's used does compute the correct work area when there's
a single screen, but not when there are several, because it returns an area that
encompasses all screens. The implemented workaround is that Fl::x(),y(),w(),h() 
and Fl::screen_work_area(X,Y,W,H,0) return the exact work area when there's 
a single screen, and return the full screen area when there are several.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-29 16:04:24 +00:00
Manolo Gouy
0faba4e3cb Mac only: further fine tuning in clipping/rectf needed for scroll demo after changes in r.9050.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9074 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-28 09:07:50 +00:00
Manolo Gouy
bdb000bf2f Mac OS: simplified use of CGRectMake() for rectangle drawing and clipping on display and printer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9050 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-19 19:03:22 +00:00
Manolo Gouy
58076d7a26 Mac OS: - Correct application hiding when modal or menu window is on.
- Removed useless FL_FOCUS events when unhiding application.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9034 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-13 13:03:07 +00:00
Manolo Gouy
8c6aad459d Mac OS: center on page the "Print Front Window" application menu command.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9032 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-08 08:09:20 +00:00
Manolo Gouy
21ddc8900c Before deleting a window, it's better to check whether it contains the currently focused NSView,
and unlock focus there.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9026 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-02 12:15:43 +00:00
Manolo Gouy
5b98e80a4f Mac OS: Greatly simplified the open document handler.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8865 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 13:26:52 +00:00
Greg Ercolano
4f4a8fc3c7 Modifications to all LGPL headers for STR #2685.
(to clarify static exception LGPL by changing license references)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 04:49:30 +00:00
Manolo Gouy
b2561363f7 Mac OS: fix STR #2666 allowing to display copyright info in the default About window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8852 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-11 14:53:07 +00:00
Manolo Gouy
264c73c9ab Mac OS: added missing lock/unlock pairs when running system menu items.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8851 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-11 13:52:16 +00:00
Manolo Gouy
20ab9c3c33 Mac OS: Added missing lock/unlock calls in Fl_Paged_Device::print_window().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8849 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-11 09:45:21 +00:00
Manolo Gouy
3bc8713bac Fl_Paged_Device::print_window() now works with any output surface on Mac platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8846 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-04 15:07:22 +00:00
Manolo Gouy
0b784cc90f Arguments x_offset & y_offset of function Fl_Paged_Device::print_window() were partially
ignored by the Mac version.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-04 13:54:43 +00:00
Manolo Gouy
598057f079 Fix STR #2665: Mac OS: use bundle name when available.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8807 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-16 12:35:32 +00:00
Manolo Gouy
82e53806aa Fix STR #2664.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8806 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-16 11:13:59 +00:00
Manolo Gouy
965e81fc87 Fixes bug entitled "Fl::event_text() omitted for keyups?" in fltk.development.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8773 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-03 09:12:07 +00:00
Manolo Gouy
bd1e9c8ca3 Fix STR #2652: Mac OS-specific bug in Fl::remove_fd().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8771 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-31 11:20:52 +00:00
Manolo Gouy
18a902ca31 Fix Fl_Paged_Device::print_window(), Fl_Window::decorated_w() and Fl_Window::decorated_h()
when the window is iconized for all platforms.
Also, factorized some duplicated code in src/Fl_x.cxx.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8759 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-30 12:33:51 +00:00
Manolo Gouy
695613433a Fix STR #2635 for Mac OS: allow fl_xid() even if window is not yet shown.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8708 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-21 21:31:35 +00:00
Manolo Gouy
a64c0dc9f3 Mac OS: implemented the effect of the 2nd arg of Fl_Window::label(label, iconlabel) - continued.
Now works also if called before the window is shown().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8665 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-15 12:34:31 +00:00
Manolo Gouy
9e1a7079c3 Mac OS: implemented the effect of the 2nd arg of Fl_Window::label(label, iconlabel)
that sets the window name when it is iconized (or minimized).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8664 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-15 09:42:36 +00:00
Manolo Gouy
4ee9b8d7aa Fix for STR #2629: remove beep when typing cmd-<key> under Mac OS.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8660 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-13 11:05:00 +00:00
Manolo Gouy
bcdf4a4be1 Mac OS: simplified by removing Fl_X::contains_GL_subwindow() function.
This operation is now performed within Fl_cocoa.mm

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8657 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-12 11:50:43 +00:00
Manolo Gouy
bcbb26d5e7 On Mac OS, allow creation of a window in a minimized form.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8654 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-11 18:31:28 +00:00
Manolo Gouy
80ea4bcde6 Restoring correct keyboard handling under Mac OS X 10.5.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8642 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-07 13:45:42 +00:00
Manolo Gouy
ae8d142ed0 Corrected spurious FL_NUMLOCK setting.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8628 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-29 20:25:04 +00:00
Manolo Gouy
73a6f06c34 Reorganized keyboard input-handling code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8626 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-27 11:21:57 +00:00
Manolo Gouy
65b9610a96 Mac OS: exact implementation of the Fl::screen_dpi() function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8619 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-22 17:30:37 +00:00
Manolo Gouy
ad50b753be Added fallback mechanism if malformed UTF-8 is used for a window title.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8608 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-19 12:37:20 +00:00
Manolo Gouy
d4685c13ef Misc code cleaning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8607 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-19 08:22:05 +00:00
Manolo Gouy
619cb25982 Mac OS: The Fl_mac.cxx test
if (winclass != kHelpWindowClass)
is now replaced in Fl_cocoa.mm by its exact equivalent:
  if ( w->border() || (!w->modal() && !w->tooltip_window()) )
so that tooltip windows are handled as in carbon.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8601 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-18 08:18:16 +00:00
Manolo Gouy
8f59684c0f Mac OS: Fixed bug where an application could be left with only a tooltip window opened.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8599 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-17 19:58:31 +00:00
Ian MacArthur
d77223ea58 A quick hack to prevent the OSX tooltip-crash on
badly formed UTF8 strings.

This probably is not the best solution, but it
does work.
Note that the problem actually seems to be in
setting the window title, and indeed if you try to
label ANY window with a badly formed UTF8 string
(not just a tooltip) you get the same exception
thrown.

NOTE: I'm not even sure why we try to set the 
window title in tooltips, as it is never used 
and the tooltip label itlsef still works fine.

Anyway, we can do something better, but this will
work for now.

Aside: If you close an app on OSX whilst a tooltip
is visible, the app will not exit, as there is still
a window open (the tooltip) but no way to cancel
the tooltip.

Don't know if this is OSX specific or not though
but it is certainly a bug.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8598 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-17 14:39:16 +00:00
Manolo Gouy
9ff9cf1230 Added Fl_Paged_Device::print_window() to print a window with its title bar and frame.
Added Fl_Window::decorated_w() and Fl_Window::decorated_h() that return the size
of a window with its title bar and frame.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8593 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-15 21:38:05 +00:00
Manolo Gouy
f7c2061f0c Improved the accuracy of clipping when printing on Mac OS.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8586 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-13 20:50:41 +00:00
Manolo Gouy
639ee4fbab Now sends FL_HIDE/FL_SHOW events when window is iconized/un-iconized.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8584 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-13 09:03:19 +00:00
Manolo Gouy
404a7c1bad Restores change made in r.8557 that blocked system menu shortcuts.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8583 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-12 20:15:10 +00:00
Manolo Gouy
8d084cb4bc Added missing fl_lock_function() / fl_unlock_function() pairs of calls.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8576 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-11 19:52:41 +00:00
Manolo Gouy
0937913a7c Added missing test of necessity of fl_open_display() call.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8571 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-08 16:14:05 +00:00
Manolo Gouy
80d6099c45 Window title bars are now printed with their rounded angles.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8564 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-06 12:33:34 +00:00
Manolo Gouy
b149f786d7 Mac OS: Fl_Window::resize() shd not modify the maximum window size if it is 0.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8562 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-05 17:16:35 +00:00
Manolo Gouy
7931fe1047 Removed an NSAutoreleasePool allocation/release.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8561 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-05 16:41:31 +00:00
Manolo Gouy
b197f40781 Mac OS: the "Print Front Window" item of the application menu now prints also the title bar.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8560 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-05 16:20:02 +00:00
Manolo Gouy
b5ab77d07d Removed usage of NSMainMenuWindowLevel to use only 3 window levels.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8559 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-05 12:41:32 +00:00
Manolo Gouy
a86df5ede6 Mac OS: removed duplicate FL_KEYBOARDS events with function and modifier keys.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8557 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-03 17:31:07 +00:00
Manolo Gouy
32df4755c4 about STR #2599: - fix the synchro between key presses and key events
- implement character palette input by FL_PASTE events

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8555 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-01 17:19:34 +00:00
Albrecht Schlosser
75294d3e24 Fixed dependencies of bundled libs, corrected a typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8553 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-01 13:40:41 +00:00
Manolo Gouy
f4c12d46d6 Mac OS: fixes in STR #2588 the warning message "_createMenuRef called with existing
principal MenuRef already associated with menu".

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8551 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-01 08:32:57 +00:00
Manolo Gouy
bd36f0dd31 Mac OS: Make the Fl::event_key() function distinguish between left and right modifier keys.
Also, don't rebuild the application menu if one is already there.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8549 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-30 22:15:17 +00:00
Manolo Gouy
45dba50515 Removed global variable appleMenu.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8547 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-30 08:53:07 +00:00
Manolo Gouy
03d531cd16 Fix STR #2588. FLTK was subclassing a very important system-defined class NSApplication.
This created conflict with other libraries that do the same. This STR reports that Tcl/Tk is one
such library. The fix removes any NSApplication subclass usage in FLTK, and requires
to initialize the NSApplication-subclassing library before calling fl_open_display(). In this 
condition an FLTK application can also use an NSApplication-subclassing library such as Tk.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8546 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-29 20:26:51 +00:00
Manolo Gouy
5cda7e7232 Set svn properties.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8544 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-29 11:19:51 +00:00
Manolo Gouy
d4f284d73c Minor change.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8543 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-29 08:39:40 +00:00
Manolo Gouy
c4e554ff6b Mac OS: simplified the handling of text input:
use the FLTextView subclass of NSTextView only for Mac OS < 10.5 because it's not
necessary for Mac OS >= 10.5

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8542 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-28 21:52:56 +00:00
Manolo Gouy
c6fb27e56d Mac OS: added field subwindow to Fl_X class that is true if this is a subwindow.
Useful when deleting a window because subwindows share their xid with their parent
window (unlike under MSWIn or Xlib), so subwindows should not delete their xid.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8540 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-28 09:28:05 +00:00
Manolo Gouy
3b7ff83e04 Fix STR #2595. Mac OS. When deleting a subwindow, don't delete the Cocoa window
(xid) attached to it because it is in fact the Cocoa window of its parent window.
I check that by making sure that none of the windows in the window list uses
this Cocoa window. Is there a better algorithm ?

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8534 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-25 23:17:16 +00:00
Manolo Gouy
edd848aa9c Mac OS: implement the Cocoa equivalent of Carbon's kEventWindowHidden handler.
Positive effect visible with the clock demo.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8531 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-25 12:02:31 +00:00
Manolo Gouy
9fa8427b78 Fix STR #2594: the focus after creating a new window was not set correctly
because some code present in Fl_mac.cxx was not reflected in Fl_cocoa.mm.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8530 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-24 12:58:32 +00:00
Manolo Gouy
a36bca971a Fix STR #2589: incorrect cohabitation of modal and non-modal windows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8521 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-20 21:43:10 +00:00
Manolo Gouy
1d038565c1 Mac OS: modified the definition of the fl_mac_os_version global variable to allow v 10.10.10
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8504 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-04 16:48:10 +00:00
Manolo Gouy
f22e50af97 STR 2580: the first Fl::add_timeout() call now calls fl_open_display() because that is necessary for
timeout events to be recovered by the event loop. 

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-01 12:37:34 +00:00
Manolo Gouy
f7d7eff7ad STR 2580: Fl::add_fd() now calls fl_open_display() because that is necessary for the fd event
to be recovered by the event loop. Before main() is called, only fl_mac_os_version is 
initialized.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8488 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-01 11:58:36 +00:00
Manolo Gouy
8c9d34facf The got_events global variable is now updated when an event is processed by do_queued_events
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8486 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-28 17:48:55 +00:00
Manolo Gouy
278c821ff4 Mac OS only: allows to print a menu window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8470 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-24 16:58:00 +00:00
Manolo Gouy
cb902eebe3 Replaced global variable fl_fontsize by fl_graphics_driver->font_descriptor().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8395 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-07 13:49:34 +00:00
Manolo Gouy
6a5feafe23 Replaced global variable fl_color_ by a private member of the Fl_Graphics_Driver class,
and a public getter to it: Fl_Graphics_Driver::color().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8384 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-06 12:32:23 +00:00
Manolo Gouy
7c932c25d6 Added the possibility to call Fl_Paged_Device::scale(factor) with a single argument.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8366 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-04 09:17:45 +00:00
Manolo Gouy
fe367d1309 Moved the initializations of Fl_Mac_App_Menu class fields to file Fl.cxx for Doxygen use.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8364 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-03 11:11:31 +00:00
Manolo Gouy
8072ef8ce8 Replaced a bunch of delete by delete[] where it's legitimate.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8362 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-02 18:39:34 +00:00
Manolo Gouy
18156dfb30 Removed global variable fl_surface that was not very useful because equivalent
to Fl_Surface_Device::surface().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8360 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-02 12:42:47 +00:00
Manolo Gouy
bb29437427 Removed global variable fl_display_device that was not very useful because equivalent
to Fl_Display_Device::display_device().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8359 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-02 11:29:18 +00:00
Manolo Gouy
816fc3b971 Mac OS only: added class Fl_Mac_App_Menu to support localization
of the application menu. Added corresponding Doxygen doc.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8357 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-01 21:31:57 +00:00
Manolo Gouy
5593c60d50 Fix STR #2524: no more NSAutoreleaseNoPool messages.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8285 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-16 21:05:29 +00:00
Manolo Gouy
2dadc8cb54 First step to support CJK input under Mac OS: implementation of the function
firstRectForCharacterRange of the NSTextInput protocol.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8228 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-09 16:07:13 +00:00
Manolo Gouy
1277b4e9a2 Added missing static function qualifier
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8225 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-09 14:16:36 +00:00
Manolo Gouy
97fce6b748 Removed requirement of Mac OS 10.4 because of use of [NSScreen userSpaceScaleFactor]
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-07 14:47:02 +00:00
Matthias Melcher
7dc05cb20e First attempt at finding the screen pixel sizes. Can't test Xinerame, MSWindows, or X11 yet.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8204 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-07 01:01:04 +00:00
Manolo Gouy
bc509d32eb Fix STR #2504 (first part). Replaced HAVE _CAIRO by FLTK_HAVE_CAIRO and USE_CAIRO
by FLTK_USE_CAIRO everywhere.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8198 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-06 10:24:58 +00:00
Manolo Gouy
4beb3b88e8 Renamed Fl_Device::type() to Fl_Device::class_name() to avoid conflict or confusion
with Fl_Widget::type(). Added a setter function Fl_Device::class_name(const char *).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8190 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-05 10:21:45 +00:00
Manolo Gouy
d4d4a24eff Fixed warning in Fl_Gl_Choice.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8175 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-03 20:51:17 +00:00
Manolo Gouy
874bca74f5 Mac OS X: removed all uses of Carbon (except for older OS versions) and re-organized
text input around the NSTextInput protocol.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8173 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-03 16:50:34 +00:00
Manolo Gouy
24758b5cd6 Mac OS X: keep Mac-specific fl_beep() code in file src/fl_ask.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8136 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-29 11:51:29 +00:00
Manolo Gouy
dbb7be0fee Mac OS X: removed dependency from AudioToolbox.framework by calling NSBeep() from Cocoa.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8135 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-29 11:33:42 +00:00
Manolo Gouy
a8530c73fa Adopted use of FL_LIBRARY #define symbol under Mac OS X. This allows to compile
client applications without including Mac OS system headers, with a gain in speed of 
compilation and portability. The source files of all FLTK libraries must now be compiled with 
-DFL_LIBRARY under Mac OS X. Make, CMake and Xcode project support files
have been modified accordingly.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8113 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-23 14:24:29 +00:00
Manolo Gouy
dc0c85b964 Added protection against compilation besides Mac OS X.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8062 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-19 17:57:19 +00:00
Manolo Gouy
29cff1612f Removed compilation warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8061 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-19 11:30:01 +00:00
Manolo Gouy
d01c9cdf5b Mac OS: replaced several global functions by new member functions of Mac OS-specific Fl_X class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8055 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-18 22:31:01 +00:00
Manolo Gouy
f3c7efc8d2 The 3 objective-c++ files used for the Mac OS X support are no longer included
by other files but added to the list of source files to be compiled
for Mac OS X only. Support files for autoconf/configure/make, CMake and Xcode
are also modified accordingly.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8049 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-17 10:43:41 +00:00
Manolo Gouy
02f327dbec Mac OS X: removed unused global variable fl_selection_requestor
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8023 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-13 12:21:12 +00:00
Manolo Gouy
ab606d1274 Moved some code from do_queued_events() to a better location in [FLApplication sendEvent:]
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8014 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-12 08:37:21 +00:00