2003-01-28 23:51:17 +03:00
|
|
|
// generated by Fast Light User Interface Designer (fluid) version 1.0103
|
2001-08-02 01:24:49 +04:00
|
|
|
|
2001-09-29 18:38:59 +04:00
|
|
|
#ifndef Fl_File_Chooser_H
|
|
|
|
#define Fl_File_Chooser_H
|
2001-08-02 01:24:49 +04:00
|
|
|
#include <FL/Fl.H>
|
|
|
|
#include <FL/Fl_Window.H>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2002-06-07 19:06:32 +04:00
|
|
|
#include <FL/Fl_Group.H>
|
2002-04-19 00:37:29 +04:00
|
|
|
#include <FL/Fl_Choice.H>
|
2002-06-07 19:06:32 +04:00
|
|
|
#include <FL/Fl_Menu_Button.H>
|
2001-08-02 20:17:04 +04:00
|
|
|
#include <FL/Fl_Button.H>
|
2002-06-07 19:06:32 +04:00
|
|
|
#include <FL/Fl_Preferences.H>
|
|
|
|
#include <FL/Fl_Tile.H>
|
2002-04-19 00:37:29 +04:00
|
|
|
#include <FL/Fl_File_Browser.H>
|
2002-06-07 19:06:32 +04:00
|
|
|
#include <FL/Fl_Box.H>
|
|
|
|
#include <FL/Fl_Check_Button.H>
|
2002-05-01 01:50:16 +04:00
|
|
|
#include <FL/Fl_File_Input.H>
|
2002-04-19 00:37:29 +04:00
|
|
|
#include <FL/Fl_Return_Button.H>
|
2002-06-07 19:06:32 +04:00
|
|
|
#include <FL/fl_ask.H>
|
2001-08-02 01:24:49 +04:00
|
|
|
|
2002-07-15 01:25:39 +04:00
|
|
|
class FL_EXPORT Fl_File_Chooser {
|
2001-08-02 01:24:49 +04:00
|
|
|
public:
|
2001-09-29 18:38:59 +04:00
|
|
|
enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
|
2002-06-07 19:06:32 +04:00
|
|
|
private:
|
|
|
|
static Fl_Preferences prefs_;
|
|
|
|
void (*callback_)(Fl_File_Chooser*, void *);
|
|
|
|
void *data_;
|
|
|
|
char directory_[1024];
|
|
|
|
char pattern_[1024];
|
|
|
|
char preview_text_[2048];
|
|
|
|
int type_;
|
|
|
|
void favoritesButtonCB();
|
|
|
|
void favoritesCB(Fl_Widget *w);
|
|
|
|
void fileListCB();
|
|
|
|
void fileNameCB();
|
|
|
|
void newdir();
|
|
|
|
static void previewCB(Fl_File_Chooser *fc);
|
|
|
|
void showChoiceCB();
|
|
|
|
void update_favorites();
|
|
|
|
void update_preview();
|
|
|
|
public:
|
2001-09-29 18:38:59 +04:00
|
|
|
Fl_File_Chooser(const char *d, const char *p, int t, const char *title);
|
2001-08-02 01:24:49 +04:00
|
|
|
private:
|
2001-08-02 20:17:04 +04:00
|
|
|
Fl_Window *window;
|
2001-08-02 01:24:49 +04:00
|
|
|
inline void cb_window_i(Fl_Window*, void*);
|
|
|
|
static void cb_window(Fl_Window*, void*);
|
2002-06-07 19:06:32 +04:00
|
|
|
Fl_Choice *showChoice;
|
|
|
|
inline void cb_showChoice_i(Fl_Choice*, void*);
|
|
|
|
static void cb_showChoice(Fl_Choice*, void*);
|
|
|
|
Fl_Menu_Button *favoritesButton;
|
|
|
|
inline void cb_favoritesButton_i(Fl_Menu_Button*, void*);
|
|
|
|
static void cb_favoritesButton(Fl_Menu_Button*, void*);
|
2002-07-23 19:14:17 +04:00
|
|
|
public:
|
2001-08-02 20:17:04 +04:00
|
|
|
Fl_Button *newButton;
|
2002-07-23 19:14:17 +04:00
|
|
|
private:
|
2001-08-02 20:17:04 +04:00
|
|
|
inline void cb_newButton_i(Fl_Button*, void*);
|
|
|
|
static void cb_newButton(Fl_Button*, void*);
|
2002-06-07 19:06:32 +04:00
|
|
|
inline void cb__i(Fl_Tile*, void*);
|
|
|
|
static void cb_(Fl_Tile*, void*);
|
2002-04-19 00:37:29 +04:00
|
|
|
Fl_File_Browser *fileList;
|
|
|
|
inline void cb_fileList_i(Fl_File_Browser*, void*);
|
|
|
|
static void cb_fileList(Fl_File_Browser*, void*);
|
2002-06-07 19:06:32 +04:00
|
|
|
Fl_Box *previewBox;
|
2002-07-23 19:14:17 +04:00
|
|
|
public:
|
2002-06-07 19:06:32 +04:00
|
|
|
Fl_Check_Button *previewButton;
|
2002-07-23 19:14:17 +04:00
|
|
|
private:
|
2002-06-07 19:06:32 +04:00
|
|
|
inline void cb_previewButton_i(Fl_Check_Button*, void*);
|
|
|
|
static void cb_previewButton(Fl_Check_Button*, void*);
|
2002-05-01 01:50:16 +04:00
|
|
|
Fl_File_Input *fileName;
|
|
|
|
inline void cb_fileName_i(Fl_File_Input*, void*);
|
|
|
|
static void cb_fileName(Fl_File_Input*, void*);
|
2002-04-19 00:37:29 +04:00
|
|
|
Fl_Return_Button *okButton;
|
|
|
|
inline void cb_okButton_i(Fl_Return_Button*, void*);
|
|
|
|
static void cb_okButton(Fl_Return_Button*, void*);
|
|
|
|
inline void cb_Cancel_i(Fl_Button*, void*);
|
|
|
|
static void cb_Cancel(Fl_Button*, void*);
|
2002-06-07 19:06:32 +04:00
|
|
|
Fl_Window *favWindow;
|
|
|
|
Fl_File_Browser *favList;
|
|
|
|
inline void cb_favList_i(Fl_File_Browser*, void*);
|
|
|
|
static void cb_favList(Fl_File_Browser*, void*);
|
|
|
|
Fl_Button *favUpButton;
|
|
|
|
inline void cb_favUpButton_i(Fl_Button*, void*);
|
|
|
|
static void cb_favUpButton(Fl_Button*, void*);
|
|
|
|
Fl_Button *favDeleteButton;
|
|
|
|
inline void cb_favDeleteButton_i(Fl_Button*, void*);
|
|
|
|
static void cb_favDeleteButton(Fl_Button*, void*);
|
|
|
|
Fl_Button *favDownButton;
|
|
|
|
inline void cb_favDownButton_i(Fl_Button*, void*);
|
|
|
|
static void cb_favDownButton(Fl_Button*, void*);
|
|
|
|
Fl_Button *favCancelButton;
|
|
|
|
inline void cb_favCancelButton_i(Fl_Button*, void*);
|
|
|
|
static void cb_favCancelButton(Fl_Button*, void*);
|
|
|
|
Fl_Return_Button *favOkButton;
|
|
|
|
inline void cb_favOkButton_i(Fl_Return_Button*, void*);
|
|
|
|
static void cb_favOkButton(Fl_Return_Button*, void*);
|
2001-08-02 01:24:49 +04:00
|
|
|
public:
|
2002-06-07 19:06:32 +04:00
|
|
|
~Fl_File_Chooser();
|
|
|
|
void callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0);
|
2001-08-02 01:24:49 +04:00
|
|
|
void color(Fl_Color c);
|
|
|
|
Fl_Color color();
|
|
|
|
int count();
|
|
|
|
void directory(const char *d);
|
|
|
|
char * directory();
|
|
|
|
void filter(const char *p);
|
|
|
|
const char * filter();
|
2002-07-02 01:14:20 +04:00
|
|
|
int filter_value();
|
|
|
|
void filter_value(int f);
|
2001-08-02 01:24:49 +04:00
|
|
|
void hide();
|
|
|
|
void iconsize(uchar s);
|
|
|
|
uchar iconsize();
|
|
|
|
void label(const char *l);
|
|
|
|
const char * label();
|
2002-06-07 19:06:32 +04:00
|
|
|
void preview(int e);
|
|
|
|
int preview() const { return previewButton->value(); };
|
2001-08-02 01:24:49 +04:00
|
|
|
void rescan();
|
2001-08-02 20:17:04 +04:00
|
|
|
void show();
|
2001-12-15 18:20:54 +03:00
|
|
|
int shown();
|
2001-08-02 01:24:49 +04:00
|
|
|
void textcolor(Fl_Color c);
|
|
|
|
Fl_Color textcolor();
|
2001-08-02 20:17:04 +04:00
|
|
|
void textfont(uchar f);
|
|
|
|
uchar textfont();
|
2001-08-02 01:24:49 +04:00
|
|
|
void textsize(uchar s);
|
|
|
|
uchar textsize();
|
|
|
|
void type(int t);
|
|
|
|
int type();
|
|
|
|
const char *value(int f = 1);
|
|
|
|
void value(const char *filename);
|
|
|
|
int visible();
|
2002-06-07 19:06:32 +04:00
|
|
|
static const char *add_favorites_label;
|
|
|
|
static const char *all_files_label;
|
2002-07-02 01:14:20 +04:00
|
|
|
static const char *custom_filter_label;
|
2002-06-07 19:06:32 +04:00
|
|
|
static const char *existing_file_label;
|
|
|
|
static const char *favorites_label;
|
2002-04-19 00:37:29 +04:00
|
|
|
static const char *filename_label;
|
2002-06-07 19:06:32 +04:00
|
|
|
static const char *filesystems_label;
|
|
|
|
static const char *manage_favorites_label;
|
|
|
|
static const char *new_directory_label;
|
|
|
|
static const char *preview_label;
|
|
|
|
static const char *show_label;
|
2002-05-02 19:24:34 +04:00
|
|
|
static Fl_File_Sort_F *sort;
|
2001-08-02 01:24:49 +04:00
|
|
|
};
|
2002-05-24 18:02:56 +04:00
|
|
|
FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname,int relative=0);
|
|
|
|
FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname,int relative=0);
|
|
|
|
FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*));
|
2001-08-02 01:24:49 +04:00
|
|
|
#endif
|