Commit Graph

100 Commits

Author SHA1 Message Date
Albrecht Schlosser
f120334da3 Fix Doxygen warnings.
There was one obvious warning in src/fl_read_image.cxx, but others
have to do with incomplete code and platform specific definitions.

I'm not entirely happy with these changes. Temporary changes have been
marked with 'FIXME' and should be removed later if possible.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11547 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-06 22:20:32 +00:00
Matthias Melcher
6955d5d082 Completed the vector font.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11424 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-25 23:10:15 +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
e3ee1e7b81 Rewrite Fl_Window::size_range_() under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11410 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-23 17:13:09 +00:00
Manolo Gouy
affdcdb525 Rewrite Fl_Window::fullscreen_x() under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11407 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-23 14:36:58 +00:00
Manolo Gouy
6302b3da00 Move all icon-support data to the platform-specific Fl_XXX_Window_Driver class
because these data are platform-specific.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11399 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-22 13:27:22 +00:00
Manolo Gouy
4baca53944 Continue implementation of class Fl_Window_Driver according to Albrecht's plan.
This removes a bunch of
   friend class Fl_XXX_Window_Driver;
declarations from Fl_Window.H, and therefore allows
to add a new window driver without modifying the platform-independent code.

The Fl_PicoXXX_Window_Driver classes  have been modified but not tested ==> test needed.

File Fl_X11_Window_Driver.cxx contained this:

// DO NOT call this if the window is not mapped!
static int can_xdbe()
 { ... }

