Commit Graph

3434 Commits

Author SHA1 Message Date
Albrecht Schlosser
9797563552 Improve code formatting according to CMP.
Add one pair of braces for clarity, move some other braces and
else statements around. There's more to that, but these were
minimal changes to improve readability for solving STR #3043.
There are no real code changes involved though.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10474 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-27 15:29:54 +00:00
Lauri Kasanen
e7e8faa25b Improve tooltip behavior for huge tooltips: remove flicker, support key/mouse dismiss
Fixes STR 2650.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10473 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-27 09:47:40 +00:00
Manolo Gouy
a482495236 Corrected case when using retina display.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10472 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-26 20:42:08 +00:00
Manolo Gouy
766a181421 Change necessary now that there are true FLTK sub-windows on the Mac OS X platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10468 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-25 09:03:30 +00:00
Manolo Gouy
d5d6b8ae19 Carbon function TSMGetActiveDocument() and its friends are no longer documented on the Apple web site.
Don’t use them unless Fl::disable_im() is called.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10464 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-19 18:20:41 +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
659480f28b Matches CGContextSaveGState() with corresponding CGContextRestoreGState().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10462 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-19 10:29:30 +00:00
Manolo Gouy
a385786d3a Remove unnecessary statement.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10461 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-19 10:05:47 +00:00
Manolo Gouy
a5c4784ded Use fl_xyline() and fl_yxline() that are better for horizontal and vertical lines.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10460 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-18 21:45:51 +00:00
Manolo Gouy
b8a1618c0a Implement applicationDidUpdate differently according to running OS version.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10459 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-17 16:08:23 +00:00
Manolo Gouy
7d6e58acba Improves the cmd-Q handler as discussed in FLTK.coredev "Safe widget deletion ».
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10457 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-15 21:59:41 +00:00
Albrecht Schlosser
80bd905981 Fl::delete_widget() now hides a widget/window if it is shown (visible_r()).
This is useful (necessary) because in old (pre 1.1.6) which  didn't have
Fl::delete_widget() users would have called 'delete window', which would
have hidden a window and destroyed it as well. Now the widget/window is
hidden immediately, whereas it is destroyed delayed, which comes much
closer to the previous behavior and is useful for better window close
detection in Mac OS X cmd-Q handling.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10456 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-15 15:23:56 +00:00
Manolo Gouy
cc9b73d97a Invalidate the Quit item of the application menu when running modal.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10455 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-15 14:55:15 +00:00
Manolo Gouy
43989ec606 Support for true subwindows under Mac OS X (cont’d).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10454 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-13 15:33:33 +00:00
Manolo Gouy
d2072c818c A subwindow in an Fl_Tile did not work well after recent addition of support for true Mac OS X subwindows.
The tile demo program runs correctly again.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10453 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-13 13:57:27 +00:00
Manolo Gouy
b0c7a6f509 Fix error in Gnome file dialog where a file filter did not work if it did not begin with *
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10452 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-13 12:36:57 +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
eda1158509 Removed useless #include directive.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10444 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-09 11:30:14 +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
13cd0a16b5 Replace deprecated pasteboard manager by cocoa NSPasteboard.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10438 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-07 17:08:13 +00:00
Manolo Gouy
f2bb3ea76c The Fl_Native_File_Chooser class contains, under WIN32, two system-defined structures
(OPENFILENAMEW and BROWSEINFOW). This forces any application program that uses
Fl_Native_File_Chooser to include file windows.h.
This is corrected by using in the Fl_Native_File_Chooser class pointers to the 2 structures.
The changes are protected by #if FLTK_ABI_VERSION >= 10304 for ABI compatibility.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10437 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-06 21:33:09 +00:00
Manolo Gouy
bd1446a6eb Fix for STR#3142 where fl_read_image() correctly reads GL data under X11, but ignores them under MSWindows and Mac OS X.
Moreover, fl_read_image() behaves differently with and without OS virtualization for X11 and MSWindows.
The patched function reads whatever is in the rectangle transmitted in arguments, with and without GL data, with and without subwindows,
on ‘true’ OS or on virtualized OS.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10436 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-06 16:48:57 +00:00
Manolo Gouy
f5e023f9c8 Use +(void)initialize method of the NSObject class.
Create classes FLWindowDelegateBefore10_6 and FLViewBefore10_6 to support text input before Mac OS 10.6

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10435 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-06 15:35:32 +00:00
Lauri Kasanen
4c811151c0 The EWMH check requires an open display.
Fixes a crash when a program calls take_focus() before any window has been show()n.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10434 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-04 17:26:47 +00:00
Albrecht Schlosser
f500ff46e2 Update dependencies for FLTK 1.3.3 release.
This should be the final commit for FLTK 1.3.3.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10431 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-03 10:34:54 +00:00
Manolo Gouy
aee0ee202f Silence compilation warnings.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10427 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-02 21:06:07 +00:00
Albrecht Schlosser
3e1da3012a Remove Fl::*sleep() method family, as discussed in fltk.coredev.
Hopefully this doesn't break Windows or Mac OX IDE builds, please help
testing.

