|
1 |
| -// generated by Fast Light User Interface Designer (fluid) version 2.0000 |
| 1 | +// generated by Fast Light User Interface Designer (fluid) version 2.0100 |
2 | 2 |
|
3 |
| -#ifndef fltk_FileChooser_h |
4 |
| -#define fltk_FileChooser_h |
5 |
| - |
6 |
| -#include <fltk/Window.h> |
| 3 | +#ifndef FileChooser_h |
| 4 | +#define FileChooser_h |
| 5 | +// Header for //\n// "$Id: FileChooser.fl 4007 2005-02-04 08:42... |
| 6 | +#include <fltk/DoubleBufferWindow.h> |
7 | 7 | #include <stdio.h>
|
8 | 8 | #include <stdlib.h>
|
9 | 9 | #include <string.h>
|
| 10 | +#include <fltk/Group.h> |
10 | 11 | #include <fltk/Choice.h>
|
| 12 | +#include <fltk/PopupMenu.h> |
11 | 13 | #include <fltk/Button.h>
|
12 |
| -#include "filename.h" |
| 14 | +#include <fltk/Preferences.h> |
| 15 | +#include <fltk/TiledGroup.h> |
13 | 16 | #include <fltk/FileBrowser.h>
|
| 17 | +#include <fltk/InvisibleBox.h> |
| 18 | +#include <fltk/CheckButton.h> |
14 | 19 | #include <fltk/FileInput.h>
|
15 | 20 | #include <fltk/ReturnButton.h>
|
| 21 | +#include <fltk/ask.h> |
16 | 22 |
|
17 |
| -namespace fltk { |
| 23 | +namespace fltk { |
18 | 24 |
|
19 |
| -class FL_API FileChooser { |
| 25 | +class FL_API FileChooser { |
20 | 26 | public:
|
21 |
| - enum { SINGLE, MULTI, CREATE }; |
22 |
| - FileChooser(const char *d, const char *p, int t, const char *title); |
23 |
| - Window *window; |
| 27 | + enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 }; |
24 | 28 | private:
|
25 |
| - inline void cb_window_i(Window*, void*); |
26 |
| - static void cb_window(Window*, void*); |
27 |
| - Choice *dirMenu; |
28 |
| - inline void cb_dirMenu_i(Choice*, void*); |
29 |
| - static void cb_dirMenu(Choice*, void*); |
30 |
| - Button *upButton; |
31 |
| - inline void cb_upButton_i(Button*, void*); |
32 |
| - static void cb_upButton(Button*, void*); |
33 |
| - Button *newButton; |
34 |
| - inline void cb_newButton_i(Button*, void*); |
35 |
| - static void cb_newButton(Button*, void*); |
36 |
| - inline void cb__i(Button*, void*); |
37 |
| - static void cb_(Button*, void*); |
38 |
| - FileBrowser *fileList; |
39 |
| - inline void cb_fileList_i(FileBrowser*, void*); |
40 |
| - static void cb_fileList(FileBrowser*, void*); |
41 |
| - FileInput *fileName; |
42 |
| - inline void cb_fileName_i(FileInput*, void*); |
43 |
| - static void cb_fileName(FileInput*, void*); |
44 |
| - ReturnButton *okButton; |
45 |
| - inline void cb_okButton_i(ReturnButton*, void*); |
46 |
| - static void cb_okButton(ReturnButton*, void*); |
47 |
| - inline void cb_Cancel_i(Button*, void*); |
48 |
| - static void cb_Cancel(Button*, void*); |
| 29 | + static fltk::Preferences prefs_; |
| 30 | + void (*callback_)(FileChooser*, void *); |
| 31 | + void *data_; |
49 | 32 | char directory_[1024];
|
| 33 | + char pattern_[1024]; |
| 34 | + char preview_text_[2048]; |
50 | 35 | int type_;
|
| 36 | + void favoritesButtonCB(); |
| 37 | + void favoritesCB(fltk::Widget *w); |
51 | 38 | void fileListCB();
|
52 | 39 | void fileNameCB();
|
53 | 40 | void newdir();
|
54 |
| - void up(); |
| 41 | + static void previewCB(FileChooser *fc); |
| 42 | + void showChoiceCB(); |
| 43 | + void update_favorites(); |
| 44 | + void update_preview(); |
| 45 | +public: |
| 46 | + FileChooser(const char *d, const char *p, int t, const char *title); |
| 47 | +private: |
| 48 | + fltk::DoubleBufferWindow *window; |
| 49 | + inline void cb_window_i(fltk::DoubleBufferWindow*, void*); |
| 50 | + static void cb_window(fltk::DoubleBufferWindow*, void*); |
| 51 | + fltk::Choice *showChoice; |
| 52 | + inline void cb_showChoice_i(fltk::Choice*, void*); |
| 53 | + static void cb_showChoice(fltk::Choice*, void*); |
| 54 | + fltk::PopupMenu *favoritesButton; |
| 55 | + inline void cb_favoritesButton_i(fltk::PopupMenu*, void*); |
| 56 | + static void cb_favoritesButton(fltk::PopupMenu*, void*); |
55 | 57 | public:
|
| 58 | + fltk::Button *newButton; |
| 59 | +private: |
| 60 | + inline void cb_newButton_i(fltk::Button*, void*); |
| 61 | + static void cb_newButton(fltk::Button*, void*); |
| 62 | + inline void cb__i(fltk::TiledGroup*, void*); |
| 63 | + static void cb_(fltk::TiledGroup*, void*); |
| 64 | + fltk::FileBrowser *fileList; |
| 65 | + inline void cb_fileList_i(fltk::FileBrowser*, void*); |
| 66 | + static void cb_fileList(fltk::FileBrowser*, void*); |
| 67 | + fltk::InvisibleBox *previewBox; |
| 68 | +public: |
| 69 | + fltk::CheckButton *previewButton; |
| 70 | +private: |
| 71 | + inline void cb_previewButton_i(fltk::CheckButton*, void*); |
| 72 | + static void cb_previewButton(fltk::CheckButton*, void*); |
| 73 | + fltk::FileInput *fileName; |
| 74 | + inline void cb_fileName_i(fltk::FileInput*, void*); |
| 75 | + static void cb_fileName(fltk::FileInput*, void*); |
| 76 | + fltk::ReturnButton *okButton; |
| 77 | + inline void cb_okButton_i(fltk::ReturnButton*, void*); |
| 78 | + static void cb_okButton(fltk::ReturnButton*, void*); |
| 79 | + fltk::Button *cancelButton; |
| 80 | + inline void cb_cancelButton_i(fltk::Button*, void*); |
| 81 | + static void cb_cancelButton(fltk::Button*, void*); |
| 82 | + fltk::DoubleBufferWindow *favWindow; |
| 83 | + fltk::FileBrowser *favList; |
| 84 | + inline void cb_favList_i(fltk::FileBrowser*, void*); |
| 85 | + static void cb_favList(fltk::FileBrowser*, void*); |
| 86 | + fltk::Button *favUpButton; |
| 87 | + inline void cb_favUpButton_i(fltk::Button*, void*); |
| 88 | + static void cb_favUpButton(fltk::Button*, void*); |
| 89 | + fltk::Button *favDeleteButton; |
| 90 | + inline void cb_favDeleteButton_i(fltk::Button*, void*); |
| 91 | + static void cb_favDeleteButton(fltk::Button*, void*); |
| 92 | + fltk::Button *favDownButton; |
| 93 | + inline void cb_favDownButton_i(fltk::Button*, void*); |
| 94 | + static void cb_favDownButton(fltk::Button*, void*); |
| 95 | + fltk::Button *favCancelButton; |
| 96 | + inline void cb_favCancelButton_i(fltk::Button*, void*); |
| 97 | + static void cb_favCancelButton(fltk::Button*, void*); |
| 98 | + fltk::ReturnButton *favOkButton; |
| 99 | + inline void cb_favOkButton_i(fltk::ReturnButton*, void*); |
| 100 | + static void cb_favOkButton(fltk::ReturnButton*, void*); |
| 101 | +public: |
| 102 | + ~FileChooser(); |
| 103 | + void callback(void (*cb)(FileChooser *, void *), void *d = 0); |
56 | 104 | void color(Color c);
|
57 | 105 | Color color();
|
58 | 106 | int count();
|
59 | 107 | void directory(const char *d);
|
60 | 108 | char * directory();
|
61 |
| - void exec(); |
62 | 109 | void filter(const char *p);
|
63 | 110 | const char * filter();
|
| 111 | + int filter_value(); |
| 112 | + void filter_value(int f); |
64 | 113 | void hide();
|
65 | 114 | void icon_size(uchar s);
|
66 | 115 | uchar icon_size();
|
67 | 116 | void label(const char *l);
|
68 | 117 | const char * label();
|
| 118 | + void ok_label(const char *l); |
| 119 | + const char * ok_label(); |
| 120 | + void preview(int e); |
| 121 | + int preview() const { return previewButton->value(); }; |
69 | 122 | void rescan();
|
| 123 | + void show(); |
| 124 | + int shown(); |
70 | 125 | void textcolor(Color c);
|
71 | 126 | Color textcolor();
|
72 | 127 | void textfont(Font* f);
|
73 | 128 | Font* textfont();
|
74 |
| - void textsize(uchar s); |
75 |
| - uchar textsize(); |
| 129 | + void textsize(float s); |
| 130 | + float textsize(); |
76 | 131 | void type(int t);
|
77 | 132 | int type();
|
78 |
| - const char *text(int f = 1); |
79 |
| - void text(const char *filename); |
| 133 | + void * user_data() const; |
| 134 | + void user_data(void *d); |
| 135 | + const char *value(int f = 1); |
| 136 | + void value(const char *filename); |
80 | 137 | int visible();
|
| 138 | + static const char *add_favorites_label; |
| 139 | + static const char *all_files_label; |
| 140 | + static const char *custom_filter_label; |
| 141 | + static const char *existing_file_label; |
| 142 | + static const char *favorites_label; |
| 143 | + static const char *filename_label; |
| 144 | + static const char *filesystems_label; |
| 145 | + static const char *manage_favorites_label; |
| 146 | + static const char *new_directory_label; |
| 147 | + static const char *new_directory_tooltip; |
| 148 | + static const char *preview_label; |
| 149 | + static const char *save_label; |
| 150 | + static const char *show_label; |
| 151 | + static File_Sort_F *sort; |
81 | 152 | };
|
82 |
| - |
| 153 | +extern FL_API void file_chooser_ok_label(const char*l); |
83 | 154 | }
|
| 155 | +// Header for //\n// End of "$Id: FileChooser.fl 4007 2005-02-0... |
84 | 156 | #endif
|
0 commit comments