26#ifndef Fl_File_Chooser_H
27#define Fl_File_Chooser_H
29#include <FL/Fl_Double_Window.H>
31#include <FL/Fl_Choice.H>
32#include <FL/Fl_Menu_Button.H>
33#include <FL/Fl_Button.H>
34#include <FL/Fl_Preferences.H>
35#include <FL/Fl_Tile.H>
36#include <FL/Fl_File_Browser.H>
38#include <FL/Fl_Check_Button.H>
39#include <FL/Fl_File_Input.H>
40#include <FL/Fl_Return_Button.H>
63 char preview_text_[2048];
65 void favoritesButtonCB();
72 void update_favorites();
73 void update_preview();
75 Fl_File_Chooser(
const char *pathname,
const char *pattern,
int type_val,
const char *title);
81 inline void cb_showChoice_i(
Fl_Choice*,
void*);
82 static void cb_showChoice(
Fl_Choice*,
void*);
89 inline void cb_newButton_i(
Fl_Button*,
void*);
90 static void cb_newButton(
Fl_Button*,
void*);
91 inline void cb__i(
Fl_Tile*,
void*);
92 static void cb_(
Fl_Tile*,
void*);
115 inline void cb_cancelButton_i(
Fl_Button*,
void*);
116 static void cb_cancelButton(
Fl_Button*,
void*);
122 inline void cb_favUpButton_i(
Fl_Button*,
void*);
123 static void cb_favUpButton(
Fl_Button*,
void*);
125 inline void cb_favDeleteButton_i(
Fl_Button*,
void*);
126 static void cb_favDeleteButton(
Fl_Button*,
void*);
128 inline void cb_favDownButton_i(
Fl_Button*,
void*);
129 static void cb_favDownButton(
Fl_Button*,
void*);
131 inline void cb_favCancelButton_i(
Fl_Button*,
void*);
132 static void cb_favCancelButton(
Fl_Button*,
void*);
142 void directory(
const char *d);
144 void filter(
const char *p);
145 const char * filter();
147 void filter_value(
int f);
148 void iconsize(
uchar s);
150 void label(
const char *l);
151 const char * label();
152 void ok_label(
const char *l);
153 const char * ok_label();
157 void showHidden(
int e);
158 void remove_hidden_files();
161 void rescan_keep_filename();
173 void * user_data()
const;
174 void user_data(
void *d);
175 const char *value(
int f = 1);
176 void value(
const char *filename);
178 void position(
int x,
int y);
183 void size(
int w,
int h);
184 void resize(
int x,
int y,
int w,
int h);
251 void show_error_box(
int val);
253FL_EXPORT
char *
fl_dir_chooser(
const char *message,
const char *fname,
int relative=0);
254FL_EXPORT
char *
fl_file_chooser(
const char *message,
const char *pat,
const char *fname,
int relative=0);
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:1054
unsigned int Fl_Color
An FLTK color value; see also Colors
Definition: Enumerations.H:1111
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:1083
Fl_Group and Fl_End classes.
This widget simply draws its box, and possibly its label.
Definition: Fl_Box.H:33
A button that is used to pop up a menu.
Definition: Fl_Choice.H:104
The Fl_Double_Window provides a double-buffered window.
Definition: Fl_Double_Window.H:31
The Fl_File_Browser widget displays a list of filenames, optionally with file-specific icons.
Definition: Fl_File_Browser.H:37
The Fl_File_Chooser widget displays a standard file selection dialog that supports various selection ...
Definition: Fl_File_Chooser.H:43
static const char * preview_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:228
Fl_Check_Button * showHiddenButton
When checked, hidden files (i.e., filename begins with dot) are displayed.
Definition: Fl_File_Chooser.H:104
static const char * favorites_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:204
static const char * hidden_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:240
static const char * manage_favorites_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:216
int preview() const
Returns the current state of the preview box.
Definition: Fl_File_Chooser.H:155
static const char * new_directory_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:220
static const char * add_favorites_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:188
static const char * all_files_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:192
static const char * filesystems_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:212
static const char * filename_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:208
static const char * show_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:236
Fl_Button * newButton
The "new directory" button is exported so that application developers can control the appearance and ...
Definition: Fl_File_Chooser.H:87
static const char * custom_filter_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:196
Fl_Check_Button * previewButton
The "preview" button is exported so that application developers can control the appearance and use.
Definition: Fl_File_Chooser.H:99
static Fl_File_Sort_F * sort
the sort function that is used when loading the contents of a directory.
Definition: Fl_File_Chooser.H:245
static const char * new_directory_tooltip
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:224
Type
Determines the type of file chooser presented to the user.
Definition: Fl_File_Chooser.H:49
static const char * existing_file_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:200
static const char * save_label
[standard text may be customized at run-time]
Definition: Fl_File_Chooser.H:232
Fl_Preferences store user settings between application starts.
Definition: Fl_Preferences.H:125
The Fl_Tile class lets you resize its children by dragging the border between them.
Definition: Fl_Tile.H:27
unsigned char uchar
unsigned char
Definition: fl_types.h:30
#define FL_PATH_MAX
all path buffers should use this length
Definition: filename.H:45
int() Fl_File_Sort_F(struct dirent **, struct dirent **)
File sorting function.
Definition: filename.H:114
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:184
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:89
void fl_file_chooser_callback(void(*cb)(const char *))
Set the file chooser callback.
Definition: fl_file_dir.cxx:58
void fl_file_chooser_ok_label(const char *l)
Set the "OK" button label.
Definition: fl_file_dir.cxx:68