Commit Graph

81 Commits

Author SHA1 Message Date
Albrecht Schlosser ef952dfa53 Fix crash when Fl_Window::flush() is called before show() (STR #3028).
The fix is twofold:
 (1) if Fl_Window::flush() is called, this is ignored silently
 (2) if Fl_Window::make_current() is called directly, but the window
     is currently not shown(), then the program will be terminated
     with an error message.
The latter is necessary because returning from make_current() would
leave the program in a state where it would expect to have a valid
drawing context.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10095 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-02-07 00:09:52 +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
Matthias Melcher 78039ecb55 Replaced 10302 with 10301 for FLTK_ABI_VERSION
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9706 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-06 20:46:14 +00:00
Matthias Melcher 398acd9c2a STR 2705: moved all inline constructors (that I could find) from header files into source files. Even though this breaks downward compatibility, it does make dynamic linking possible for all classes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9637 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-07-24 04:37:22 +00:00
Fabien Costantini e67e798aeb Fixed build break on FLTK_ABI_VERSION >= 10302 introduce in r9293 as extern ref to fl_copy_offscreen would not be found anymore by linker... This can't be captured yet by the Jenkins continous intergration builds as the compilation is for the FLTK_ABIVERSION >= 10302
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9406 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-28 00:42:31 +00:00
Manolo Gouy 32d4bc4099 Fix STR#2810: removed all uses of function Fl_Device::class_name().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9293 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-18 18:48:29 +00:00
Manolo Gouy f6cb583e27 Replaced fl_copy_offscreen_with_alpha() by Fl_GDI_Graphics_Driver::copy_offscreen_with_alpha() and
fl_create_offscreen_with_alpha() by Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha()

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-12 11:55:50 +00:00
Manolo Gouy 4715e1593e Use a new Fl_Quartz_Graphics_Driver or Fl_GDI_Graphics_Driver instance when printing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9276 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-12 09:39:17 +00:00
Albrecht Schlosser 05f669c9ce Fixed a potential crash if Fl_Double_Window::flush() was called before show().
Thanks to Mathieu Peyrega for the patch in fltk.general [1] on Nov 14, 2011,
although I implemented it differently.
[1] http://www.fltk.org/newsgroups.php?gfltk.general+v:33946


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-28 12:32:56 +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
Albrecht Schlosser 5e7232e776 Janitorial code fixes: braces, indenting, FLTK coding standard.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8383 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-06 12:20:16 +00:00
Manolo Gouy 8072ef8ce8 Replaced a bunch of delete by delete[] where it's legitimate.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8362 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-02 18:39:34 +00:00
Manolo Gouy 18156dfb30 Removed global variable fl_surface that was not very useful because equivalent
to Fl_Surface_Device::surface().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8360 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-02 12:42:47 +00:00
Manolo Gouy bb29437427 Removed global variable fl_display_device that was not very useful because equivalent
to Fl_Display_Device::display_device().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8359 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-02 11:29:18 +00:00
Manolo Gouy bc509d32eb Fix STR #2504 (first part). Replaced HAVE _CAIRO by FLTK_HAVE_CAIRO and USE_CAIRO
by FLTK_USE_CAIRO everywhere.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8198 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-06 10:24:58 +00:00
Manolo Gouy 4beb3b88e8 Renamed Fl_Device::type() to Fl_Device::class_name() to avoid conflict or confusion
with Fl_Widget::type(). Added a setter function Fl_Device::class_name(const char *).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8190 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-05 10:21:45 +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 5c55379301 Added Doxygen doc to offscreen drawing functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7720 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-12 12:34:19 +00:00
Manolo Gouy 8306c3d0b3 Fixed fl_XXX_offscreen functions when the current output goes to a printer or a PostScript device
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7671 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-07-09 17:31:33 +00:00
Manolo Gouy c835c08bb3 Fixed fl_copy_offscreen when output goes to a Quartz printer context.
Output to a PostScript context still needs to be fixed.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7665 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-07-03 10:13:22 +00:00
Manolo Gouy 6c2274f011 fl_begin_offscreen/fl_end_offscreen: added fl_push_noclip/fl_pop_clip to render Mac consistent with other platforms
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7651 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-06-19 15:19:13 +00:00
Manolo Gouy e6935ce29c Removed commented-out debugging statements
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7643 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-06-15 17:44:51 +00:00
Albrecht Schlosser 755f354ebe Fixed X11/XDBE double buffering (STR #2152, #2197). Both bugs could only be
seen if configure was run with --enable-xdbe (default in FLTK 1.3, optional
in FLTK 1.1).

src/Fl_Double_Window.cxx/Fl_Double_Window::resize():

	STR #2152: deallocate back buffer when window is enlarged in any
	dimension to force allocation of a new back buffer. This appears
	to be necessary for some window managers (e.g. Cygwin).

src/Fl_Overlay_Window.cxx/Fl_Overlay_Window::flush() and
src/Fl_Double_Window.cxx/Fl_Double_Window::flush():

	STR #2197: make sure that the entire overlay window will be drawn
	after a window redraw, because Fl_Double_Window::flush(1) erases
	the overlay as documented.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7636 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-06-09 08:36:25 +00:00
Manolo Gouy 26049351e0 Better device hierarchy with surfaces and graphics drivers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7617 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-05-27 17:20:18 +00:00
Manolo Gouy d0b1cc30f7 Removed multiple inheritance: back to r. 7519 exactly.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7522 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-18 06:57:37 +00:00
Manolo Gouy 913530758a Improved the hierarchy of Fl_Device subclasses to allow separation of platform-specific devices.
This introduces multiple inheritance.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7520 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-16 20:19:09 +00:00
Manolo Gouy 2d92942bfe Removed useless #define's
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7464 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-07 07:45:12 +00:00
Manolo Gouy fc95afb7f4 fl_copy_offscreen_with_alpha: always call alpha_blend if not on display
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7378 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-31 09:29:35 +00:00
Manolo Gouy 0eae439b66 fl_copy_offscreen_with_alpha: when non-display output, asks if alpha-blending is possible
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7363 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-30 11:18:45 +00:00
Albrecht Schlosser 21235502c3 Fixed a Windows GDI leak when testing alpha blending capabilities,
simplified code by removing an obsolete if clause.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7009 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-01-15 14:29:48 +00:00
Matthias Melcher 5251b64d57 Changed Copyright in 'src' directory
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01 21:28:26 +00:00
Fabien Costantini 268ffc6ef2 Cairo increment 2: Finer cairo granularity, less deps, new fltk_cairo lib
+ added new USE_CAIRO config preprocessor def. 
   to differentiate from HAVE_CAIRO so that we can use the cairo lib 
   without forcing the full fltk lib to be linked against it.
   In that case, cairo autolink context functionality which needs fltk lib 
   instrumentation is disabled.
 + added new --enable-cairoext, which correspond to previous --enable-cairo.
   now, --enable-cairo only adds HAVE_CAIRO def. and keeps fltk lib
   from referencing cairo.
   In both cases (--enable-cairo & --enable-cairoext), a new fltk_cairo lib is 
   created. This lib, similarly to local versions of png,jpeg and zlib, 
   is not generated if cairo is not enabled.
 + added cairo to fltk-config : now new --use-cairo flag is available
 + modified all unix like makefiles to now generate minimum cairo deps and also
   new libfltk_cairo lib.
 + added new cairo subdir to permit conditional fltk_cairo lib generation. 
 + vc2005 project minimum update to compile without be broken, but still needs
   to create a similar fltk_cairo independent lib. For now, it works as before
   with a dedicated cairo env. similar to --enable-cairoext context in unix.
 + regression tested ok with cairo disabled on win32, mac osx, mingw.
  


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6462 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-19 01:42:35 +00:00
Fabien Costantini 025290929d Fixed missing config.h includes in X11 after QD removal.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6426 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-13 23:44:22 +00:00
Fabien Costantini 92051890f1 Quickdraw removal: option removed from configure, all Qd code removed from sources. Also took this opportunity to sort the ifdef clauses so that USE_X11 shows first. Also added error pragma to enforce proper target checking, thus make even less assumptions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6423 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-13 23:10:43 +00:00
Fabien Costantini ffad932289 + Cairo branch merged after successful testing on Mac OS X 10.5.4, Linux Ubuntu 8.04,Windows XPSP2.
This integration is minimum as discussed, in particular it does not feature any fltk cairo drawing substitution
  as in fltk2.
  Still it provides all the fundations to go further even in next 1.4 ... 
  By default *no* cairo features are implemented nor linked, it can only be activated by --enable-cairo
  whose default is false.
  Please visit the README.cairo for complete description.

+ fixed UTF8 compilation pb on linux ubuntu

+ minor comments fixes on the fly



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6350 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-25 18:26:33 +00:00
engelsman f9dc24a096 doxygen comments for undocumented features of Fl_Double_Window
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6338 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-21 18:55:58 +00:00
Fabien Costantini ae697b80b2 Doxygen documentation : took the opportunity to update copyright info as we modified already in batch almost all sources, added also a fil doxygen command to class headers to harmonize with original matt Fl_Widget dox. format.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-16 07:26:22 +00:00
Fabien Costantini 9bf19e2329 WP1 merged from my branch, WP2 reserved, todo list updated.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6231 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-13 22:33:03 +00:00
Matthias Melcher cd0defc000 Removed warning about unused variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5829 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-05-14 15:51:00 +00:00
Michael R Sweet 3d11948876 Try a slightly different Xdbe implementation that copies instead of swaps.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5679 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-08 20:50:01 +00:00
Michael R Sweet a4814c41c3 Fix scheme background image bug on X11.
Drop changelog for hidden mouse pointer problems since that change was
not made until after 1.1.7 was released (CHANGES only shows changes/fixes
to the previous release...)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5657 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-02 19:37:30 +00:00
Matthias Melcher d63cf6e315 Much improved sensing if a machine will do Alpha blending. This may actually be the solution. If Alpha blending is not supported, we fall back to the old screen door transparency.
This does not take into account a multiple screen setup with different screen depths, but I assume that this is a rare enough constellation and would cause many other problems on top of this minor issue. As a fallback, we will *always* render the image, but worst case without any alpha channel.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5437 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-09-17 12:49:19 +00:00
Matthias Melcher b39938e5cc OK, I believe I fixed the transparency issues on WIN32. Please everyone, test the code on all machines.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5436 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-09-16 16:02:00 +00:00
Matthias Melcher 8238e05727 Found bug in Alpha Blending code when using double buffered windiws. Disabeling code until I find the fix.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5435 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-09-16 14:25:48 +00:00
Matthias Melcher c6de2dd3ef Implemented alpha blending for WIN32. I believe that I did it in a way that is compatible even with Windows 95, but please let me know if you have any concerns. Cygwin not tested, but hopefully OK.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5430 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-09-15 15:35:16 +00:00
Matthias Melcher 30786c2ed3 STR #1310: OS X Quartz support fixed. All test codes now work without complaints fro Quickdraw or CoreGraphics. If no more major bugs are reported for Quartz, I will make Quartz the default over Quickdraw in the next release of FLTK 1.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5178 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-06 08:00:56 +00:00
Matthias Melcher 60ece00315 OS X Quartz: one pretty essential fix to the call order in Quartz context change which fixed a lot of warnings. I also added a file that helps tremondously to debug Core Graphics calls. This file is not compiled into the source tree by default, but the annotations in "src/cgdebug.h" explain the usage.
In regard to CG Text drawing vs. the new ATSU Text drawing: I now remember why I did not ATSU in the beginning: STDU does not use the CG clipping area or text pen settings. So, if you plan on using the current SVN with --enable-quartz, please be aware that you will not have any text clipping or any other text color than black.

Finally, I added code to FLTK on OS X that retreives the selection color from the system instead of assuming dark blue. I am not entirely confident about this change as it may require OS X 10.4 . Feedback appreciiated.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5173 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-04 10:21:45 +00:00
Matthias Melcher 2b6586f64d STR #1007: Applied second patch by hand. OP: could you please check if all changes were made correctly? Thanks!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4563 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-09-12 23:03:34 +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