Commit Graph

184 Commits

Author SHA1 Message Date
Manolo Gouy
5d12ea5ab1 Move marked text-related data to the Fl_Cocoa_Screen_Driver class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11488 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-31 19:23:38 +00:00
Manolo Gouy
d67f395031 Rewrite functions XRectangleRegion(), XDestroyRegion() under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11479 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-30 20:16:40 +00:00
Manolo Gouy
532e564593 Add #include <FL/Fl_Widget.H> needed in mac.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11470 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-29 20:10:37 +00:00
Manolo Gouy
9a521b95b9 Remove useless #include <FL/Fl_Device.H>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11469 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-29 19:59:34 +00:00
Manolo Gouy
08677d0cb6 Clean mac.H of a few useless #include directives.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11468 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-29 19:52:51 +00:00
Manolo Gouy
aacb5277e7 Rewrite Fl_dnd.cxx under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11455 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-28 17:36:07 +00:00
Manolo Gouy
915d6c643a Isolate the definition of the 3 public, OS-dependent types (Fl_Offscreen, Fl_Region, Fl_Bitmask).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11432 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-26 14:36:11 +00:00
Manolo Gouy
6e141d14df Fix the "bizarre makefile build error" due to double declarations of fl_clip_region(Fl_Region).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11416 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-24 05:59:35 +00:00
Manolo Gouy
fdaad858ba Rewrite Fl_Window::iconize() under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11411 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-23 18:00:37 +00:00
Manolo Gouy
a114e3ab4d Rewrite Fl_Window::handle(int) under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11403 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-23 13:13:00 +00:00
Manolo Gouy
fa9a33eaee Beginning of Albrecht's plan for Fl_Window and Fl_Window_Driver classes.
Still unclear whether the implementation of the flush() functions follows the plan.
The Fl_Printer class is fully rewritten under the driver model.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11364 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-18 18:20:11 +00:00
Manolo Gouy
7decb3d3b2 Rewrite the Fl_Copy_Surface class with strict separation of public API and platform-related code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11257 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-01 17:20:25 +00:00
Manolo Gouy
0b406baa0f Rewrite all fl_XXX_offscreen() functions so they use an Fl_Image_Surface object.
These functions become therefore platform-independent.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-27 13:52:27 +00:00
Manolo Gouy
7f17b915db Remove the useless pseudo run-time type information supported by the Fl_Device class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11217 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-25 17:56:48 +00:00
Matthias Melcher
052401a34e Instantiate the right Fl_Window_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11195 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-19 22:21:02 +00:00
Matthias Melcher
22d302e242 Add System Driver and Window Driver.
Adding two new driver types for each platform. Fl_..._System_Drivers exist once per application and provide an interface for to file and filename handling, timers, locking, multithreading, etc. .

 The Fl_..._Window_Driver class is instantiated once for every window in the system and corresponds closely to (and actually inherits from) Fl_X. The difference now is, that there is one Fl_X/Fl_Window_Driver base class, and one platform version that derives from it.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11193 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-19 21:41:02 +00:00
Manolo Gouy
f33b45f1d3 Remove all uses of the fl_gc global variable. Towards a clean driver model.
fl_gc remains usable by the application as a hook into the system.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-18 16:21:51 +00:00
Manolo Gouy
ec290bc9e0 Remove Fl_X::q_fill_context() used only once.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11171 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-14 06:36:20 +00:00
Manolo Gouy
6439f34ee7 Remove Fl_X::q_clear_clipping() used only once.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11170 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-14 06:19:26 +00:00
Manolo Gouy
4af616a7a2 New member function Fl_Quartz_Graphics_Driver::draw_CGImage() used internally for all image drawing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11165 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13 14:48:13 +00:00
Matthias Melcher
50ee3bcd66 Mark places that need to be refactored with // PORTME:
Searching for __APPLE, WIN32 or X11 did give me many false results. I instead marked most ifdef's that I would like to get rid of with the text // PORTME:, so they can be easily found by a global search.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11155 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-11 12:02:36 +00:00
Albrecht Schlosser
0a6be0a83f Fix compiler warnings (STR 2988), porting from branch-1.3.
This commit is the accumulated patch introduced in branch 1.3
in svn r 11094, 11095, and 11096.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-31 04:33:54 +00:00
Manolo Gouy
1c3c544edf Added Fl_Window::capture_titlebar_and_borders a new private member function
that triggers a warning when FL_PORTING is ON and with a default platform-neutral
implementation.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11074 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-28 11:51:07 +00:00
Manolo Gouy
8e3f66073f 1) Added a new way to detect whether the drawing operation is using the platform's native driver
and whether we are printing:  virtual int Fl_Graphics_Driver::has_feature(driver_feature feature)
This is also because it is not convenient to derive a printer-specific driver with its own
implementation of virtual functions when this implementation differs only in one line of code.

