30 #ifndef Fl_File_Chooser_H
31 #define Fl_File_Chooser_H
33 #include <FL/Fl_Double_Window.H>
37 #include <FL/Fl_Group.H>
38 #include <FL/Fl_Choice.H>
39 #include <FL/Fl_Menu_Button.H>
40 #include <FL/Fl_Button.H>
41 #include <FL/Fl_Preferences.H>
42 #include <FL/Fl_Tile.H>
43 #include <FL/Fl_File_Browser.H>
44 #include <FL/Fl_Box.H>
45 #include <FL/Fl_Check_Button.H>
46 #include <FL/Fl_File_Input.H>
47 #include <FL/Fl_Return_Button.H>
48 #include <FL/fl_ask.H>
52 enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
59 char preview_text_[2048];
61 void favoritesButtonCB();
68 void update_favorites();
69 void update_preview();
71 Fl_File_Chooser(
const char *d,
const char *p,
int t,
const char *title);
78 static void cb_showChoice(
Fl_Choice*,
void*);
86 static void cb_newButton(
Fl_Button*,
void*);
88 static void cb_(
Fl_Tile*,
void*);
110 void cb_cancelButton_i(
Fl_Button*,
void*);
111 static void cb_cancelButton(
Fl_Button*,
void*);
117 void cb_favUpButton_i(
Fl_Button*,
void*);
118 static void cb_favUpButton(
Fl_Button*,
void*);
120 void cb_favDeleteButton_i(
Fl_Button*,
void*);
121 static void cb_favDeleteButton(
Fl_Button*,
void*);
123 void cb_favDownButton_i(
Fl_Button*,
void*);
124 static void cb_favDownButton(
Fl_Button*,
void*);
126 void cb_favCancelButton_i(
Fl_Button*,
void*);
127 static void cb_favCancelButton(
Fl_Button*,
void*);
137 void directory(
const char *d);
139 void filter(
const char *p);
140 const char * filter();
142 void filter_value(
int f);
144 void iconsize(
uchar s);
146 void label(
const char *l);
147 const char * label();
148 void ok_label(
const char *l);
149 const char * ok_label();
151 int preview()
const {
return previewButton->value(); };
153 void showHidden(
int e);
154 void remove_hidden_files();
157 void rescan_keep_filename();
168 void * user_data()
const;
169 void user_data(
void *d);
170 const char *value(
int f = 1);
171 void value(
const char *filename);
239 FL_EXPORT
char *
fl_dir_chooser(
const char *message,
const char *fname,
int relative=0);
240 FL_EXPORT
char *
fl_file_chooser(
const char *message,
const char *pat,
const char *fname,
int relative=0);
static const char * new_directory_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:208
The Fl_Tile class lets you resize the children by dragging the border between them: ...
Definition: Fl_Tile.H:79
static const char * show_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:224
static const char * save_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:220
Fl_Check_Button * previewButton
The "preview" button is exported so that application developers can control the appearance and use...
Definition: Fl_File_Chooser.H:94
static const char * favorites_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:192
char * fl_file_chooser(const char *message, const char *pat, const char *fname, int relative)
Shows a file chooser dialog and gets a filename.
Definition: fl_file_dir.cxx:82
The Fl_Double_Window provides a double-buffered window.
Definition: Fl_Double_Window.H:49
The Fl_File_Browser widget displays a list of filenames, optionally with file-specific icons...
Definition: Fl_File_Browser.H:48
This widget simply draws its box, and possibly it's label.
Definition: Fl_Box.H:43
static const char * all_files_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:180
static const char * hidden_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:228
int preview() const
Returns the current state of the preview box.
Definition: Fl_File_Chooser.H:151
Fl_Button * newButton
The "new directory" button is exported so that application developers can control the appearance and ...
Definition: Fl_File_Chooser.H:83
int( Fl_File_Sort_F)(struct dirent **, struct dirent **)
File sorting function.
Definition: filename.H:122
The Fl_File_Chooser widget displays a standard file selection dialog that supports various selection ...
Definition: Fl_File_Chooser.H:50
static const char * add_favorites_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:176
static const char * new_directory_tooltip
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:212
Fl_Preferences provides methods to store user settings between application starts.
Definition: Fl_Preferences.H:69
#define FL_PATH_MAX
all path buffers should use this length
Definition: filename.H:44
char * fl_dir_chooser(const char *message, const char *fname, int relative)
Shows a file chooser dialog and gets a directory.
Definition: fl_file_dir.cxx:164
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:741
static const char * manage_favorites_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:204
A button that is used to pop up a menu.
Definition: Fl_Choice.H:85
unsigned int Fl_Color
an FLTK color value
Definition: Enumerations.H:769
static const char * preview_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:216
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:712
static Fl_File_Sort_F * sort
the sort function that is used when loading the contents of a directory.
Definition: Fl_File_Chooser.H:233
void fl_file_chooser_callback(void(*cb)(const char *))
Set the file chooser callback.
Definition: fl_file_dir.cxx:53
static const char * custom_filter_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:184
static const char * filesystems_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:200
void fl_file_chooser_ok_label(const char *l)
Set the "OK" button label.
Definition: fl_file_dir.cxx:63
static const char * filename_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:196
static const char * existing_file_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:188
unsigned char uchar
unsigned char
Definition: fl_types.h:39