1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
|
// Programmed by Jedidiah Barber
// Released into the public domain
#include <FL/Fl_File_Chooser.H>
#include <FL/Fl_Widget.H>
#include "c_fl_file_chooser.h"
// Flattened C API begins here
FILECHOOSER new_fl_file_chooser(const char * n, const char * p, int k, const char * t) {
Fl_File_Chooser *f = new Fl_File_Chooser(n, p, k, t);
return f;
}
void free_fl_file_chooser(FILECHOOSER f) {
delete reinterpret_cast<Fl_File_Chooser*>(f);
}
void * fl_file_chooser_get_user_data(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->user_data();
}
void fl_file_chooser_set_user_data(FILECHOOSER f, void * ud) {
reinterpret_cast<Fl_File_Chooser*>(f)->user_data(ud);
}
void * fl_file_chooser_newbutton(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->newButton;
}
void * fl_file_chooser_previewbutton(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->previewButton;
}
void * fl_file_chooser_showhiddenbutton(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->showHiddenButton;
}
const char * fl_file_chooser_get_add_favorites_label() {
return Fl_File_Chooser::add_favorites_label;
}
void fl_file_chooser_set_add_favorites_label(const char * s) {
Fl_File_Chooser::add_favorites_label = s;
}
const char * fl_file_chooser_get_all_files_label() {
return Fl_File_Chooser::all_files_label;
}
void fl_file_chooser_set_all_files_label(const char * s) {
Fl_File_Chooser::all_files_label = s;
}
const char * fl_file_chooser_get_custom_filter_label() {
return Fl_File_Chooser::custom_filter_label;
}
void fl_file_chooser_set_custom_filter_label(const char * s) {
Fl_File_Chooser::custom_filter_label = s;
}
const char * fl_file_chooser_get_existing_file_label() {
return Fl_File_Chooser::existing_file_label;
}
void fl_file_chooser_set_existing_file_label(const char * s) {
Fl_File_Chooser::existing_file_label = s;
}
const char * fl_file_chooser_get_favorites_label() {
return Fl_File_Chooser::favorites_label;
}
void fl_file_chooser_set_favorites_label(const char * s) {
Fl_File_Chooser::favorites_label = s;
}
const char * fl_file_chooser_get_filename_label() {
return Fl_File_Chooser::filename_label;
}
void fl_file_chooser_set_filename_label(const char * s) {
Fl_File_Chooser::filename_label = s;
}
const char * fl_file_chooser_get_filesystems_label() {
return Fl_File_Chooser::filesystems_label;
}
void fl_file_chooser_set_filesystems_label(const char * s) {
Fl_File_Chooser::filesystems_label = s;
}
const char * fl_file_chooser_get_hidden_label() {
return Fl_File_Chooser::hidden_label;
}
void fl_file_chooser_set_hidden_label(const char * s) {
Fl_File_Chooser::hidden_label = s;
}
const char * fl_file_chooser_get_manage_favorites_label() {
return Fl_File_Chooser::manage_favorites_label;
}
void fl_file_chooser_set_manage_favorites_label(const char * s) {
Fl_File_Chooser::manage_favorites_label = s;
}
const char * fl_file_chooser_get_new_directory_label() {
return Fl_File_Chooser::new_directory_label;
}
void fl_file_chooser_set_new_directory_label(const char * s) {
Fl_File_Chooser::new_directory_label = s;
}
const char * fl_file_chooser_get_new_directory_tooltip() {
return Fl_File_Chooser::new_directory_tooltip;
}
void fl_file_chooser_set_new_directory_tooltip(const char * s) {
Fl_File_Chooser::new_directory_tooltip = s;
}
const char * fl_file_chooser_get_preview_label() {
return Fl_File_Chooser::preview_label;
}
void fl_file_chooser_set_preview_label(const char * s) {
Fl_File_Chooser::preview_label = s;
}
const char * fl_file_chooser_get_save_label() {
return Fl_File_Chooser::save_label;
}
void fl_file_chooser_set_save_label(const char * s) {
Fl_File_Chooser::save_label = s;
}
const char * fl_file_chooser_get_show_label() {
return Fl_File_Chooser::show_label;
}
void fl_file_chooser_set_show_label(const char * s) {
Fl_File_Chooser::show_label = s;
}
void * fl_file_chooser_add_extra(FILECHOOSER f, void * w) {
return reinterpret_cast<Fl_File_Chooser*>(f)->add_extra(reinterpret_cast<Fl_Widget*>(w));
}
typedef void (*Chooser_Callback)(Fl_File_Chooser *, void *);
void fl_file_chooser_callback(FILECHOOSER f, void * c, void * u) {
reinterpret_cast<Fl_File_Chooser*>(f)->callback(reinterpret_cast<Chooser_Callback>(c), u);
}
unsigned int fl_file_chooser_get_color(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->color();
}
void fl_file_chooser_set_color(FILECHOOSER f, unsigned int c) {
reinterpret_cast<Fl_File_Chooser*>(f)->color(c);
}
unsigned char fl_file_chooser_get_iconsize(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->iconsize();
}
void fl_file_chooser_set_iconsize(FILECHOOSER f, unsigned char i) {
reinterpret_cast<Fl_File_Chooser*>(f)->iconsize(i);
}
const char * fl_file_chooser_get_label(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->label();
}
void fl_file_chooser_set_label(FILECHOOSER f, const char * t) {
reinterpret_cast<Fl_File_Chooser*>(f)->label(t);
}
const char * fl_file_chooser_get_ok_label(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->ok_label();
}
void fl_file_chooser_set_ok_label(FILECHOOSER f, const char * t) {
reinterpret_cast<Fl_File_Chooser*>(f)->ok_label(t);
}
int fl_file_chooser_get_preview(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->preview();
}
void fl_file_chooser_set_preview(FILECHOOSER f, int p) {
reinterpret_cast<Fl_File_Chooser*>(f)->preview(p);
}
unsigned int fl_file_chooser_get_textcolor(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->textcolor();
}
void fl_file_chooser_set_textcolor(FILECHOOSER f, unsigned int c) {
reinterpret_cast<Fl_File_Chooser*>(f)->textcolor(c);
}
int fl_file_chooser_get_textfont(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->textfont();
}
void fl_file_chooser_set_textfont(FILECHOOSER f, int n) {
reinterpret_cast<Fl_File_Chooser*>(f)->textfont(n);
}
int fl_file_chooser_get_textsize(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->textsize();
}
void fl_file_chooser_set_textsize(FILECHOOSER f, int s) {
reinterpret_cast<Fl_File_Chooser*>(f)->textsize(s);
}
int fl_file_chooser_get_type(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->type();
}
void fl_file_chooser_set_type(FILECHOOSER f, int t) {
reinterpret_cast<Fl_File_Chooser*>(f)->type(t);
}
int fl_file_chooser_count(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->count();
}
const char * fl_file_chooser_get_directory(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->directory();
}
void fl_file_chooser_set_directory(FILECHOOSER f, const char * v) {
reinterpret_cast<Fl_File_Chooser*>(f)->directory(v);
}
const char * fl_file_chooser_get_filter(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->filter();
}
void fl_file_chooser_set_filter(FILECHOOSER f, const char * v) {
reinterpret_cast<Fl_File_Chooser*>(f)->filter(v);
}
int fl_file_chooser_get_filter_value(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->filter_value();
}
void fl_file_chooser_set_filter_value(FILECHOOSER f, int v) {
reinterpret_cast<Fl_File_Chooser*>(f)->filter_value(v);
}
void fl_file_chooser_rescan(FILECHOOSER f) {
reinterpret_cast<Fl_File_Chooser*>(f)->rescan();
}
void fl_file_chooser_rescan_keep_filename(FILECHOOSER f) {
reinterpret_cast<Fl_File_Chooser*>(f)->rescan_keep_filename();
}
const char * fl_file_chooser_get_value(FILECHOOSER f, int n) {
return reinterpret_cast<Fl_File_Chooser*>(f)->value(n);
}
void fl_file_chooser_set_value(FILECHOOSER f, const char * v) {
reinterpret_cast<Fl_File_Chooser*>(f)->value(v);
}
void fl_file_chooser_show(FILECHOOSER f) {
reinterpret_cast<Fl_File_Chooser*>(f)->show();
}
void fl_file_chooser_hide(FILECHOOSER f) {
reinterpret_cast<Fl_File_Chooser*>(f)->hide();
}
int fl_file_chooser_shown(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->shown();
}
int fl_file_chooser_visible(FILECHOOSER f) {
return reinterpret_cast<Fl_File_Chooser*>(f)->visible();
}
|