2001-08-02 16:17:04 +00:00
|
|
|
# data file for the Fltk User Interface Designer (fluid)
|
|
|
|
|
version 1.0100
|
|
|
|
|
header_name {../FL/Fl_FileChooser.H}
|
2001-08-01 21:24:49 +00:00
|
|
|
code_name {.cxx}
|
|
|
|
|
gridx 5
|
|
|
|
|
gridy 5
|
|
|
|
|
snap 3
|
|
|
|
|
class Fl_FileChooser {open
|
|
|
|
|
} {
|
|
|
|
|
decl {enum { SINGLE, MULTI, CREATE };} {public
|
|
|
|
|
}
|
|
|
|
|
Function {Fl_FileChooser(const char *d, const char *p, int t, const char *title)} {open
|
|
|
|
|
} {
|
|
|
|
|
Fl_Window window {
|
|
|
|
|
label {Pick a File}
|
|
|
|
|
callback {fileList->deselect();
|
|
|
|
|
fileName->value("");
|
|
|
|
|
window->hide();} open
|
2001-08-02 16:17:04 +00:00
|
|
|
private xywh {208 292 375 315} resizable hotspot
|
2001-08-01 21:24:49 +00:00
|
|
|
code0 {if (title) window->label(title);}
|
|
|
|
|
code1 {\#include <stdio.h>}
|
|
|
|
|
code2 {\#include <stdlib.h>}
|
|
|
|
|
code3 {\#include <string.h>} modal visible
|
|
|
|
|
} {
|
2001-08-02 16:17:04 +00:00
|
|
|
Fl_Browser fileList {
|
|
|
|
|
callback {fileListCB();} selected
|
|
|
|
|
private xywh {10 45 355 180} type Hold resizable hotspot
|
|
|
|
|
code0 {\#include <FL/Fl_FileBrowser.H>}
|
|
|
|
|
class Fl_FileBrowser
|
2001-08-01 21:24:49 +00:00
|
|
|
}
|
|
|
|
|
Fl_Button {} {
|
2001-08-02 16:17:04 +00:00
|
|
|
label Cancel
|
|
|
|
|
callback {fileList->deselect();
|
|
|
|
|
fileName->value("");
|
|
|
|
|
window->hide();}
|
|
|
|
|
private xywh {285 280 80 25}
|
2001-08-01 21:24:49 +00:00
|
|
|
}
|
2001-08-02 16:17:04 +00:00
|
|
|
Fl_Return_Button okButton {
|
|
|
|
|
label OK
|
|
|
|
|
callback {window->hide();}
|
|
|
|
|
private xywh {205 280 75 25}
|
2001-08-01 21:24:49 +00:00
|
|
|
}
|
|
|
|
|
Fl_Input fileName {
|
|
|
|
|
label {Filename:}
|
2001-08-02 16:17:04 +00:00
|
|
|
callback {fileNameCB();}
|
2001-08-01 21:24:49 +00:00
|
|
|
private xywh {10 245 355 25} align 5 when 8
|
|
|
|
|
code0 {fileName->when(FL_WHEN_CHANGED | FL_WHEN_ENTER_KEY_ALWAYS);}
|
|
|
|
|
}
|
2001-08-02 16:17:04 +00:00
|
|
|
Fl_Button upButton {
|
|
|
|
|
label {up.xbm}
|
|
|
|
|
callback {up();}
|
|
|
|
|
private xywh {280 10 25 25} labeltype image labelsize 8
|
|
|
|
|
}
|
|
|
|
|
Fl_Button newButton {
|
|
|
|
|
label {new.xbm}
|
|
|
|
|
callback {newdir();}
|
|
|
|
|
private xywh {310 10 25 25} labeltype image labelsize 8
|
|
|
|
|
}
|
|
|
|
|
Fl_Choice dirMenu {
|
|
|
|
|
label {Directory:}
|
2001-08-01 21:24:49 +00:00
|
|
|
callback {char pathname[1024];
|
2001-08-02 16:17:04 +00:00
|
|
|
int i;
|
2001-08-01 21:24:49 +00:00
|
|
|
|
2001-08-02 16:17:04 +00:00
|
|
|
pathname[0] = '\\0';
|
|
|
|
|
for (i = 1; i <= dirMenu->value(); i ++)
|
|
|
|
|
strcat(pathname, dirMenu->text(i));
|
|
|
|
|
directory(pathname);} open
|
|
|
|
|
private xywh {95 10 180 25}
|
|
|
|
|
} {}
|
2001-08-01 21:24:49 +00:00
|
|
|
Fl_Button {} {
|
2001-08-02 16:17:04 +00:00
|
|
|
label {allfiles.xbm}
|
|
|
|
|
callback {const char *f;
|
|
|
|
|
if ((f = fl_input("New Filter?",
|
|
|
|
|
fileList->filter())) != NULL)
|
|
|
|
|
{
|
|
|
|
|
fileList->filter(f);
|
|
|
|
|
rescan();
|
|
|
|
|
}}
|
|
|
|
|
private xywh {340 10 25 25} labeltype image labelsize 28 labelcolor 4 align 16
|
|
|
|
|
code0 {\#include <FL/fl_ask.H>}
|
2001-08-01 21:24:49 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
code {window->size_range(345, 270, 345);
|
|
|
|
|
fileList->filter(p);
|
|
|
|
|
type(t);
|
|
|
|
|
value(d);} {}
|
|
|
|
|
}
|
|
|
|
|
decl {char directory_[1024];} {}
|
|
|
|
|
decl {int type_;} {}
|
|
|
|
|
decl {void fileListCB();} {}
|
|
|
|
|
decl {void fileNameCB();} {}
|
|
|
|
|
decl {void newdir();} {}
|
|
|
|
|
decl {void up();} {}
|
|
|
|
|
Function {color(Fl_Color c)} {} {
|
|
|
|
|
code {fileList->color(c);} {}
|
|
|
|
|
}
|
|
|
|
|
Function {color()} {return_type Fl_Color
|
|
|
|
|
} {
|
|
|
|
|
code {return (fileList->color());} {}
|
|
|
|
|
}
|
|
|
|
|
decl {int count();} {public
|
|
|
|
|
}
|
|
|
|
|
decl {void directory(const char *d);} {public
|
|
|
|
|
}
|
|
|
|
|
Function {directory()} {return_type {char *}
|
|
|
|
|
} {
|
|
|
|
|
code {return directory_;} {}
|
|
|
|
|
}
|
|
|
|
|
Function {filter(const char *p)} {return_type void
|
|
|
|
|
} {
|
|
|
|
|
code {fileList->filter(p);
|
|
|
|
|
rescan();} {}
|
|
|
|
|
}
|
|
|
|
|
Function {filter()} {return_type {const char *}
|
|
|
|
|
} {
|
|
|
|
|
code {return (fileList->filter());} {}
|
|
|
|
|
}
|
|
|
|
|
Function {hide()} {return_type void
|
|
|
|
|
} {
|
|
|
|
|
code {window->hide();} {}
|
|
|
|
|
}
|
|
|
|
|
Function {iconsize(uchar s)} {return_type void
|
|
|
|
|
} {
|
|
|
|
|
code {fileList->iconsize(s);} {}
|
|
|
|
|
}
|
|
|
|
|
Function {iconsize()} {return_type uchar
|
|
|
|
|
} {
|
|
|
|
|
code {return (fileList->iconsize());} {}
|
|
|
|
|
}
|
|
|
|
|
Function {label(const char *l)} {return_type void
|
|
|
|
|
} {
|
|
|
|
|
code {window->label(l);} {}
|
|
|
|
|
}
|
|
|
|
|
Function {label()} {return_type {const char *}
|
|
|
|
|
} {
|
|
|
|
|
code {return (window->label());} {}
|
|
|
|
|
}
|
|
|
|
|
decl {void rescan();} {public
|
|
|
|
|
}
|
2001-08-02 16:17:04 +00:00
|
|
|
Function {show()} {return_type void
|
2001-08-01 21:24:49 +00:00
|
|
|
} {
|
2001-08-02 16:17:04 +00:00
|
|
|
code {window->show();
|
2001-08-01 21:24:49 +00:00
|
|
|
fileList->deselect();} {}
|
|
|
|
|
}
|
|
|
|
|
Function {textcolor(Fl_Color c)} {return_type void
|
|
|
|
|
} {
|
2001-08-02 16:17:04 +00:00
|
|
|
code {fileList->textcolor(c);} {}
|
2001-08-01 21:24:49 +00:00
|
|
|
}
|
|
|
|
|
Function {textcolor()} {return_type Fl_Color
|
|
|
|
|
} {
|
2001-08-02 16:17:04 +00:00
|
|
|
code {return (fileList->textcolor());} {}
|
2001-08-01 21:24:49 +00:00
|
|
|
}
|
2001-08-02 16:17:04 +00:00
|
|
|
Function {textfont(uchar f)} {return_type void
|
2001-08-01 21:24:49 +00:00
|
|
|
} {
|
2001-08-02 16:17:04 +00:00
|
|
|
code {fileList->textfont(f);} {}
|
2001-08-01 21:24:49 +00:00
|
|
|
}
|
2001-08-02 16:17:04 +00:00
|
|
|
Function {textfont()} {return_type uchar
|
2001-08-01 21:24:49 +00:00
|
|
|
} {
|
2001-08-02 16:17:04 +00:00
|
|
|
code {return (fileList->textfont());} {}
|
2001-08-01 21:24:49 +00:00
|
|
|
}
|
|
|
|
|
Function {textsize(uchar s)} {return_type void
|
|
|
|
|
} {
|
2001-08-02 16:17:04 +00:00
|
|
|
code {fileList->textsize(s);} {}
|
2001-08-01 21:24:49 +00:00
|
|
|
}
|
|
|
|
|
Function {textsize()} {return_type uchar
|
|
|
|
|
} {
|
|
|
|
|
code {return (fileList->textsize());} {}
|
|
|
|
|
}
|
|
|
|
|
Function {type(int t)} {return_type void
|
|
|
|
|
} {
|
|
|
|
|
code {type_ = t;
|
|
|
|
|
if (t == MULTI)
|
|
|
|
|
fileList->type(FL_MULTI_BROWSER);
|
|
|
|
|
else
|
|
|
|
|
fileList->type(FL_HOLD_BROWSER);
|
|
|
|
|
if (t != CREATE)
|
|
|
|
|
newButton->deactivate();
|
|
|
|
|
else
|
|
|
|
|
newButton->activate();} {}
|
|
|
|
|
}
|
|
|
|
|
Function {type()} {return_type int
|
|
|
|
|
} {
|
|
|
|
|
code {return (type_);} {}
|
|
|
|
|
}
|
|
|
|
|
decl {const char *value(int f = 1);} {public
|
|
|
|
|
}
|
|
|
|
|
decl {void value(const char *filename);} {public
|
|
|
|
|
}
|
|
|
|
|
Function {visible()} {return_type int
|
|
|
|
|
} {
|
|
|
|
|
code {return window->visible();} {}
|
|
|
|
|
}
|
|
|
|
|
}
|