diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-08-03 18:46:57 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-08-03 18:46:57 +0000 |
| commit | 03b112773d646fec27265fb21ee9feea671b6fef (patch) | |
| tree | 773f6b64e3f9b60a6142b67697e8ab85f30e4edb /test/file_chooser.cxx | |
| parent | 5994addecaf731a9468b77a4d3bb4e93def7a6e7 (diff) | |
File chooser cleanup (use fl_ok and fl_cancel for translated label
strings)
Remove fl_file_chooser_cb() function, which is not needed with the
new Fl_FileChooser dialog and related widgets.
List directories first, in boldface.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1548 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test/file_chooser.cxx')
| -rw-r--r-- | test/file_chooser.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/test/file_chooser.cxx b/test/file_chooser.cxx index 2da1d1f56..cafb2e8d7 100644 --- a/test/file_chooser.cxx +++ b/test/file_chooser.cxx @@ -1,5 +1,5 @@ // -// "$Id: file_chooser.cxx,v 1.4.2.3 2001/01/22 15:13:41 easysw Exp $" +// "$Id: file_chooser.cxx,v 1.4.2.3.2.1 2001/08/03 18:46:57 easysw Exp $" // // File chooser test program for the Fast Light Tool Kit (FLTK). // @@ -28,6 +28,7 @@ #include <FL/Fl_Window.H> #include <FL/Fl_Input.H> #include <FL/fl_file_chooser.H> +#include <FL/Fl_FileIcon.H> #include <stdio.h> #include <string.h> #include <errno.h> @@ -41,23 +42,19 @@ void pickfile(Fl_Widget *) { if (p) current->value(p); } -void thecb(const char *name) { - printf("Callback '%s'\n",name); -} - int main(int argc, char **argv) { - Fl_Window window(400,200); - pattern = new Fl_Input(100,50,280,30,"Pattern:"); + Fl_FileIcon::load_system_icons(); + Fl_Window window(310,110); + pattern = new Fl_Input(100,10,200,25,"Pattern:"); pattern->static_value("*"); - current = new Fl_Input(100,90,280,30,"Current:"); - Fl_Button button(100,120,100,30,"&Choose file"); + current = new Fl_Input(100,40,200,25,"Current:"); + Fl_Button button(200,75,100,25,"&Choose file"); button.callback(pickfile); window.end(); window.show(argc, argv); - fl_file_chooser_callback(thecb); return Fl::run(); } // -// End of "$Id: file_chooser.cxx,v 1.4.2.3 2001/01/22 15:13:41 easysw Exp $". +// End of "$Id: file_chooser.cxx,v 1.4.2.3.2.1 2001/08/03 18:46:57 easysw Exp $". // |
