Commit Graph

6014 Commits

Author SHA1 Message Date
Manolo Gouy 27b3376bf4 Remove the link error sometimes caused by class Fl_XFont_On_Demand not exported from libfltk.so but called
by function gl_font() of file src/gl_draw.cxx (X11-specific).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10504 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-21 10:11:18 +00:00
Manolo Gouy 1a6790b219 Added documentation about the new support for high resolution OpenGL graphics
on Apple retina displays.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10503 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-20 16:52:48 +00:00
Manolo Gouy 006d86b7e9 Removed the Xcode3 directory altogether because Xcode3 is very old
and because Xcode3 opens very well the Xcode4 ide anyway.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10502 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-20 15:04:40 +00:00
Manolo Gouy 09230a9878 Removed compilation warning when compiling fluid/file.cxx on apple.
Also, added explanatory comment of the purpose of a GNUC-specific
attribute in FL/fl_ask.H

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10501 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-20 15:00:27 +00:00
Manolo Gouy a60e5400e2 Function imgProviderReleaseData() is made apple-specific.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10500 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-20 14:41:02 +00:00
Manolo Gouy 36c2877a60 Removed use of AGL framework
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10499 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-20 08:09:03 +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
Greg Ercolano a7dc3ea9e2 Fix problem with *horiz* dot pattern alignment,
optimized draw loop, fixed indent.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10497 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-19 05:55:08 +00:00
Greg Ercolano 67341668f8 Optimize drawing loop, fix indent.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10496 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-19 05:48:50 +00:00
Manolo Gouy ea279f9354 Avoid double window redraw after deminiaturization.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10495 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-19 04:53:01 +00:00
Greg Ercolano bcc7dc8b6f Fixes STR #3169, comment #8.
Prevents warnings from OSX 10.9.x clang compiler.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10494 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-19 03:50:09 +00:00
Greg Ercolano 889a8a6d42 Fixes STR #3169, comments #4, #5 and #7.
Prevents warnings from the OSX 10.9.x clang compiler.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10493 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-19 03:47:32 +00:00
Greg Ercolano cdee5e204f Fixes STR #3169, comment #3.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10492 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-19 03:41:45 +00:00
Greg Ercolano 2ca381c281 Unused functions makePath() and makePathForFile() removed. (STR#3169)
Albrecht adds in comment #3: "These have been replaced by fl_make_path()
and fl_make_path_for_file() in src/fl_utf8.cxx."



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10491 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-19 03:30:27 +00:00
Manolo Gouy f2cba934cb Restores compilation with SDK’s before 10.7, erroneously broken in a recent commit.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10490 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-18 17:32:08 +00:00
Manolo Gouy d8ddb7b511 Removed compilation warning for unused variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-18 08:27:28 +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 00dd28afa4 Completed support of retina displays for Fl_Paged_Device::print_window_part().
Case with high resolution parent window and low resolution GL window is now directly processed.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10485 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-12 17:12:11 +00:00
Manolo Gouy e230a34cfd It is necessary to compute Fl_X::mapped_to_retina after the window is mapped
because the windowDidMove notification is not always sent.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10484 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-11 22:25:31 +00:00
Manolo Gouy bf07d892a3 Fix case when show() of a subwindow whose parent is not shown yet.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10483 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-11 20:34:47 +00:00
Manolo Gouy 879a8fbabf Propagate Fl_X::mapped_to_retina value from parent to subwindows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10482 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-11 20:09:55 +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 2d0670104b Removed one use of dynamic_cast.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10480 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-11 13:28:23 +00:00
Manolo Gouy 84af5805df Removed statement that became incorrect with true Mac OS X subwindows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10479 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-09 11:15:12 +00:00
Manolo Gouy c082c78805 Removed subwindow-specific code that is no longer needed with true subwindows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10478 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-07 07:24:32 +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
Ian MacArthur 596fd2784a Extend advanced.dox multithreading to add additional caveats
about the use of show() and hide() from child threads, based
on issues reported in fltk.general with tooltip windows
causing issues.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10476 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-12-01 10:42:41 +00:00
Manolo Gouy 0fdb271a78 Make sure that subwindows won’t leak out of their parent window
even if they have coordinates that would provoke it.  

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10475 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-30 12:34:21 +00:00
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
Albrecht Schlosser 3e399aa704 Update CREDITS file.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10471 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-26 15:11:20 +00:00
Albrecht Schlosser 278fafb2f3 Separate and improve documentation of overloaded Fl::event_state() methods.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10470 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-25 14:18:23 +00:00
Albrecht Schlosser 972c6ff7df Fix a doxygen warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10469 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-25 14:15:36 +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
Albrecht Schlosser f7b50362c4 [CMake] Fix CMake 3.1 warning about new policy CMP0053.
CMake Warning (dev) at CMake/export.cmake:48 (set):
  Policy CMP0053 is not set: Simplify variable reference and escape sequence
  evaluation.  Run "cmake --help-policy CMP0053" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

Changed old-style @variable@ replacement to ${variable}. 


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10467 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-24 09:35:04 +00:00
Albrecht Schlosser fd4784a340 Set correct svn properties on CMake files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10466 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-22 00:42:44 +00:00
Albrecht Schlosser 57318e8b3e Update ignored files in examples directory.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10465 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-21 17:17:49 +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 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 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