Commit Graph

81 Commits

Author SHA1 Message Date
ManoloFLTK
abfc8ee52f Fix: Fl_Native_File_Chooser::filter_value() [Kdialog] always returns 0 (#899)
- remove build option FLTK_USE_KDIALOG replaced by an Fl::option() option
- new run-time option OPTION_FNFC_USES_KDIALOG
- make options OPTION_FNFC_USES_KDIALOG and OPTION_FNFC_USES_ZENITY
false by default
- add mention of new program fltk-options in the doc of Fl::option()
- change logic of choice of the native file chooser under X11/Wayland:
the zenity and kdialog choosers are opt-in; otherwise the GTK file chooser
is used, unless opted out with  OPTION_FNFC_USES_GTK
- document that zenity may be interesting for sandboxed apps
- document that both zenity and kdialog make member functions
Fl_Native_File_Chooser::filter_value() inoperable
2024-04-22 16:34:08 +02:00
Albrecht Schlosser
fd5cd80935 Introduce "Modern CMake" in FLTK
This is a big commit and there are too many changes to list them all.
The main changes are:

- rename all CMake build options to 'FLTK_*'
- export library targets with namespace (prefix) 'fltk::'
- standardize shared library target names with suffix '-shared'
- set public build properties on libraries for consumers
- document library names and aliases in README.CMake.txt
- document changes in "Migrating Code from FLTK 1.3 to 1.4"
- partial backwards compatibility for old user projects

Included but not directly related changes:

- fix Windows (Visual Studio) DLL build
- add CMake function fl_debug_target() to show target properties
- don't build test programs if FLTK is a subproject
- internal: reformat CMake code: remove space before '('

Thanks to Matthias and Manolo for their help, testing, and feeback.
2024-02-07 18:37:34 +01:00
ManoloFLTK
c47cbf4402 More detailed documentation of Fl::screen_xywh() 2023-07-10 09:18:26 +02:00
ManoloFLTK
4d2d3cf76d Documentation: explain how to refresh GUI while printing 2023-07-09 12:59:54 +02:00
Matthias Melcher
44c874b731
Use FL_OVERRIDE for all overridden virtual methods (#611)
FL_OVERRIDE is defined as `override` for C++11 and higher
FL_OVERRIDE is defined as `override` for VisualC 2015 and newer
Don't interfere with Fl_Widget::override()
2022-12-30 19:14:36 +01:00
ManoloFLTK
9d869d73c1 Begin documenting the Wayland platform, new in FLTK version 1.4 2022-03-10 15:05:26 +01:00
ManoloFLTK
1761523c9e Add Fl_PostScript_File_Device::close_command(Fl_PostScript_Close_Command cmd)
Also expand Doxygen doc of class Fl_Printer for the X11 platform.
2020-11-01 09:26:40 +01:00
ManoloFLTK
0d8385a652 Simpler macOS implementation of capture of window titlebars. 2020-10-12 21:05:38 +02:00
Albrecht Schlosser
f09e17c3c5 Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files

The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
2020-07-06 20:28:20 +02:00
ManoloFLTK
2878fa95ab Add optional argument to Fl_Printer::begin_job() to inform caller when an error occurs.
This solves an issue raised in fltk.general :  Fl_Printer errors - how can I interpret them?
    https://www.fltk.org/newsgroups.php?s38419+gfltk.general+v38427
2020-04-22 16:01:33 +02:00
ManoloFLTK
4f8e692f30 Add default value of 0 for 1st arg of member function Fl_Printer::begin_job(). 2019-10-22 13:16:14 +02:00
ManoloFLTK
a471c67f67 Add default argument values to reimplementations of Fl_Widget_Surface::draw_decorated_window 2019-05-25 18:39:26 +02:00
ManoloFLTK
4abaeba539 Doxygen: make explanation of how PostScript text works always visible. 2019-04-12 11:29:08 +02:00
ManoloFLTK
7a0bebb22f New virtual member function bool Fl_Surface_Device::is_current() 2019-04-10 13:14:04 +02:00
Matthias Melcher
b8e97d7c28 Doxygen only: fixed all block comments starting with an asterisk to space-only, fixed doxygen keywords prepended with @ to use a backward slash instead. No code was changed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12970 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23 20:50:22 +00:00
Manolo Gouy
8ef4035b6d Replace Fl_Paged_Device::newPrinterDriver() by Fl_Printer::newPrinterDriver().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12937 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-25 06:54:03 +00:00
Manolo Gouy
2b7aac129b Rename Fl_Paged_Device::start_job() to begin_job() and Fl_Paged_Device::start_page() to begin_page().
The new function names begin_job() and begin_page() better match end_job() and end_page() with which
they must be used by pair.
The old names start_job() and start_page() are maintained for API compatibility with FLTK 1.3.x

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12910 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-09 14:16:35 +00:00
Manolo Gouy
20ccb6b7f2 Shorten the list of virtual member functions used to support Fl_Widget_Surface derived classes.
Change Fl_Cocoa_Screen_Driver::read_win_rectangle() so it captures only
from the current window and ignores its subwindows, as do other Fl_Screen_Driver derived classes.

Remove Fl_Cocoa_Printer_Driver::print_window_part() that is no longer necessary.
Remove Fl_Printer::print_widget() and Fl_Printer::print_window_part() that
are no longer necessary.

Stop Fl_Widget_Surface::print_window_part() from being virtual because its platform-independent
implementation should suffice.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12894 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-05-04 15:11:47 +00:00
Albrecht Schlosser
52ae3582a2 Replace "WIN32" with "_WIN32" or "Windows".
Replace compiler/preprocessor/platform macro "WIN32" with "_WIN32".
Replace "WIN32" in text and documentation with "Windows".
Replace "MSWindows" with "Windows".

To do: README.Windows.txt (and maybe other documentation as well)
needs updates.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-09 14:39:42 +00:00
Manolo Gouy
fa9a33eaee Beginning of Albrecht's plan for Fl_Window and Fl_Window_Driver classes.
Still unclear whether the implementation of the flush() functions follows the plan.
The Fl_Printer class is fully rewritten under the driver model.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11364 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-18 18:20:11 +00:00
Manolo Gouy
f11fe83e5e Rewrite of Fl_Printer under the driver model - first step
Next step will involve moving code to new, platform-specific files.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11350 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-11 20:32:48 +00:00
Albrecht Schlosser
d67e9ccb73 Fix compiler warnings (STR #2988) - final commit.
This commit includes all fixes from branch-1.3 (svn r 11243) and additional
fixes for warnings that crept in during the porting efforts, particularly
C++ ("//") comments in C and included header files, and some more.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11246 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-27 17:27:21 +00:00
Manolo Gouy
81bd759b53 Remove Fl_Printer::driver() that is already implemented in a parent class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11236 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-26 20:27:41 +00:00
Manolo Gouy
350cca5446 Use the FL_DOXYGEN preprocessor variable to remove all Doxygen warnings
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11232 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-26 17:17:20 +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
Manolo Gouy
7f17b915db Remove the useless pseudo run-time type information supported by the Fl_Device class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11217 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-25 17:56:48 +00:00
Manolo Gouy
f33b45f1d3 Remove all uses of the fl_gc global variable. Towards a clean driver model.
fl_gc remains usable by the application as a hook into the system.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-18 16:21:51 +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
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
Manolo Gouy
a278a478fd New CMake option OPTION_PRINT_SUPPORT - continued
The previous version (r11127) had FL/Fl_Printer.H include config.h
That is not allowed. This commit repairs that.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11130 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-06 05:56:38 +00:00
Manolo Gouy
a8a777ff26 New CMake option OPTION_PRINT_SUPPORT turned ON by default
When the option is off, file config.h defines NO_PRINT_SUPPORT 
which in turn produces a library without print support, that is, 
class Fl_Printer does nothing.
When off, the FLTK library is somewhat smaller.
Can be turned off only when the X11 library is used.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11127 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-05 16:34:42 +00:00
Matthias Melcher
b1520373ae Created pseudo code for all FL_PORTED section so that FLTK compiles and links (Xcode, hello, other C flags: -D FL_PORTING -U __APPLE__ -U __APPLE_QUARTZ__)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10993 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-04 23:09:32 +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
Manolo Gouy
c0ed548005 1) More detailed Doxygen documentation for classes Fl_Printer, Fl_Surface_Device, Fl_Display_Device
and Fl_Graphics_Driver.
2) Support call of Fl_Printer::start_job(pagecount) with pagecount=0 when the number of pages is unavailable.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10592 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-26 15:38:54 +00:00
Manolo Gouy
4e53b4f616 Documented how it is possible to change the default paper size for a printer on the Unix/Linux platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10526 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-01-19 14:16:18 +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
1a9b72429e Improved how the system-dependent global variable fl_gc is declared
with or without declaring the FL_INTERNALS preprocessor variable.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-14 15:17:32 +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
258949918c Added reference to print_window() to the doc of the Fl_Printer class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8830 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-20 07:53:06 +00:00
Manolo Gouy
b87a0b7390 Added missing FL_EXPORT class declarations.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8699 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-20 16:39:06 +00:00
Manolo Gouy
0c02f2dabd Added Fl_Printer::driver(void) function that can be useful.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8565 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-06 13:43:09 +00:00
Manolo Gouy
265f213d23 Added function Fl_Printer::set_current() that may be useful.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8563 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-06 12:11:26 +00:00
Manolo Gouy
d8822aa74a Fl_Device: removed class_name(char *) member function and set class_name(void) virtual.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8467 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-23 14:36:18 +00:00
Manolo Gouy
7c932c25d6 Added the possibility to call Fl_Paged_Device::scale(factor) with a single argument.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8366 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-04 09:17:45 +00:00
Manolo Gouy
535f0c2d3b Introduction of the Fl_Printer class requires all member functions of class
Fl_Paged_Device to be virtual. That is done here.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8342 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-31 15:53:23 +00:00
Manolo Gouy
1993f08a33 Added Fl_Printer::add_image(const ichar*) needed for correct memory usage by
Fl_Paged_Device::print_window_part().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8341 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-31 13:02:55 +00:00
Manolo Gouy
ead3432f9b Classes Fl_Printer and Fl_Postscript_Printer: added missing class_name() calls.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8197 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-06 08:46:54 +00:00
Manolo Gouy
9f61a96b85 Declared protected the constructors of classes Fl_System_Printer and Fl_Postscript_Printer,
so end users only employ the system-independent Fl_Printer class.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-06 06:06:57 +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
Manolo Gouy
6320a7c680 Fix in Doxygen comments.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-04 22:04:54 +00:00