23#ifndef FL_NATIVE_FILE_CHOOSER_H
24#define FL_NATIVE_FILE_CHOOSER_H
29#if defined(FL_LIBRARY) || FLTK_ABI_VERSION < 10304
33typedef OPENFILENAMEW fl_OPENFILENAMEW;
34typedef BROWSEINFOW fl_BROWSEINFOW;
36typedef void fl_OPENFILENAMEW;
37typedef void fl_BROWSEINFOW;
47#if ! defined(__APPLE__) && !defined(WIN32)
48# include <FL/Fl_File_Chooser.H>
119 BROWSE_SAVE_DIRECTORY
123 SAVEAS_CONFIRM = 0x0001,
126 USE_FILTER_EXT = 0x0008
141 const char *filename()
const ;
142 const char *filename(
int i)
const ;
143 void directory(
const char *val) ;
144 const char *directory()
const;
145 void title(
const char *t);
146 const char* title()
const;
147 const char *filter()
const ;
148 void filter(
const char *f);
149 int filters()
const ;
150 void filter_value(
int i) ;
151 int filter_value()
const ;
152 void preset_file(
const char*f) ;
153 const char* preset_file()
const;
154 const char *errmsg()
const ;
161#if FLTK_ABI_VERSION >= 10304
162 fl_OPENFILENAMEW *_ofn_ptr;
163 fl_BROWSEINFOW *_binf_ptr;
166 fl_OPENFILENAMEW _ofn;
167 fl_BROWSEINFOW _binf;
180 void errmsg(
const char *msg);
182 void clear_pathnames();
183 void set_single_pathname(
const char *s);
184 void add_pathname(
const char *s);
188 void Win2Unix(
char *s);
189 void Unix2Win(
char *s);
193 void parse_filter(
const char *);
194 void clear_filters();
195 void add_filter(
const char *,
const char *);
215 char *_filt_patt[MAXFILTERS];
225 void errmsg(
const char *msg);
226 void clear_pathnames();
227 void set_single_pathname(
const char *s);
228 int get_saveas_basename(
void);
229 void clear_filters();
230 void add_filter(
const char *,
const char *);
231 void parse_filter(
const char *from);
236#if ! defined(__APPLE__) && !defined(WIN32)
238#if FLTK_ABI_VERSION <= 10302
250 static int have_looked_for_GTK_libs;
258#if !defined(__APPLE__) && !defined(WIN32)
274 void errmsg(
const char *msg);
275 int type_fl_file(
int);
279 virtual void type(
int);
283 virtual int count()
const;
284 virtual const char *
filename()
const;
285 virtual const char *
filename(
int i)
const;
288 virtual void title(
const char *);
289 virtual const char*
title()
const;
290 const char *
filter()
const;
291 void filter(
const char *);
297 const char *
errmsg()
const;
305 typedef struct _GtkWidget GtkWidget;
306 typedef struct _GtkFileFilterInfo GtkFileFilterInfo;
321 mutable char *gtkw_filename;
323 const char *previous_filter;
325 int fl_gtk_chooser_wrapper();
328 static int did_find_GTK_libs;
329 static void probe_for_GTK_libs(
void);
330 virtual void type(
int);
331 virtual int count()
const;
332 virtual const char *filename()
const;
333 virtual const char *filename(
int i)
const;
334 virtual void title(
const char *);
335 virtual const char* title()
const;
337 void changed_output_type(
const char *filter);
339 static int custom_gtk_filter_function(
const GtkFileFilterInfo*, Fl_GTK_File_Chooser::pair*);
340 static void free_pair(pair *p);
Definition: Fl_Native_File_Chooser.H:259
The Fl_File_Chooser widget displays a standard file selection dialog that supports various selection ...
Definition: Fl_File_Chooser.H:48
Definition: Fl_Native_File_Chooser.H:302
This class lets an FLTK application easily and consistently access the operating system's native file...
Definition: Fl_Native_File_Chooser.H:111
static const char * file_exists_message
Localizable message.
Definition: Fl_Native_File_Chooser.H:129
int filter_value() const
Returns which filter value was last selected by the user.
Definition: Fl_Native_File_Chooser_FLTK.cxx:213
const char * filter() const
Returns the filter string last set.
Definition: Fl_Native_File_Chooser_FLTK.cxx:173
const char * errmsg() const
Returns a system dependent error message for the last method that failed.
Definition: Fl_Native_File_Chooser_FLTK.cxx:233
const char * preset_file() const
Get the preset filename.
Definition: Fl_Native_File_Chooser_FLTK.cxx:226
const char * filename() const
Return the filename the user chose.
Definition: Fl_Native_File_Chooser_FLTK.cxx:126
int filters() const
Gets how many filters were available, not including "All Files".
Definition: Fl_Native_File_Chooser_FLTK.cxx:198
Type
Definition: Fl_Native_File_Chooser.H:113
@ BROWSE_DIRECTORY
browse directories (lets user choose one directory)
Definition: Fl_Native_File_Chooser.H:115
@ BROWSE_MULTI_FILE
browse files (lets user choose multiple files)
Definition: Fl_Native_File_Chooser.H:116
@ BROWSE_SAVE_FILE
browse to save a file
Definition: Fl_Native_File_Chooser.H:118
@ BROWSE_MULTI_DIRECTORY
browse directories (lets user choose multiple directories)
Definition: Fl_Native_File_Chooser.H:117
int show()
Post the chooser's dialog.
Definition: Fl_Native_File_Chooser_FLTK.cxx:242
Option
Definition: Fl_Native_File_Chooser.H:121
const char * title() const
Get the title of the file chooser's dialog window.
Definition: Fl_Native_File_Chooser_FLTK.cxx:167
const char * directory() const
Returns the current preset directory() value.
Definition: Fl_Native_File_Chooser_FLTK.cxx:154
int options() const
Gets the platform specific Fl_Native_File_Chooser::Option flags.
Definition: Fl_Native_File_Chooser_FLTK.cxx:103
int type() const
Gets the current Fl_Native_File_Chooser::Type of browser.
Definition: Fl_Native_File_Chooser_FLTK.cxx:82
int count() const
Returns the number of filenames (or directory names) the user selected.
Definition: Fl_Native_File_Chooser_FLTK.cxx:118
File names and URI utility functions.