21 #ifndef Fl_File_Chooser_H
22 #define Fl_File_Chooser_H
24 #include <FL/Fl_Double_Window.H>
28 #include <FL/Fl_Group.H>
29 #include <FL/Fl_Choice.H>
30 #include <FL/Fl_Menu_Button.H>
31 #include <FL/Fl_Button.H>
32 #include <FL/Fl_Preferences.H>
33 #include <FL/Fl_Tile.H>
34 #include <FL/Fl_File_Browser.H>
35 #include <FL/Fl_Box.H>
36 #include <FL/Fl_Check_Button.H>
37 #include <FL/Fl_File_Input.H>
38 #include <FL/Fl_Return_Button.H>
39 #include <FL/fl_ask.H>
43 enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
50 char preview_text_[2048];
52 void favoritesButtonCB();
59 void update_favorites();
60 void update_preview();
62 Fl_File_Chooser(
const char *d,
const char *p,
int t,
const char *title);
69 static void cb_showChoice(
Fl_Choice*,
void*);
77 static void cb_newButton(
Fl_Button*,
void*);
79 static void cb_(
Fl_Tile*,
void*);
101 void cb_cancelButton_i(
Fl_Button*,
void*);
102 static void cb_cancelButton(
Fl_Button*,
void*);
108 void cb_favUpButton_i(
Fl_Button*,
void*);
109 static void cb_favUpButton(
Fl_Button*,
void*);
111 void cb_favDeleteButton_i(
Fl_Button*,
void*);
112 static void cb_favDeleteButton(
Fl_Button*,
void*);
114 void cb_favDownButton_i(
Fl_Button*,
void*);
115 static void cb_favDownButton(
Fl_Button*,
void*);
117 void cb_favCancelButton_i(
Fl_Button*,
void*);
118 static void cb_favCancelButton(
Fl_Button*,
void*);
128 void directory(
const char *d);
130 void filter(
const char *p);
131 const char * filter();
133 void filter_value(
int f);
135 void iconsize(
uchar s);
137 void label(
const char *l);
138 const char * label();
139 void ok_label(
const char *l);
140 const char * ok_label();
144 void showHidden(
int e);
145 void remove_hidden_files();
148 void rescan_keep_filename();
159 void * user_data()
const;
160 void user_data(
void *d);
161 const char *value(
int f = 1);
162 void value(
const char *filename);
230 FL_EXPORT
char *
fl_dir_chooser(
const char *message,
const char *fname,
int relative=0);
231 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:199
The Fl_Tile class lets you resize the children by dragging the border between them: ...
Definition: Fl_Tile.H:70
static const char * show_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:215
static const char * save_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:211
Fl_Check_Button * previewButton
The "preview" button is exported so that application developers can control the appearance and use...
Definition: Fl_File_Chooser.H:85
static const char * favorites_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:183
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:73
The Fl_Double_Window provides a double-buffered window.
Definition: Fl_Double_Window.H:40
The Fl_File_Browser widget displays a list of filenames, optionally with file-specific icons...
Definition: Fl_File_Browser.H:39
This widget simply draws its box, and possibly its label.
Definition: Fl_Box.H:34
static const char * all_files_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:171
static const char * hidden_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:219
int preview() const
Returns the current state of the preview box.
Definition: Fl_File_Chooser.H:142
Fl_Button * newButton
The "new directory" button is exported so that application developers can control the appearance and ...
Definition: Fl_File_Chooser.H:74
int( Fl_File_Sort_F)(struct dirent **, struct dirent **)
File sorting function.
Definition: filename.H:116
The Fl_File_Chooser widget displays a standard file selection dialog that supports various selection ...
Definition: Fl_File_Chooser.H:41
static const char * add_favorites_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:167
static const char * new_directory_tooltip
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:203
Fl_Preferences provides methods to store user settings between application starts.
Definition: Fl_Preferences.H:60
#define FL_PATH_MAX
all path buffers should use this length
Definition: filename.H:38
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:155
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:746
Fl_Check_Button * showHiddenButton
When checked, hidden files (i.e., filename begins with dot) are displayed.
Definition: Fl_File_Chooser.H:90
static const char * manage_favorites_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:195
A button that is used to pop up a menu.
Definition: Fl_Choice.H:76
unsigned int Fl_Color
an FLTK color value
Definition: Enumerations.H:774
static const char * preview_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:207
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:717
static Fl_File_Sort_F * sort
the sort function that is used when loading the contents of a directory.
Definition: Fl_File_Chooser.H:224
void fl_file_chooser_callback(void(*cb)(const char *))
Set the file chooser callback.
Definition: fl_file_dir.cxx:44
static const char * custom_filter_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:175
static const char * filesystems_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:191
void fl_file_chooser_ok_label(const char *l)
Set the "OK" button label.
Definition: fl_file_dir.cxx:54
static const char * filename_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:187
static const char * existing_file_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:179
unsigned char uchar
unsigned char
Definition: fl_types.h:30