summaryrefslogtreecommitdiff
path: root/FL/Fl_File_Chooser.H
blob: b778587a1c0d11ea72c301423a8ba5688b286abd (plain)
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
// generated by Fast Light User Interface Designer (fluid) version 1.0100

#ifndef Fl_File_Chooser_H
#define Fl_File_Chooser_H
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <FL/Fl_Choice.H>
#include <FL/Fl_Button.H>
#include <FL/fl_ask.H>
#include <FL/Fl_File_Browser.H>
#include <FL/Fl_File_Input.H>
#include <FL/Fl_Return_Button.H>

class Fl_File_Chooser {
public:
  enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
  Fl_File_Chooser(const char *d, const char *p, int t, const char *title);
private:
  Fl_Window *window;
  inline void cb_window_i(Fl_Window*, void*);
  static void cb_window(Fl_Window*, void*);
  Fl_Choice *dirMenu;
  inline void cb_dirMenu_i(Fl_Choice*, void*);
  static void cb_dirMenu(Fl_Choice*, void*);
  Fl_Button *upButton;
  inline void cb_upButton_i(Fl_Button*, void*);
  static void cb_upButton(Fl_Button*, void*);
  Fl_Button *newButton;
  inline void cb_newButton_i(Fl_Button*, void*);
  static void cb_newButton(Fl_Button*, void*);
  inline void cb__i(Fl_Button*, void*);
  static void cb_(Fl_Button*, void*);
  Fl_File_Browser *fileList;
  inline void cb_fileList_i(Fl_File_Browser*, void*);
  static void cb_fileList(Fl_File_Browser*, void*);
  Fl_File_Input *fileName;
  inline void cb_fileName_i(Fl_File_Input*, void*);
  static void cb_fileName(Fl_File_Input*, void*);
  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*);
  void (*callback_)(Fl_File_Chooser*, void *);
  void *data_;
  char directory_[1024];
  int type_;
  void fileListCB();
  void fileNameCB();
  void newdir();
  void up();
public:
  void callback(void (*cb)(Fl_File_Chooser *, void *), void *d);
  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();
  void hide();
  void iconsize(uchar s);
  uchar iconsize();
  void label(const char *l);
  const char * label();
  void rescan();
  void show();
  int shown();
  void textcolor(Fl_Color c);
  Fl_Color textcolor();
  void textfont(uchar f);
  uchar textfont();
  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();
  static const char *directory_label;
  static const char *filename_label;
  static const char *filter_label;
};
extern FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname,int relative=0);
extern FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname,int relative=0);
extern FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*));
#endif