Commit Graph

119 Commits

Author SHA1 Message Date
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