Move the sources to trunk
[opencv] / otherlibs / _fltk / include / FL / Fl_File_Chooser.H
1 // generated by Fast Light User Interface Designer (fluid) version 1.0102
2
3 #ifndef Fl_File_Chooser_H
4 #define Fl_File_Chooser_H
5 #include <FL/Fl.H>
6 #include <FL/Fl_Window.H>
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <string.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>
22
23 class FL_EXPORT Fl_File_Chooser {
24 public:
25   enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
26 private:
27   static Fl_Preferences prefs_;
28   void (*callback_)(Fl_File_Chooser*, void *);
29   void *data_;
30   char directory_[1024];
31   char pattern_[1024];
32   char preview_text_[2048];
33   int type_;
34   void favoritesButtonCB();
35   void favoritesCB(Fl_Widget *w);
36   void fileListCB();
37   void fileNameCB();
38   void newdir();
39   static void previewCB(Fl_File_Chooser *fc);
40   void showChoiceCB();
41   void update_favorites();
42   void update_preview();
43 public:
44   Fl_File_Chooser(const char *d, const char *p, int t, const char *title);
45 private:
46   Fl_Window *window;
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*);
55 public:
56   Fl_Button *newButton;
57 private:
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*);
65   Fl_Box *previewBox;
66 public:
67   Fl_Check_Button *previewButton;
68 private:
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*);
79   Fl_Window *favWindow;
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*);
98 public:
99   ~Fl_File_Chooser();
100   void callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0);
101   void color(Fl_Color c);
102   Fl_Color color();
103   int count();
104   void directory(const char *d);
105   char * directory();
106   void filter(const char *p);
107   const char * filter();
108   int filter_value();
109   void filter_value(int f);
110   void hide();
111   void iconsize(uchar s);
112   uchar iconsize();
113   void label(const char *l);
114   const char * label();
115   void preview(int e);
116   int preview() const { return previewButton->value(); };
117   void rescan();
118   void show();
119   int shown();
120   void textcolor(Fl_Color c);
121   Fl_Color textcolor();
122   void textfont(uchar f);
123   uchar textfont();
124   void textsize(uchar s);
125   uchar textsize();
126   void type(int t);
127   int type();
128   const char *value(int f = 1);
129   void value(const char *filename);
130   int visible();
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;
143 };
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*));
147 #endif