FLTK 1.3.5
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
Fl_File_Chooser.H
1
//
2
// "$Id$"
3
//
4
// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK).
5
//
6
// Copyright 1998-2015 by Bill Spitzak and others.
7
//
8
// This library is free software. Distribution and use rights are outlined in
9
// the file "COPYING" which should have been included with this file. If this
10
// file is missing or damaged, see the license at:
11
//
12
// http://www.fltk.org/COPYING.php
13
//
14
// Please report all bugs and problems on the following page:
15
//
16
// http://www.fltk.org/str.php
17
//
18
// =======================================================================
19
// DO NOT EDIT FL/Fl_File_Chooser.H and src/Fl_File_Chooser.cxx !!!
20
// =======================================================================
21
// Please use fluid to change src/Fl_File_Chooser.fl interactively
22
// and then use fluid to "write code" or edit and use fluid -c .
23
// =======================================================================
24
//
25
26
// generated by Fast Light User Interface Designer (fluid) version 1.0305
27
28
#ifndef Fl_File_Chooser_H
29
#define Fl_File_Chooser_H
30
#include <
FL/Fl.H
>
31
#include <FL/Fl_Double_Window.H>
32
#include <stdio.h>
33
#include <stdlib.h>
34
#include <string.h>
35
#include <FL/Fl_Group.H>
36
#include <FL/Fl_Choice.H>
37
#include <FL/Fl_Menu_Button.H>
38
#include <FL/Fl_Button.H>
39
#include <FL/Fl_Preferences.H>
40
#include <FL/Fl_Tile.H>
41
#include <FL/Fl_File_Browser.H>
42
#include <FL/Fl_Box.H>
43
#include <FL/Fl_Check_Button.H>
44
#include <FL/Fl_File_Input.H>
45
#include <FL/Fl_Return_Button.H>
46
#include <
FL/fl_ask.H
>
47
48
class
FL_EXPORT
Fl_File_Chooser
{
49
public
:
50
enum
{ SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
51
private
:
52
static
Fl_Preferences
*prefs_;
53
void (*callback_)(
Fl_File_Chooser
*,
void
*);
54
void
*data_;
55
char
directory_[
FL_PATH_MAX
];
56
char
pattern_[
FL_PATH_MAX
];
57
char
preview_text_[2048];
58
int
type_;
59
void
favoritesButtonCB();
60
void
favoritesCB(
Fl_Widget
*w);
61
void
fileListCB();
62
void
fileNameCB();
63
void
newdir();
64
static
void
previewCB(
Fl_File_Chooser
*fc);
65
void
showChoiceCB();
66
void
update_favorites();
67
void
update_preview();
68
public
:
69
Fl_File_Chooser
(
const
char
*d,
const
char
*p,
int
t,
const
char
*title);
70
private
:
71
Fl_Double_Window
*window;
72
inline
void
cb_window_i(
Fl_Double_Window
*,
void
*);
73
static
void
cb_window(
Fl_Double_Window
*,
void
*);
74
Fl_Choice
*showChoice;
75
inline
void
cb_showChoice_i(
Fl_Choice
*,
void
*);
76
static
void
cb_showChoice(
Fl_Choice
*,
void
*);
77
Fl_Menu_Button
*favoritesButton;
78
inline
void
cb_favoritesButton_i(
Fl_Menu_Button
*,
void
*);
79
static
void
cb_favoritesButton(
Fl_Menu_Button
*,
void
*);
80
public
:
81
Fl_Button
*
newButton
;
82
private
:
83
inline
void
cb_newButton_i(
Fl_Button
*,
void
*);
84
static
void
cb_newButton(
Fl_Button
*,
void
*);
85
inline
void
cb__i(
Fl_Tile
*,
void
*);
86
static
void
cb_(
Fl_Tile
*,
void
*);
87
Fl_File_Browser
*fileList;
88
inline
void
cb_fileList_i(
Fl_File_Browser
*,
void
*);
89
static
void
cb_fileList(
Fl_File_Browser
*,
void
*);
90
Fl_Box
*previewBox;
91
public
:
92
Fl_Check_Button
*
previewButton
;
93
private
:
94
inline
void
cb_previewButton_i(
Fl_Check_Button
*,
void
*);
95
static
void
cb_previewButton(
Fl_Check_Button
*,
void
*);
96
public
:
97
Fl_Check_Button
*
showHiddenButton
;
98
private
:
99
inline
void
cb_showHiddenButton_i(
Fl_Check_Button
*,
void
*);
100
static
void
cb_showHiddenButton(
Fl_Check_Button
*,
void
*);
101
Fl_File_Input
*fileName;
102
inline
void
cb_fileName_i(
Fl_File_Input
*,
void
*);
103
static
void
cb_fileName(
Fl_File_Input
*,
void
*);
104
Fl_Return_Button
*okButton;
105
inline
void
cb_okButton_i(
Fl_Return_Button
*,
void
*);
106
static
void
cb_okButton(
Fl_Return_Button
*,
void
*);
107
Fl_Button
*cancelButton;
108
inline
void
cb_cancelButton_i(
Fl_Button
*,
void
*);
109
static
void
cb_cancelButton(
Fl_Button
*,
void
*);
110
Fl_Double_Window
*favWindow;
111
Fl_File_Browser
*favList;
112
inline
void
cb_favList_i(
Fl_File_Browser
*,
void
*);
113
static
void
cb_favList(
Fl_File_Browser
*,
void
*);
114
Fl_Button
*favUpButton;
115
inline
void
cb_favUpButton_i(
Fl_Button
*,
void
*);
116
static
void
cb_favUpButton(
Fl_Button
*,
void
*);
117
Fl_Button
*favDeleteButton;
118
inline
void
cb_favDeleteButton_i(
Fl_Button
*,
void
*);
119
static
void
cb_favDeleteButton(
Fl_Button
*,
void
*);
120
Fl_Button
*favDownButton;
121
inline
void
cb_favDownButton_i(
Fl_Button
*,
void
*);
122
static
void
cb_favDownButton(
Fl_Button
*,
void
*);
123
Fl_Button
*favCancelButton;
124
inline
void
cb_favCancelButton_i(
Fl_Button
*,
void
*);
125
static
void
cb_favCancelButton(
Fl_Button
*,
void
*);
126
Fl_Return_Button
*favOkButton;
127
inline
void
cb_favOkButton_i(
Fl_Return_Button
*,
void
*);
128
static
void
cb_favOkButton(
Fl_Return_Button
*,
void
*);
129
public
:
130
~
Fl_File_Chooser
();
131
void
callback(
void
(*cb)(
Fl_File_Chooser
*,
void
*),
void
*d = 0);
132
void
color(
Fl_Color
c);
133
Fl_Color
color();
134
int
count();
135
void
directory(
const
char
*d);
136
char
* directory();
137
void
filter(
const
char
*p);
138
const
char
* filter();
139
int
filter_value();
140
void
filter_value(
int
f);
141
void
hide();
142
void
iconsize(
uchar
s);
143
uchar
iconsize();
144
void
label(
const
char
*l);
145
const
char
* label();
146
void
ok_label(
const
char
*l);
147
const
char
* ok_label();
148
void
preview(
int
e);
149
int
preview
()
const
{
return
previewButton->value(); };
150
private
:
151
void
showHidden(
int
e);
152
void
remove_hidden_files();
153
public
:
154
void
rescan();
155
void
rescan_keep_filename();
156
void
show();
157
int
shown();
158
void
textcolor(
Fl_Color
c);
159
Fl_Color
textcolor();
160
void
textfont(
Fl_Font
f);
161
Fl_Font
textfont();
162
void
textsize(
Fl_Fontsize
s);
163
Fl_Fontsize
textsize();
164
void
type(
int
t);
165
int
type();
166
void
* user_data()
const
;
167
void
user_data(
void
*d);
168
const
char
*value(
int
f = 1);
169
void
value(
const
char
*filename);
170
int
visible();
174
static
const
char
*
add_favorites_label
;
178
static
const
char
*
all_files_label
;
182
static
const
char
*
custom_filter_label
;
186
static
const
char
*
existing_file_label
;
190
static
const
char
*
favorites_label
;
194
static
const
char
*
filename_label
;
198
static
const
char
*
filesystems_label
;
202
static
const
char
*
manage_favorites_label
;
206
static
const
char
*
new_directory_label
;
210
static
const
char
*
new_directory_tooltip
;
214
static
const
char
*
preview_label
;
218
static
const
char
*
save_label
;
222
static
const
char
*
show_label
;
226
static
const
char
*
hidden_label
;
231
static
Fl_File_Sort_F
*
sort
;
232
private
:
233
Fl_Widget
* ext_group;
234
public
:
235
Fl_Widget
* add_extra(
Fl_Widget
* gr);
236
};
237
FL_EXPORT
char
*
fl_dir_chooser
(
const
char
*message,
const
char
*fname,
int
relative=0);
238
FL_EXPORT
char
*
fl_file_chooser
(
const
char
*message,
const
char
*pat,
const
char
*fname,
int
relative=0);
239
FL_EXPORT
void
fl_file_chooser_callback
(
void
(*cb)(
const
char
*));
240
FL_EXPORT
void
fl_file_chooser_ok_label
(
const
char
*l);
241
#endif
242
243
//
244
// End of "$Id$".
245
//
© 1998-2016 by Bill Spitzak and others.