Short story: these functions showed compatibility problems, lacked some
quality (regarding interruption by signals), and maybe more.

This is a combined commit that reverts three (3) svn commits. The following
lists are extracted from git, but show the svn revisions and files:

    Remove Fl::*sleep() family, part 1: revert svn r 10287.

:100644 100644 a988702... 794920f... M	ide/Xcode4/FLTK.xcodeproj/project.pbxproj

    Remove Fl::*sleep() family, part 2: revert svn r 10151.

:100644 100644 cf839e6... bfde9c4... M	ide/Xcode3/FLTK.xcodeproj/project.pbxproj
:100644 100644 794920f... c0c772a... M	ide/Xcode4/FLTK.xcodeproj/project.pbxproj

    Remove Fl::*sleep() family, part 2b: revert svn r 10151 (continued).

:100644 100644 bfde9c4... abf2922... M	ide/Xcode3/FLTK.xcodeproj/project.pbxproj

    Remove Fl::*sleep() family, part 3: revert svn r 10150.

:100644 100644 b469018... e76a3e5... M	FL/Fl.H
:100644 100644 7bb7899... 4d4755d... M	ide/VisualC2008/fltk.lib.vcproj
:100644 100644 9d9a2cf... 334aef8... M	ide/VisualC2008/fltkdll.vcproj
:100644 100644 5533a54... e30058b... M	ide/VisualC2010/fltk.lib.vcxproj
:100644 100644 e49f691... 1259c87... M	ide/VisualC2010/fltk.lib.vcxproj.filters
:100644 100644 946f31a... d53ab80... M	src/CMakeLists.txt
:100644 000000 fed36fd... 0000000... D	src/Fl_sleep.cxx
:100644 100644 3d9656c... 3b265f9... M	src/Makefile
:100644 100644 6eadbcb... 5dd5872... M	test/sudoku.cxx


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10419 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-30 16:05:22 +00:00
Albrecht Schlosser
325fec1f45 Update copyright and CHANGES.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10416 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-30 12:35:36 +00:00
Albrecht Schlosser
c3c5659479 Fix out-of-bounds memory access in Fl_Text_Display (STR #2730).
This bug would only show up in wrap mode.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10415 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-30 11:47:46 +00:00
Lauri Kasanen
637ead9f99 Add missing gl includes
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10414 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-30 09:18:45 +00:00
Lauri Kasanen
fd0861436e Add a missing include in forms_timer.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10413 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-30 09:16:49 +00:00
Lauri Kasanen
7149b58b9c Export fl_xid_
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10412 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-29 20:25:46 +00:00
Manolo Gouy
e292620aad Added missing Doxygen documentation for 4 Fl_Window member functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10405 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-29 15:53:52 +00:00
Lauri Kasanen
6be263865c Update the default word detection to stop for /\&
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10402 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-28 15:33:17 +00:00
Manolo Gouy
a11d067d68 Improves FLTK usage on macintosh computers with retina displays.
The editor demo had grey lines between text lines and its cursor left traces behind
when moved. The scroll demo left some faint lines behind also.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10401 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-28 13:44:09 +00:00
Manolo Gouy
f300b70a99 Added missing #if FLTK_ABI_VERSION >= 10303, that prevented ABI-preserving compilation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10399 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-28 09:49:50 +00:00
Greg Ercolano
15b6c5f12a Explicitly document NULL is not a valid argument for Fl_Text_Display::linenumber_format().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10397 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-27 20:01:41 +00:00
Greg Ercolano
78127ffdd5 Internally manage alloc'ed copy of linenumber_format().
(As per Alrecht's comment #9 in STR #2621)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10396 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-27 19:47:12 +00:00
Albrecht Schlosser
6b6f375af0 Fix documentation of Fl_Input_::word_start() and word_end().
Documentation changes in svn r10383 (STR #3014) said that this would skip
"space-separated" words, which is not true.

Note: The set of word separators is currently not documented, it is
inconsistent with Fl_Text_Display/Fl_Text_Editor, and not UTF-8-aware.
Also, word selection and the above methods use different word delimiters.
This should be fixed in a later release (after 1.3.3).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10394 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-27 12:49:47 +00:00
Manolo Gouy
ffdc36dcb6 Print at high res with Fl_Paged_Device::print_window_part() when using a retina display
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10393 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-26 15:23:03 +00:00
Manolo Gouy
9d5fde73b6 Fixed uchar arguments of fl_rgb_color() calls.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10392 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-23 13:25:55 +00:00
Albrecht Schlosser
8bc8a2fc34 Fix potential compiler warning, seen under MinGW with gcc 4.8.1.
In fact this warning is a false positive, but fixed anyway.
Warning was: x, y may be used uninitialized (or similar).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-23 11:33:43 +00:00
Manolo Gouy
4db77674c3 Removed compilation warnings in fl_rgb_color() calls.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10390 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-23 11:08:16 +00:00
Manolo Gouy
69d5e00ce4 Fixed printing of window title bar buttons under Mac OS X 10.10
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10389 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-23 09:04:30 +00:00
Manolo Gouy
a6878f94ef Fixed error in computation of when the window is not fully contained in the display.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10388 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-22 16:27:20 +00:00
Pierre Ossman
8592cddcfd We need to put the newly created window in our window list
as quickly as possible or we might miss important window
messages.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10387 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-20 15:14:12 +00:00
Albrecht Schlosser
92ff2e30bc Update docs related to buttons and update Fl_Check_Button.png.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10386 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-19 20:17:17 +00:00
Albrecht Schlosser
25cf93b4cb Improve and reorganize Fl_Tile's documentation and test/tile demo.
Moved docs from header file and enhanced docs, particularly about the
resizable() widget and the resize behavior in general.

Changed the tile demo program to use a resizable() with 20 pixels
border distance, so that border dragging is limited as described in the
docs. Updated the image file to reflect the current test/tile.cxx demo.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10385 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-19 14:17:47 +00:00
Albrecht Schlosser
4774c26182 Fix word select dragging bug in text input (STR #3014).
Thanks to Evan Laforge for spotting this and supplying a patch.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10383 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-16 12:15:12 +00:00
Ian MacArthur
68e6e95312 Adjust the Fl_Preferences method
char Fl_Preferences::RootNode::getPath( char *path, int pathlen )

so that it returns a (1), rather than a (-1) in the case that
RUNTIME preferences are being read.

This is for several reasons:

- On some platforms, char is unsigned, so a method that is spec'd to 
return a char type can not safely return (-1) as a value.

- It seems like (most?) other fltk methods that return 
char true/false results return 0 or 1, so this is more consistent.


Thanks to Michael Baeuerle for spotting this one.




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10378 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-14 12:10:18 +00:00