2) Solved the problem of inclusion of non public header by the public header FL/Fl_Device.H:
bracket this with #if FL_LIBRARY / #endif so this non public header is included only when building
FLTK itself.

3) Removed several (but not all) of the FLTK_ABI_VERSION guards that are no longer
useful for code targeting FLTK 1.4.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11063 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-27 18:11:20 +00:00
Manolo Gouy
eeb65bef23 1) Replicate in branch-1.3-porting all recent changes of branch-1.3
2) Advance branch-1.3-porting with new function Fl_X::capture_titlebar_and_borders()
that contains all the platform-specific code of all operations related to drawing
window borders and title bars. What is platform-specific and what is not
is therefore much clearer, to ease porting.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11002 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-10 19:08:16 +00:00
Manolo Gouy
22af09dae7 Mac OS: support for high resolution OpenGL windows.
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-02 09:59:37 +00:00
Manolo Gouy
689d19cda3 Added necessary forward type declaration.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10934 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-26 17:28:55 +00:00
Manolo Gouy
ff65dbb5ae Mac OS only: added the Fl_Mac_App_Menu::custom_application_menu_items() method
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-26 16:34:58 +00:00
Manolo Gouy
511ec0bb3d Mac OS: have Fl_Paged_Device::print_widget() print top-level windows with
rounded bottom corners as they appear on screen.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10916 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-19 16:33:44 +00:00
Manolo Gouy
0d2517331c Mac OS only: simpler definition of the pdfdata private member of the Fl_Copy_Surface class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10915 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-18 15:53:46 +00:00
Manolo Gouy
1c16aaced2 The ATSU API (old API for text formatting) has been removed from SDK 10.11.
This fixes STR#3262

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10878 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-11-03 14:36:36 +00:00
Manolo Gouy
5ea322679c Moved Mac-specific type declaration to mac.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10846 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-28 14:04:21 +00:00
Manolo Gouy
16e08ce3a2 Programs compiled with pre-10.7 SDKs can now fully use retina displays.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10844 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-27 12:31:46 +00:00
Manolo Gouy
1e6bc1c73a Improved Mac OS implementation of Fl_Window::wait_for_expose().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10828 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-11 11:47:21 +00:00
Manolo Gouy
e9888e09c5 Fixes descriptive comment of the mapped_to_retina_ class variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10827 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-09 12:56:24 +00:00
Manolo Gouy
cc36ab53b3 - Implement Fl_Window::wait_for_expose() for Mac OS:
The -[NSWindow makeKeyAndOrderFront:] message used to make the window appear on the screen,
but, starting with 10.10 (approximately), this changed, and it became necessary to query for events
for a new window to appear on the screen. With 10.11 two event messages are needed.
The solution is therefore to implement Fl_Window::wait_for_expose().

- Calling NSDisableScreenUpdates()()/NSEnableScreenUpdates() before and after window updates
greatly accelerates multi-window update operations.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10826 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-08-07 12:55:56 +00:00
Manolo Gouy
634ede015d Define NSInteger in FL/mac.H when needed, so it's available to all source files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-30 02:23:26 +00:00
Manolo Gouy
f9fa74e3af Restored the possibility to call Fl::set_font()
in a global initializer (before main() starts).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10726 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-28 22:02:48 +00:00
Manolo Gouy
5017171db8 Replace gl_xxx() function names by new member functions of the Fl_X class to avoid
collisions with user-defined symbols.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10548 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-02 13:08:51 +00:00
Manolo Gouy
8887600f5f Improved Mac OS X Fl_Gl_Window resizing: the GL scene was drawn twice at each resize operation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10545 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-31 15:08:31 +00:00
Manolo Gouy
64ffd414d6 Stop using dynamic_cast when performing text drag (Mac OS only).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10536 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-28 17:05:29 +00:00
Manolo Gouy
2d264fa8d5 A few comment changes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10531 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-22 17:45:09 +00:00
Manolo Gouy
f3a84c0ee5 Changed OpenGL support for the Mac OS X platform: use cocoa instead of deprecated AGL.
All changes are mac-specific, except a very minor change in file src/gl_draw.cxx
where string drawing wrongly claimed to support @symbol, not possible
because symbols are drawn using non-GL primitives.