The new code does call can_xdbe() before any window is mapped,
and does work. Since can_xdbe() asks the X server whether it supports
the Xdbe extension, I don't see why this should not work without a
mapped window. This point should be clarified by the author of
"DO NOT call this if the window is not mapped!".


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11388 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-20 08:44:30 +00:00
Matthias Melcher
b496d18b85 Fixed 'flush()' code for single, double, and overlay buffering
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11359 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-13 22:16:37 +00:00
Matthias Melcher
30756ae350 Window functions to retrieve more detailed window type
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-13 15:31:26 +00:00
Matthias Melcher
5953f5a695 Quick fix for Fluid on X11. MSWindows version broken due to missing Fl_Printer::Helper::Helper
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11357 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-12 23:44:57 +00:00
Manolo Gouy
2952c530b8 Rewrite capture of window decorations using the window driver approach.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11345 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-11 07:07:42 +00:00
Matthias Melcher
ac1932eaa7 (incomplete) Add files required to compile for Android via Pico driver.
Don't get your hopes up just yet: this code does compile, but it doesn't fully link yet. If you like to test this, install the Android SDK and NDK, set the usual environment variables, then change into the "Android" direktory and run "mk". It will currently fail at the linker stage.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11343 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-11 00:19:27 +00:00
Manolo Gouy
31fcd84ca9 Rewrite all window icon-related Fl_Window API with the window driver approach.
It seems this allows not to #include <windows.h> in the public header files.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11342 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-10 22:26:40 +00:00
Manolo Gouy
d4768073fa Implement non-rectangular windows using the Window Driver mechanism.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11336 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-10 17:19:34 +00:00
Matthias Melcher
00750d4c33 Add very basic graphics support to PicoSDL.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-08 00:35:00 +00:00
Matthias Melcher
12eef8e64d Separating Fl_X and Fl_Window_Driver in Fl_Window.
This was needed because Fl_X only exists if a window is mapped, but we need the driver from the very beginning. Adding Fl_X in the ctor would create hidden bugs. Strategy is now to remove system specific stuff from Fl_X and move it one-by-one to Fl_Window_Driver while maintaining a working code base. X11 and WIN32 fixups will follow in 15 minutes.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11308 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-07 21:15:25 +00:00
Manolo Gouy
5ca73da7b3 Driver-based Fl_Double_Window implementation - continued.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11304 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-06 22:22:22 +00:00
Manolo Gouy
682f950796 Create class Fl_Widget_Surface that supports draw(Fl_Widget *, int, int).
This simplifies the implementation of Fl_Copy_Surface and Fl_Image_Surface
which now are made to derive from Fl_Widget_Surface.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11220 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-26 12:51:47 +00:00
Matthias Melcher
399501783c Add example code to Fl_Window_Driver.
Some refactoring of a take_focus() function into driver structures (not too happy with it, because it has some kind of bug fix. However, shouldn't *all* Fl_Windows always have an FL_Window_Driver?)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-19 22:37:41 +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
5d1df0e789 Details on PORTME items. Move fl_parse_color() to screen drivers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11163 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13 12:57:00 +00:00
Manolo Gouy
bf7c25a1d7 Add Fl_Shared_Image *Fl_Image_Surface::highres_image() to draw into high-resolution bitmap.
Also, change arguments of void Fl_Window::capture_titlebar_and_borders() from
Fl_RGB_Image to F_Shared_Image so, in the future, scaled images having
a drawing size distinct from a pixel size can be returned, to support
high-resolution displays.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11159 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-12 16:17:40 +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
99a6faa513 Fix valgrind warning (uninitialized variable) in Fl_Window.
Regression only with FLTK_ABI_VERSION >= 10303 (since FLTK 1.3.3).
Was fixed in FLTK 1.3.4.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11136 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-09 01:48:08 +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
Matthias Melcher
acf6c881d3 Updated platform specific #if's to report unimplemented code when compiling with FL_PORTING defined and WIN32 and __APPLE__ undefined>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-03 22:54:29 +00:00
Albrecht Schlosser
eb7d55e218 Document Fl_Window::show() calling Fl_Group::current(0).
Also fix indenting in src/Fl_win32.cxx.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10820 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-27 18:13:46 +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
Ian MacArthur
11ef7ee9e6 Add method Fl_Window::clear_modal_states(),
addresses STR #3123



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10404 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-29 14:21:08 +00:00
Albrecht Schlosser
fc912ef786 Fix ABI compatibility comments.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10362 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-05 23:38:39 +00:00
Albrecht Schlosser
eb1af07952 Add Fl_Window::wait_for_expose() and test program (STR #3124).
Also modified .gitignore, svn-properties, Makefile and CMake-Files.

Todo: test/twowin.cxx and test/windowfocus.cxx need to be added to ide files
(MS VC++ and Xcode).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10339 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-26 23:58:05 +00:00
Manolo Gouy
f1b2c92fce STR#3093 continued: deleted the Fl_Shaped_Window class. Instead, added new member function Fl_Window::shape(Fl_Image*)
that gives a non-rectangular shape to a standard window. The benefit is that it works with Fl_Double_Window and Fl_Menu_Window as well.
It also works for free with Fl_Gl_Window on the X11 platform only.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-21 14:10:36 +00:00
Manolo Gouy
8997131377 Added the Fl_Shaped_Window class to support windows of arbitrary shapes.
The new class is fully Doxygen-documented.
Added an example program (example/shapedwindow.cxx) that exercises the new class.
Modified all IDE-supporting files accordingly.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10255 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-08-27 11:55:57 +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
Pierre Ossman
0cfc2554c6 Support for full screen over multiple monitors.
The API follows that of EWMH, which gives you a good control
over which monitors to use.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-06-11 09:10:53 +00:00
Greg Ercolano
9fc45db999 As per notes from STR#2948:
Moved top_window_offset() to being a member of Fl_Widget (was Fl_Window)
    and moved its code near implementations of top_window() and window().



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9872 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-10 21:16:16 +00:00
Greg Ercolano
936f01be5c While suggesting a new top_window() method for STR#2948,
it's realized that for consistency, the recently added window_offset() method
(a few days ago) should be renamed to top_window_offset().



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9870 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-10 20:13:12 +00:00
Greg Ercolano
d5404dea25 Fix for STR #2944 [2]: Fix Apple-specifc nested window problem for Fl_Gl_Window's.
Added new method Fl_Widget::window_offset(x,y)
		       to access the top-level window offset of the current widget.

		       Open to alternative names for the new method.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9866 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-08 18:24:17 +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
Greg Ercolano
71a2e6dd32 Doc fixes for resize() and fullscreen_off():
added variable names to prototypes so doxygen will doc them properly.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9645 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-07-26 00:40:37 +00:00
Greg Ercolano
dd966cb135 Doc fixes for Fl_Window::size_range().
Fixes STR#2863.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9644 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-07-26 00:30:25 +00:00
Albrecht Schlosser
abbd9839bf Fix MS VC++ (2008/2010) compiler error, as discussed in fltk.general in
thread "Compilation error on windows VS 2010 (r9300)" of Mar 24, 2012.
Only the "static" attribute had to be fixed now, since the enum access
problem had been fixed before (r 9325).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9327 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-05 15:04:43 +00:00
Manolo Gouy
08ce2e07d3 Fix STR#2641: true fullscreen windows that cover all their screen including menu bar, task bar, dock.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-23 16:47:53 +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
9ff9cf1230 Added Fl_Paged_Device::print_window() to print a window with its title bar and frame.
Added Fl_Window::decorated_w() and Fl_Window::decorated_h() that return the size
of a window with its title bar and frame.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8593 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-15 21:38:05 +00:00
Albrecht Schlosser
94e5f2e1fc Un-inlined Fl_Window::icon() methods to make them easier to extend w/o
breaking the ABI. See discussion in STR #2563.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8472 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-25 08:44:47 +00:00
Manolo Gouy
802aff1785 Minor changes in Doxygen docs of Fl_Window constructors.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8336 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-30 08:55:46 +00:00
Albrecht Schlosser
7c8ef98a04 Documentation updates: removed three more \todo's.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8157 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-01 14:01:53 +00:00