Commit Graph

44 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
Albrecht Schlosser
b21a3910a9 Improve documentation of Fl_Native_File_Chooser
Document restrictions imposed by the new system file chooser dialogs,
particularly by 'kdialog' and 'zenity' (Unix/X11/Wayland only).
2024-01-31 18:50:25 +01:00
Greg Ercolano
cee69943e5 Small FNFC doc clarification; "pilots" -> "presets" 2023-09-20 23:34:43 -07: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
Albrecht Schlosser
004ea67203 Update dependencies, remove trailing whitespace 2022-12-19 15:23:20 +01:00
ManoloFLTK
41f37613ec Derive Fl_Zenity_Native_File_Chooser_Driver from Fl_Kdialog_Native_…
Also add Fl::option(OPTION_FNFC_USES_ZENITY)
2022-12-16 16:21:23 +01:00
ManoloFLTK
5a7a70b895 Remove compiler warnings about unused parameters (issue #307) 2021-12-09 08:09:51 +01:00
ManoloFLTK
663b93a807 Fix for issue #278: Can we use the qt/kde file picker instead of gtk?
Under the X11 platform, class Fl_Native_File_Chooser will behave as follows :
- if the KDE desktop is used and if command "kdialog" is available in the path,
the Qt/KDE file chooser is used;
- otherwise, if the GTK library is available at run-time,
the GTK file chooser is used;
- otherwise, the FLTK file chooser is used.

In addition, when Fl::OPTION_FNFC_USES_GTK is off, the FLTK file chooser
is always used.
2021-12-07 11:24:35 +01: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
d1afac2150 Add a "Preview" switch to the GTK native file chooser.
The button state is recorded in a preference so is recovered the next
time the GTK file chooser runs.
2020-01-31 08:07:57 +01: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
Matthias Melcher
a9fd08ff5a Doxygen: created Group to document drivers, disabled by default
Uncomment `ENABLED_SECTIONS += DriverDev` in documentation/Doxyfile.in
to enable driver documentation.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12968 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-23 16:47:40 +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
e2edfcbe4f Add Doxygen definitions to the new Fl_XXX_Driver classes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11681 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-23 06:27:31 +00:00
Manolo Gouy
f8104524e8 Use more consistent naming for derived classes of Fl_Native_File_Chooser_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11628 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-16 08:37:15 +00:00
Manolo Gouy
9fea9f3417 Add to Doxygen comments how to proceed for a platform where no file chooser is useful.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11626 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-16 07:55:51 +00:00
Manolo Gouy
fa67aafa9d Rewrite the Fl_File_Native_Chooser class under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11529 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-05 11:25:35 +00:00
Manolo Gouy
1dfe311998 Remove unused member function declaration (Mac OS platform)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11528 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-04 11:57:34 +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
Ian MacArthur
e2cc1a80f0 Some trivial adjustments to support building
under Win32/mingw with the configure/make
on Win7 with Msys.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-28 11:18:01 +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
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
Lauri Kasanen
c7759da19a Export the native file choosers
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10408 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-10-29 20:05:05 +00:00
Manolo Gouy
baebff2227 STR #3088: make Fl_Native_File_Chooser use the standard GTK file dialog when available.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10186 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-06-07 12:01:59 +00:00
Manolo Gouy
44a1407ba2 Improved documentation of enum Fl_Native_File_Chooser::Option.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10178 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-05-31 08:22:34 +00:00
Ian MacArthur
ed04fc6774 Attempt to fix UTF8 encoding of WIN32 Native File Chooser BROWSE_DIRECTORY options
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9932 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-06-06 12:11:08 +00:00
Manolo Gouy
3e7386137e Introduced new Fl_Native_File_Chooser option USE_FILTER_EXT.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9825 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-02-19 15:19:58 +00:00
Manolo Gouy
00ed897277 Documented the fl_open() utility function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9704 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-10-19 11:23:51 +00:00
Manolo Gouy
406bafecc6 Documented the fl_fopen() utility function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9702 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-10-19 09:23:05 +00:00
Manolo Gouy
74496aa2cc Removed several deprecation warnings.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9685 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-09-27 12:49:39 +00:00
Fabien Costantini
d90b170c8d Fixed more warnings in VC2010 32+64 bits builds
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9395 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-24 03:34:26 +00:00
Manolo Gouy
3edb5e5aba Fix STR #2782: allow early #include <FL/Fl_Native_File_Chooser.H>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9193 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-02 09:24:59 +00:00
Matthias Melcher
7694e9b0a6 STR 2719: removed double comment
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9099 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30 10:34:42 +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
d4007d5b06 Replaced /* \file by /** \file so Doxygen sees it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8380 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-06 10:07:28 +00:00
Matthias Melcher
b661be2778 Distille the Native File Chooser files down into a single file. I would like to avoid that the common API runs out of sync between platforms (no code doubling - there was already a mismatch with 'const'), and that the users may wonder which file to include. Please check this on WIN32 and Unix. It does work on OS X.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8378 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-05 22:35:51 +00:00
Greg Ercolano
46518adf58 Fixes problem with doxygen docs showing incorrect #include reference
at top of docs that was confusing users into #include'ing the wrong file.
Problem described here: http://fltk.org/newsgroups.php?gfltk.development+v:11617



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8377 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-05 17:45:00 +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
Greg Ercolano
f910c1c181 Fl_Native_File_Chooser follow up maintenance.
* doxygen docs added
	* Changed all FNFC_XXX macros to full Fl_Native_File_Chooser names for doxygen
	* Added missing svn $Id tags
	* Small mods to Manolo's old_dir[] in Fl_Native_File_Chooser_FLTK to use a dynamic string instead of old_dir[300]



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7003 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-01-14 20:47:59 +00:00
Ian MacArthur
c193aa13aa More Native File Chooser stuff.
The end of file Id tags aren't expanding correctly - looks like a typo.
This is an attempt to fix that!



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7001 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-01-14 19:38:23 +00:00
Greg Ercolano
1de0988c31 Added Fl_Native_File_Chooser widget (with manolo's cocoa mods) to FLTK.
* Source brought into CMP standards compliance
	* test program added (test/native-filechooser.cxx)
	* Tested with linux (Ubuntu8) and with OSX (cocoa and non-cocoa builds)

TODO:
	* Needs doxygen docs from Greg's original HTML documentation
	* Needs mods to Windows build files
	* Needs mods to cmake, and other build files
	* Needs Manolo's latest mods (from STR #2298) mentioned on and after "02:05 Jan 13, 2010"



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6997 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-01-13 23:13:59 +00:00