Commit Graph

6276 Commits

Author SHA1 Message Date
Manolo Gouy
7819882874 Fixed image copy/paste for Mac OS 10.4 and 10.5 that use different pasteboard type names
from later OS versions.
Unfortunately, it does not work with Mac OS 10.3

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10818 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-25 15:57:14 +00:00
Manolo Gouy
491938a4a9 Make Fl_Copy_Surface work on Mac OS 10.3:
use different pasteboard data type names according to running OS.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10817 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-25 08:02:03 +00:00
Manolo Gouy
a3e48a4afd Use -(NSGraphicsContext*)[NSWindow graphicsContext] to obtain the adequate
graphics context to draw to a window. This requires Mac OS 10.4.
The advantage is that it is possible for a secondary thread to call 
Fl_Window::make_current() without needing to create an autorelease pool.

We save the native graphics state, and also the state with origin at top. 
Fl_X::q_release_context() restores the graphics state twice to return to
the native state. This allows to use a single graphics context for a single
window and a single thread.

Under 10.3, we have to create a new NSGraphicsContext when Fl_Window::make_current()
is called directly, so that secondary threads cannot call Fl_Window::make_current() without
having created an autorelease pool.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10816 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-24 22:17:36 +00:00
Manolo Gouy
80402f622c Restore usability on Mac OS 10.3:
- do not use NSOpenGLPFAMultisample
- do not use -[NSBitmapImageRep bitmapFormat]
that require Mac OS 10.4

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10815 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-24 21:30:46 +00:00
Albrecht Schlosser
c788ca2285 Document FL_ABI_VERSION, reformat lists in enumerations.dox.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10814 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-24 18:43:20 +00:00
Albrecht Schlosser
a2e13ee3a2 Fix documentation, adjust comments in fluid/Fl_Type.cxx.
No code changes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10813 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-23 00:22:42 +00:00
Albrecht Schlosser
ff1d783162 Add new event name FL_ZOOM_GESTURE to FL/names.h.
I also added some placeholders for yet to be defined events, just in
case they are forgotten to add in FL/names.h. This appears to be better
than to reference a non-existing array element (string pointer).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10812 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-22 23:34:32 +00:00
Albrecht Schlosser
01cbcc8406 Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10811 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-22 23:20:47 +00:00
Albrecht Schlosser
59e9573b42 Fix documentation typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10810 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-22 22:37:07 +00:00
Manolo Gouy
1f487ece5d It's possible to transmit an Fl_Shared_Image to Fl_Window::shape(const Fl_Image*) at no cost.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10809 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-22 11:26:27 +00:00
Manolo Gouy
53c72bb905 Prevent common dialogs, e.g., fl_alert(), from changing the currently active Fl_Group.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10808 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-22 10:58:39 +00:00
Albrecht Schlosser
1b0e984a8f Documentation updates (part of STR #2751).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10807 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-21 13:55:13 +00:00
Albrecht Schlosser
6b491e3317 Fix window resizing of common dialogs under certain rare conditions.
The modified test program test/ask.cxx showed a problem that the active
dialog window was resized when fl_message_icon() was called while it was
open, because this call makeform() which resized the window.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10806 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-21 12:48:08 +00:00
Albrecht Schlosser
1763da6596 Update common dialog test program - add "recursive" dialog test.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10805 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-21 12:44:53 +00:00
Manolo Gouy
35704c82a3 Selected text is now displayed using a color that contrasts with the background color
(This commit is in the interest of allowing the release  of FLTK 1.3.4 not to be delayed).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10804 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-21 12:27:54 +00:00
Manolo Gouy
e7291b373c Under Mac OS 10.11 beta, fl_xyline(init,int,int) and fl_yxline(init,int,int) produce bizarre graphics just after
processing a mouse or keyboard event (they are OK in other cases).
We fix that by filling a rectangle instead of stroking along a line (and hope the public 10.11 will have fixed that).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10803 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-21 12:12:37 +00:00
Manolo Gouy
4f6903eed5 The unittests target had wrong product name, and the animated target did not copy the fltk framework.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10802 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-20 12:50:16 +00:00
Manolo Gouy
696231e512 Prepare for Mac OS 10.11 'El Capitan':
- avoid double redraw after window deminiaturization
- make sure that a new window appears on screen during the Fl_X::make() call

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10801 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-20 11:09:48 +00:00
Manolo Gouy
ad4d5ba5b5 Make sure the window is drawn when Fl_X::make() is called
(necessary with Mac OS 10.11).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10800 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-19 21:28:05 +00:00
Albrecht Schlosser
98ef8d52c9 Fix and improve Fl_Table docs, fix some other typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10799 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-18 23:59:54 +00:00
Manolo Gouy
1cf24ff074 Restore compilability with Mac OS SDK 10.3 and above
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10798 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-18 07:18:15 +00:00
Albrecht Schlosser
63433f9be7 Remove unnecessary include file (STR #3133).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10797 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-17 17:53:49 +00:00
Manolo Gouy
ee7a427d87 Allow compilation with early Mac OS SDKs
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10796 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-17 17:17:53 +00:00
Albrecht Schlosser
00da535a78 Fix wrong data type in Windows function override (STR #3232).
This patch uses the correct data type (as defined by Windows / msn)
but does not fix the Cygwin linker problem. Unfortunately.

This issue may be a Cygwin problem and should be reported to Cygwin.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10795 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-17 17:14:14 +00:00
Manolo Gouy
873fa37a56 Fix compilation errors with Mac OS 10.11 that no longer accepts
enum CGLineCap
but wants
  CGLineCap
as type name.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10794 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-17 16:16:09 +00:00
Manolo Gouy
6ad3a28cc5 Comment for a change that appeared in Mac OS 10.11
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10793 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-17 16:14:21 +00:00
Manolo Gouy
70297713f2 Correctly handle Unicode's 'Variation selectors' where a Unicode codepoint
modifies the glyph used to draw the previous Unicode codepoint.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10792 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-16 15:16:24 +00:00
Manolo Gouy
db6b98e4f7 Mac OS: The 'variation selectors' of Unicode change the glyph associated to the preceding unicode character.
This defeats the procedure FLTK uses to compute text widths (precomputing the width of each used
character) because the width of character n is not unique and potentially depends on character n+1.
Therefore, we now remove variation selectors from the input string before drawing it.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10791 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-15 21:56:34 +00:00
Manolo Gouy
7c0c17a452 Preparing for Mac OS 10.11 'El Capitan':
change in rect_to_NSBitmapImageRep().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10790 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-15 21:47:39 +00:00
Manolo Gouy
3283aacf98 Prepare for Mac OS 10.11 "El Capitan"
Screen captures produce ARGB data (instead of RGBA until 10.10)
so access to the raw image data takes now this into account.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10789 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-13 20:43:13 +00:00
Albrecht Schlosser
449e15ecee Add copyright comments, improve comments, don't set FL_ABI_VERSION.
FL_ABI_VERSION should not be set in the IDE projects to avoid having to
update the version numbers for each release.

The default is used if FL_ABI_VERSION is not defined.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10788 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-13 18:17:33 +00:00
Albrecht Schlosser
fb172ecd3c Fix fltk-config for CMake build.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10787 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-12 22:32:30 +00:00
Albrecht Schlosser
9adb181156 Make FL_ABI_VERSION configurable (STR #3161).
This commit adds the configure option --with-abiversion and the CMake option
OPTION_ABI_VERSION. Both options can be set e.g. to 10304 to build with
FL_ABI_VERSION = 10304 (FLTK 1.3.4).

For IDE builds there are new files ide/<IDE-NAME>/FL/abi-version.h that
can be edited to change the ABI version before the FLTK lib is built.
Note that this file MUST be copied to the include/FL directory if the
IDE-built library is to be installed.

The default is FL_ABI_VERSION = FL_MAJOR*10000 + FL_MINOR*100 + 0, i.e.
10300 for all FLTK 1.3.x versions to keep binary compatibility (ABI).

Todo: more tests and more documentation.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10786 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-12 19:23:55 +00:00
Albrecht Schlosser
e5d7f8367e Add "deprecated" warning to examples/fltk-versions.cxx.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10785 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-12 17:45:13 +00:00
Manolo Gouy
9e320937fc Improved Fl_Window::make_current() that now creates a new NSGraphicsContext only when drawing
is not done through the standard event loop.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10784 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-11 15:35:20 +00:00
Albrecht Schlosser
c9d8e0feaa Update fluid .fl files and generated code - remove trailing white space.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10783 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-09 02:09:33 +00:00
Albrecht Schlosser
9488810968 Fix trailing white space in fluid .fl files (STR #3239).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10782 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-09 01:17:33 +00:00
Albrecht Schlosser
4cea3aee0c Fix box background drawing for deactivated widgets (STR #2907).
Two new static methods have been introduced:

  - Fl::box_color(Fl_Color c) returns the bg color dependent on the
    widget's state (inactive_r()).
  - Fl::set_box_color(Fl_Color c) sets the correct bg color dependent
    on the widget's state by calling fl_color(Fl::box_color(c)).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10781 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-09 00:10:44 +00:00
Albrecht Schlosser
349f326933 Fix compiler warning, add inactive (deactivated) box test mode.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10780 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-08 23:41:19 +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
Greg Ercolano
b4662e4f44 Fixes STR#3236; stops errors about "NSInteger was not declared" on OSX 10.4.x
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10778 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-29 15:44:17 +00:00
Manolo Gouy
a6b88e9191 Directly draw windows without forcing the system to send the -[NSView drawRect:] message
because this slowed window drawing under Mac OS 10.10

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10777 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-28 19:28:23 +00:00
Albrecht Schlosser
2778ac6e45 Add documentation of Fl_Scroll::resize(...), fix some more Fl_Scroll docs.
As noticed in fltk.general, documentation of Fl_Scroll::resize() did not
exist, hence the documentation shown was that of the parent class Fl_Group,
which was definitely wrong.

Some more minor documentation fixes have also been applied. No code changes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10776 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-28 13:05:29 +00:00
Albrecht Schlosser
a7670ae8d4 Fix button label clipping (STR #3237).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10775 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-27 15:20:23 +00:00
Albrecht Schlosser
9801bb7839 Prevent sending (FL_SHORTCUT) events to inactive widgets (STR #3216).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10774 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-27 14:13:57 +00:00
Greg Ercolano
aa9b326b56 Fixes STR 3234
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10773 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-23 16:36:47 +00:00
Manolo Gouy
b231696dcf Indentation fix.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10772 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-22 05:15:42 +00:00
Albrecht Schlosser
8c4a98ac36 Fix Fl_Pixmap (background) drawing to respect the clip region (STR #3206).
STR title: (Re-)drawing artefacts with scheme plastic after STR 3059.

It turned out that drawing a pixmap could enlarge the clip region if the
intersection of the clip region and the pixmap was not a single rectangle.
Hence drawing the background pixmap would draw outside the clip region
and leave artefacts when a widget was drawn on top of it. See STR #3206.

Thanks to Manolo who had the idea and provided a patch to draw into
the individual rectangles of a multi-rectangle clip region.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10771 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-21 12:08:15 +00:00
Manolo Gouy
c0b97d86d4 Simpler target-specific options
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10770 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-21 08:23:21 +00:00
Manolo Gouy
59914ef57d Removed some warnings
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10769 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-21 08:08:39 +00:00