From 7a69c22bd71d3c191eb3598f1b4450907414a578 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 5 Dec 2023 17:54:01 +0100 Subject: #856: FLUID: improved Declaration dialog Also makes enum comment in Fl_File_Chooser.fl manageable. Not backward compatible: don't try to recreate the File Chooser with older FLUID versions. --- src/Fl_File_Chooser.fl | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/Fl_File_Chooser.fl') diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl index e70ad8427..c7488ec84 100644 --- a/src/Fl_File_Chooser.fl +++ b/src/Fl_File_Chooser.fl @@ -32,7 +32,17 @@ decl {\#include } {private local class FL_EXPORT Fl_File_Chooser {open } { - decl {enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };} {public local + decl {enum Type { + SINGLE = 0, ///< Select a single, existing file. + MULTI = 1, ///< Select one or more existing files. + CREATE = 2, ///< When used alone, select a single, existing file or specify a new filename. + ///< Can be combined with DIRECTORY (e.g. CREATE|DIRECTORY) to have the same + ///< effect for directories. + DIRECTORY = 4 ///< Select a single, existing directory. Can be combined with CREATE. + };} { + comment {\\enum Type +Determines the type of file chooser presented to the user. +} selected public local } decl {static Fl_Preferences *prefs_;} {private local } @@ -54,7 +64,7 @@ class FL_EXPORT Fl_File_Chooser {open } decl {void fileListCB();} {private local } - decl {void fileNameCB();} {selected private local + decl {void fileNameCB();} {private local } decl {void newdir();} {private local } @@ -389,8 +399,7 @@ else } Function {user_data(void *d)} {return_type void } { - code {data_ = d;} {selected - } + code {data_ = d;} {} } decl {const char *value(int f = 1);} {public local } -- cgit v1.2.3