A filechooser may be used to select files from the current working directory. Selecting a file may be done by double clicking on an item in the listbox or by typing a name in the entry. To confirm the choice, either the OK button must be pressed. Giving a return in the entry has the same effect. The dialog may be interrupted by pressing the cancel button.
interface filechooser: frame { <widgets/filechooser.h>
sources/java/hush.dv.widgets.filechooser
public:
filechooser(const char *p, const char* options="",
int istop=true); // make widget
filechooser(const widget* w, const char *p,
const char* options="", int istop=true); // make widget
filechooser(); // make handler for tcl command "filechooser"
virtual int operator()(); // handle events
virtual void mask(const char *m); // set filename mask (default "*")
virtual const char* mask() const; // get ,, ,,
virtual int dirpath(const char* path); // set current dir path
virtual const char* dirpath() const ; // get current dir
virtual void rescan(); // rescan & display current dir
virtual const char* get(); // get (and wait for) filename
protected: // Derived classes can redefine these:
virtual widget* create(int argc, char* argv[]); // create new widget
virtual void build_gui(widget* top, const char* opts =""); // set up GUI
virtual void bindings(); // install bindings
virtual void options(const char* opts); // process options
virtual int usage(const char* msg) const; // print usage
};
The filechooser is an external widget, that is it must be explicitly initialized.
#include <extern/filechooser.h> void init_filechooser( kit* );
widget -- file
KEYWORDS
widgets, filechooser
SEE ALSO
filechooser(n), extern(4).
The tutororial section:
Fileselector - A Widget Cookbook
[.]
Papers
Tutorials
Examples
Manuals
Interfaces
Sources
Packages
Resources
?
Hush Online Technology
hush@cs.vu.nl
09/24/99