Commit Graph

62 Commits

Author SHA1 Message Date
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
a1d63bc158 Mac OS: removed unused type Fl_XMap and global variable fl_current_xmap.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9151 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-26 11:17:31 +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
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
5b04fd35fc Mac OS: simplified use of #define MAC_OS_X_VERSION_10_x
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9057 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-22 11:40:53 +00:00
Manolo Gouy
1a9b72429e Improved how the system-dependent global variable fl_gc is declared
with or without declaring the FL_INTERNALS preprocessor variable.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-14 15:17:32 +00:00
Manolo Gouy
28c559aa3f Added missing declaration of the fl_find() function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9027 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-02 14:42:02 +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
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
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
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
5185932f5b Mac OS: modified the Doxygen doc of the fl_mac_os_version global variable
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8505 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-03-04 17:04:43 +00:00
Manolo Gouy
e552ae319a Moved the Doxygen doc of class Fl_Mac_App_Menu from mac.H to x.H so Doxygen
displays correctly that #include <x.H> is needed for this class.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8381 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-06 10:24:23 +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
Matthias Melcher
fe25f19767 Adding embedded documentation to Fluid if installed odcs are not found. Falls back to the internet if that does not exist either. Also, adds JPEG and PNG images to the Shared Image list if they were loaded from memory - see example use in fluid.cxx which loads and embedded html document containing an embedded PNG image.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8306 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-24 17:04:22 +00:00
Albrecht Schlosser
96c410dceb Hiding the Fl_X class under WIN32 (STR #2522).
Applied Manolo's patch, modified to use FL_INTERNALS for
explicit request in user code to expose class Fl_X.
Also changed X11 and Mac OS to use FL_INTERNALS.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8289 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-17 23:52:32 +00:00
Manolo Gouy
be8b1f4ac5 Another change to allow OS-independent compilation of external applications as suggested by Greg.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8266 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-12 07:54:42 +00:00
Manolo Gouy
b6d2207550 New attempt to fix STR #2513.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8255 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-11 12:08:44 +00:00
Manolo Gouy
d21d46979b Attempt to fix STR #2513: make sure that MAC_OS_X_VERSION_10_5 is defined.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8240 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-10 12:42:17 +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
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
98e9042a53 Made sure FL/x.H is included only when necessary.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8130 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-28 18:14:59 +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
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
bbb273cb3a Doxygen changes: replaced "defined" by "declared" where appropriate.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7933 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-01 17:48:59 +00:00
Manolo Gouy
180ec65687 Doxygen changes to indicate what to #include for functions documented in modules.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7932 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-01 17:38:29 +00:00
Matthias Melcher
e454f97acc Fixed Copyright to 2010.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28 21:06:39 +00:00
Manolo Gouy
7eb27fa4bd Mac OS X: introduced global variable fl_mac_os_version and cleaned a few unused variables.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7892 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-25 18:21:21 +00:00
Greg Ercolano
e1e119e1df Applied sjb's patch to fix STR #2429.
Removed #include <config.h> from public include files.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7715 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-11 18:10:32 +00:00
Manolo Gouy
5cb826bd38 Documented fl_open_callback function.
-This line, and those below, will be ignored--

M    mac.H


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7663 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-07-01 16:51:28 +00:00
engelsman
c1fbbf03ac FL/mac.H: stop doxygen complaining by escaping # in comment
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7608 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-05-17 16:42:16 +00:00
Matthias Melcher
82be53f64d OS X: more references to non-Cocoa builds removed
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7354 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-29 11:07:29 +00:00
Matthias Melcher
941901e273 OS X: removed all Carbon and Quickdraw references. Starting with 1.3, we only support Cocoa and Quartz.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7351 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-29 10:35:00 +00:00
Manolo Gouy
b5e2d38b2f Have class Fl_Sys_Menu_Bar and function fl_mac_set_about appear in Doxygen doc.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7276 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-16 14:47:40 +00:00
Albrecht Schlosser
998cc6df52 Merge of branch-1.3-Fl_Printer, with the following main changes:
(1) adding Fl_Device class (and more) for device abstraction
 (2) adding Fl_Pinter class (and more) for printing support.

Todo: Code cleanup, update dependencies, remove/replace test print window.
I'm looking into converting the test window popup in a global shortcut
that would pop up the print dialog now...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7263 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-14 18:07:24 +00:00
Manolo Gouy
4645ed9703 defined macro FL_CGRECTMAKE_COCOA that
contains the correct way to transform x,y,w,h into
a CGRect adequate for clipping

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-01-29 21:16:20 +00:00
Manolo Gouy
1eb95cd823 Three Cocoa-related changes:
- correct window resize in mandelbrot demo
- clip to 1-pixel and 0-pixel width now work
- modifier key presses are now correctly reported

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7029 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-01-24 10:27:21 +00:00
Matthias Melcher
bdbea14218 Patched for Cocoa.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6971 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-12-18 20:11:24 +00:00
Matthias Melcher
c8278a2344 New patches appliet for Cocoa port. Fixed(?) STR 2232 workaround for X11 keyrepeat bbbbuuuuuuggggg.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6966 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-12-13 12:03:26 +00:00
Matthias Melcher
0f0a4672c9 Fumbeling about at the Cocoa implementation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6960 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-12-08 23:15:30 +00:00
Matthias Melcher
b2cffc688e Moved OS X code base to the more moder Cocoa toolkit thanks to the awesome work of Manolo Gouy (STR #2221). This is a big one! I tested all test applications under 32-bit autoconf and Xcode, and a few apps under 64bit intel. No PPC testing was done. Please verify this patch if you have the machine!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6951 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-12-06 22:21:55 +00:00
Matthias Melcher
167d767e0f Changed the copyright to 2009 for header files. Still todo: src and test directory.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6614 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01 16:11:32 +00:00
Fabien Costantini
e8478458bf Doxygen documentation: Fixed most important warnings for the Fl_Widget, Fl_Window, Fl_Valuator classes that should be now a 100% documented. For the rest I drastically reduced the undocumented APIs, but many others (less important) remains.
It looks and feels pretty good now :-)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-18 19:09:34 +00:00
Matthias Melcher
7ae0ff0240 Updated OSX subwindow simulation code to better add and remove from the clipping list
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5379 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-29 11:03:05 +00:00
Michael R Sweet
1c399af444 Update source file headers with STR web page.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16 00:13:17 +00:00
Michael R Sweet
add37faa25 Copyright updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 21:55:12 +00:00
Matthias Melcher
b90f593ae6 News from FLTK1.1 and Quartz
- listing fonts using ATS instead of QD
- made bold and italic fonts work
- returning correct font metrics
One problem came up though: Quartz renders fonts at subpixel positions,
which is great for the overall look, but unfortunatly 'fl_draw' supports
only integer coordinates for printing. As a result, marking a line of text
makes the rest of the line jump by a fractional pixel. Any suggestions to
solve this problem are greatly appreciated!


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3810 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-09-09 00:55:41 +00:00
Matthias Melcher
98a0be3965 Quartz for FLTK1.1
- Pixmaps now correctly support transparency/masking
- subimage drawing aligned correctly
- lines with a size over 1 always anti-alias
- fl_begin_points/fl_end_points works
- fixed refresh problem for multiple open windows
Will check Linux compile right after this commit to make sure that
I didn't destroy anything.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3800 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-08-31 22:00:49 +00:00
Matthias Melcher
57193e52c0 Quartz for FLTK 1.1:
- added pixmap drawing (no masking yet)
- added bitmap drawing
- added line styles (complete)
todo:
- missing refresh (double test, fluid, others)
- missing pixmap mask
- color_chooser has alignment issues
- images scale instead of beeing scissored
- fonts


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3798 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-08-31 00:27:40 +00:00
Matthias Melcher
bc704ad62f Quartz:
- made multiple contexts for windows, popups and menus work
- still missing: double buffer handling


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3793 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-08-27 20:02:45 +00:00