Unchanged application code can use the new FLTK code.
In addition, the new code allows mac applications to draw OpenGL scenes
at high resolution on so-called 'retina' displays, but this requires some
support from app code. They must call, before opening GL windows,
Fl::use_high_resolution(1);
and change their glViewport() calls as follows
glViewport(0, 0, pxel_w(), pixel_h());
This uses 2 new member functions of the Fl_Gl_Window class,
pixel_w() and pixel_h() returning the window dimensions in pixel
units, that is, twice the w() and h() when the window is mapped
on a retina display.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10498 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-20 07:19:23 +00:00
Manolo Gouy
2db56a389d Removed useless member function window_pixel_size().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10488 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-18 07:13:56 +00:00
Manolo Gouy
1f5b8d3aad The new subRect_ member is better private (FLTK_ABI_VERSION >= 10304 only).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10487 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-18 06:40:50 +00:00
Manolo Gouy
15d497ebdf Apple-only changes to restore a layout of the Fl_X class identical to that in FLTK 1.3.3.
With true subwindows, several members of Fl_X became useless.
This change recycle two of them for new uses:
- Fl_Region subRegion is used as a pointer to a CGRect
- Fl_X *xidChildren is used to indicate the resolution of the display
containing a window

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10486 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-17 09:04:01 +00:00
Manolo Gouy
68a577e1f6 Improved handling of high resolution ("retina") displays.
The new field bool Fl_X::mapped_to_retina is updated when needed, that is, when the window is moved.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10481 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-11 16:54:30 +00:00
Manolo Gouy
f1c7d674d2 Improved processing of retina displays: replace [NSWindow backingScaleFactor] that is not recommended.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10477 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-05 17:18:19 +00:00
Manolo Gouy
f52b457cc2 Added full support of retina displays on the mac platform.
On such displays, one drawing unit equals two pixels.
The fl_xyline() and fl_yxline() functions are modified to perform
extra operations when drawing to a window on a retina display.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10463 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-19 16:23:36 +00:00
Manolo Gouy
537ea4a7e1 Remove static members of the Fl_X class that became unused.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10458 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-16 13:10:45 +00:00
Manolo Gouy
42a2e9c64f Fixed the declaration of the Window type.
Before, the fl_find(Window) function was not accessible from .mm source files.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10451 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-12 20:42:41 +00:00
Manolo Gouy
e4d4f400a4 Added support of true subwindows to the Mac OS X code. With this, a window inside another
window is just another window with Mac OS as it was already with MSWindows and X11.
This requires Mac OS X 10.2. Window nesting to any depth is possible.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10449 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-11 16:08:09 +00:00
Manolo Gouy
e037083a5b Prevent Fl_Copy_Surface.H from including apple system headers on the mac platform.
With this, no public FLTK header includes system header files anymore on the mac.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10443 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-09 08:34:26 +00:00
Manolo Gouy
574e31276e Rewrite Fl_Copy_Surface::complete_copy_pdf_and_tiff() using cocoa APIs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10442 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-08 18:14:31 +00:00
Manolo Gouy
76418b352b Allow compilation with SDK 10.10 and use new API to discover os version at runtime.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10305 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-13 14:29:53 +00:00
Pierre Ossman
f58b1a91b3 Add ability to set custom icons for windows. STR #2816.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10197 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-06-16 11:39:32 +00:00
Pierre Ossman
332dc1b7ac Add method to set any custom cursor, based on a Fl_RGB_Image object.
Also change our fallback cursors to use this method, so that fallback
cursors are handled in a platform independent manner. STR #2660.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-06-16 11:17:57 +00:00
Manolo Gouy
07dd8ba328 Added copy/paste from/to FLTK applications of graphical data.
Added Fl_Image_Surface class to draw into an Fl_Image object.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10159 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-05-23 16:47:21 +00:00
Manolo Gouy
6c92cc9a8d Fix STR#3063: compilation using Mac OS 10.4
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10127 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-04-27 13:57:09 +00:00
Manolo Gouy
e543d2c763 Cleaner definition under Mac OS of the fl_default_cursor global variable that doesn't hide its type.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10048 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-07 15:31:28 +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
dc2f7ba034 Document the fl_sys_menu_bar global Mac OS-specific variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9996 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-10-05 15:06:39 +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
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
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
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
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
674b2475b9 Documentation: repair some instances of documented functions that did not appear in the index.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9719 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-13 14:45:42 +00:00
Manolo Gouy
fdb8fdfb2a Mac OS X: don't use the HAVE_SCANDIR_POSIX preprocessor variable because it has an
OS version-dependent value.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9665 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-08-14 09:23:22 +00:00
Manolo Gouy
bf6024175d Fixed compilation under Mac OS X 10.8 "Mountain Lion".
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9649 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-08-01 08:43:20 +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
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