1 // generated by Fast Light User Interface Designer (fluid) version 1.0102
3 #ifndef Fl_File_Chooser_H
4 #define Fl_File_Chooser_H
6 #include <FL/Fl_Window.H>
10 #include <FL/Fl_Group.H>
11 #include <FL/Fl_Choice.H>
12 #include <FL/Fl_Menu_Button.H>
13 #include <FL/Fl_Button.H>
14 #include <FL/Fl_Preferences.H>
15 #include <FL/Fl_Tile.H>
16 #include <FL/Fl_File_Browser.H>
17 #include <FL/Fl_Box.H>
18 #include <FL/Fl_Check_Button.H>
19 #include <FL/Fl_File_Input.H>
20 #include <FL/Fl_Return_Button.H>
21 #include <FL/fl_ask.H>
23 class FL_EXPORT Fl_File_Chooser {
25 enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
27 static Fl_Preferences prefs_;
28 void (*callback_)(Fl_File_Chooser*, void *);
30 char directory_[1024];
32 char preview_text_[2048];
34 void favoritesButtonCB();
35 void favoritesCB(Fl_Widget *w);
39 static void previewCB(Fl_File_Chooser *fc);
41 void update_favorites();
42 void update_preview();
44 Fl_File_Chooser(const char *d, const char *p, int t, const char *title);
47 inline void cb_window_i(Fl_Window*, void*);
48 static void cb_window(Fl_Window*, void*);
49 Fl_Choice *showChoice;
50 inline void cb_showChoice_i(Fl_Choice*, void*);
51 static void cb_showChoice(Fl_Choice*, void*);
52 Fl_Menu_Button *favoritesButton;
53 inline void cb_favoritesButton_i(Fl_Menu_Button*, void*);
54 static void cb_favoritesButton(Fl_Menu_Button*, void*);
58 inline void cb_newButton_i(Fl_Button*, void*);
59 static void cb_newButton(Fl_Button*, void*);
60 inline void cb__i(Fl_Tile*, void*);
61 static void cb_(Fl_Tile*, void*);
62 Fl_File_Browser *fileList;
63 inline void cb_fileList_i(Fl_File_Browser*, void*);
64 static void cb_fileList(Fl_File_Browser*, void*);
67 Fl_Check_Button *previewButton;
69 inline void cb_previewButton_i(Fl_Check_Button*, void*);
70 static void cb_previewButton(Fl_Check_Button*, void*);
71 Fl_File_Input *fileName;
72 inline void cb_fileName_i(Fl_File_Input*, void*);
73 static void cb_fileName(Fl_File_Input*, void*);
74 Fl_Return_Button *okButton;
75 inline void cb_okButton_i(Fl_Return_Button*, void*);
76 static void cb_okButton(Fl_Return_Button*, void*);
77 inline void cb_Cancel_i(Fl_Button*, void*);
78 static void cb_Cancel(Fl_Button*, void*);
80 Fl_File_Browser *favList;
81 inline void cb_favList_i(Fl_File_Browser*, void*);
82 static void cb_favList(Fl_File_Browser*, void*);
83 Fl_Button *favUpButton;
84 inline void cb_favUpButton_i(Fl_Button*, void*);
85 static void cb_favUpButton(Fl_Button*, void*);
86 Fl_Button *favDeleteButton;
87 inline void cb_favDeleteButton_i(Fl_Button*, void*);
88 static void cb_favDeleteButton(Fl_Button*, void*);
89 Fl_Button *favDownButton;
90 inline void cb_favDownButton_i(Fl_Button*, void*);
91 static void cb_favDownButton(Fl_Button*, void*);
92 Fl_Button *favCancelButton;
93 inline void cb_favCancelButton_i(Fl_Button*, void*);
94 static void cb_favCancelButton(Fl_Button*, void*);
95 Fl_Return_Button *favOkButton;
96 inline void cb_favOkButton_i(Fl_Return_Button*, void*);
97 static void cb_favOkButton(Fl_Return_Button*, void*);
100 void callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0);
101 void color(Fl_Color c);
104 void directory(const char *d);
106 void filter(const char *p);
107 const char * filter();
109 void filter_value(int f);
111 void iconsize(uchar s);
113 void label(const char *l);
114 const char * label();
116 int preview() const { return previewButton->value(); };
120 void textcolor(Fl_Color c);
121 Fl_Color textcolor();
122 void textfont(uchar f);
124 void textsize(uchar s);
128 const char *value(int f = 1);
129 void value(const char *filename);
131 static const char *add_favorites_label;
132 static const char *all_files_label;
133 static const char *custom_filter_label;
134 static const char *existing_file_label;
135 static const char *favorites_label;
136 static const char *filename_label;
137 static const char *filesystems_label;
138 static const char *manage_favorites_label;
139 static const char *new_directory_label;
140 static const char *preview_label;
141 static const char *show_label;
142 static Fl_File_Sort_F *sort;
144 FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname,int relative=0);
145 FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname,int relative=0);
146 FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*));