From 74bb2305cbcaca5016a07f2e0b369d25bc3c98a5 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 30 Sep 2001 17:37:06 +0000 Subject: [PATCH] Fl_File_Chooser.H and fl_file_chooser.H need to be the same... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1622 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_File_Chooser.H | 3 +++ FL/fl_file_chooser.H | 39 --------------------------------------- FL/forms.H | 6 +++--- fluid/Fluid_Image.cxx | 6 +++--- fluid/fluid.cxx | 6 +++--- src/Fl_File_Chooser.cxx | 3 +++ src/Fl_File_Chooser.fl | 17 +++++++++++++---- src/fl_file_dir.cxx | 6 +++--- test/editor.cxx | 6 +++--- test/file_chooser.cxx | 6 +++--- test/pixmap_browser.cxx | 6 +++--- 11 files changed, 40 insertions(+), 64 deletions(-) delete mode 100644 FL/fl_file_chooser.H diff --git a/FL/Fl_File_Chooser.H b/FL/Fl_File_Chooser.H index b04953e2f..6faa205f9 100644 --- a/FL/Fl_File_Chooser.H +++ b/FL/Fl_File_Chooser.H @@ -80,4 +80,7 @@ public: void value(const char *filename); int visible(); }; +extern FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname); +extern FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname); +extern FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*)); #endif diff --git a/FL/fl_file_chooser.H b/FL/fl_file_chooser.H deleted file mode 100644 index 0a2183eed..000000000 --- a/FL/fl_file_chooser.H +++ /dev/null @@ -1,39 +0,0 @@ -// -// "$Id: fl_file_chooser.H,v 1.5.2.3.2.3 2001/09/29 14:38:58 easysw Exp $" -// -// File chooser header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2001 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". -// - -#ifndef fl_file_chooser_H -#define fl_file_chooser_H - -#include "Enumerations.H" - -FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname); -FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname); -FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*)); - -#endif - -// -// End of "$Id: fl_file_chooser.H,v 1.5.2.3.2.3 2001/09/29 14:38:58 easysw Exp $". -// diff --git a/FL/forms.H b/FL/forms.H index 4fac20518..5c26c4fd8 100644 --- a/FL/forms.H +++ b/FL/forms.H @@ -1,5 +1,5 @@ // -// "$Id: forms.H,v 1.7.2.7 2001/05/30 16:18:33 spitzak Exp $" +// "$Id: forms.H,v 1.7.2.7.2.1 2001/09/30 17:37:06 easysw Exp $" // // Forms emulation header file for the Fast Light Tool Kit (FLTK). // @@ -668,7 +668,7 @@ inline int fl_show_choices(const char* c,int n,const char* b1,const char* b2, } #include "filename.H" -#include "fl_file_chooser.H" +#include "Fl_File_Chooser.H" inline int do_matching(char* a, const char* b) {return filename_match(a,b);} // Forms-compatable file chooser (implementation in fselect.C): @@ -838,5 +838,5 @@ inline void fl_draw() {Fl::flush();} #endif /* define __FORMS_H__ */ // -// End of "$Id: forms.H,v 1.7.2.7 2001/05/30 16:18:33 spitzak Exp $". +// End of "$Id: forms.H,v 1.7.2.7.2.1 2001/09/30 17:37:06 easysw Exp $". // diff --git a/fluid/Fluid_Image.cxx b/fluid/Fluid_Image.cxx index 97b8ac696..4c43c1aa3 100644 --- a/fluid/Fluid_Image.cxx +++ b/fluid/Fluid_Image.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fluid_Image.cxx,v 1.7.2.9.2.2 2001/09/29 06:20:15 easysw Exp $" +// "$Id: Fluid_Image.cxx,v 1.7.2.9.2.3 2001/09/30 17:37:06 easysw Exp $" // // Pixmap label support for the Fast Light Tool Kit (FLTK). // @@ -437,7 +437,7 @@ Fluid_Image::~Fluid_Image() { //////////////////////////////////////////////////////////////// -#include +#include const char *ui_find_image_name; Fluid_Image *ui_find_image(const char *oldname) { @@ -450,5 +450,5 @@ Fluid_Image *ui_find_image(const char *oldname) { } // -// End of "$Id: Fluid_Image.cxx,v 1.7.2.9.2.2 2001/09/29 06:20:15 easysw Exp $". +// End of "$Id: Fluid_Image.cxx,v 1.7.2.9.2.3 2001/09/30 17:37:06 easysw Exp $". // diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 60231eb7c..4b066c2bc 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1,5 +1,5 @@ // -// "$Id: fluid.cxx,v 1.15.2.13.2.7 2001/09/29 22:59:45 easysw Exp $" +// "$Id: fluid.cxx,v 1.15.2.13.2.8 2001/09/30 17:37:06 easysw Exp $" // // FLUID main entry for the Fast Light Tool Kit (FLTK). // @@ -55,7 +55,7 @@ const char *copyright = #include #include #include -#include +#include #include #include #include @@ -521,5 +521,5 @@ int main(int argc,char **argv) { } // -// End of "$Id: fluid.cxx,v 1.15.2.13.2.7 2001/09/29 22:59:45 easysw Exp $". +// End of "$Id: fluid.cxx,v 1.15.2.13.2.8 2001/09/30 17:37:06 easysw Exp $". // diff --git a/src/Fl_File_Chooser.cxx b/src/Fl_File_Chooser.cxx index 2f17dda52..51183ce6c 100644 --- a/src/Fl_File_Chooser.cxx +++ b/src/Fl_File_Chooser.cxx @@ -261,3 +261,6 @@ int Fl_File_Chooser::type() { int Fl_File_Chooser::visible() { return window->visible(); } +FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname); +FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname); +FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*)); diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl index 6a78a869e..cfdd672da 100644 --- a/src/Fl_File_Chooser.fl +++ b/src/Fl_File_Chooser.fl @@ -7,7 +7,7 @@ gridy 5 snap 3 class Fl_File_Chooser {open } { - decl {enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };} {selected public + decl {enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };} {public } Function {Fl_File_Chooser(const char *d, const char *p, int t, const char *title)} {open } { @@ -55,11 +55,11 @@ window->hide();} } Fl_Button upButton { callback {up();} - private image {up.xbm} tooltip {Show the parent directory.} xywh {280 10 25 25} labelsize 8 + private tooltip {Show the parent directory.} image {up.xbm} xywh {280 10 25 25} labelsize 8 } Fl_Button newButton { callback {newdir();} - private image {new.xbm} tooltip {Create a new directory.} xywh {310 10 25 25} labelsize 8 + private tooltip {Create a new directory.} image {new.xbm} xywh {310 10 25 25} labelsize 8 } Fl_Choice dirMenu { label {Directory:} @@ -80,7 +80,7 @@ if ((f = fl_input("New Filter?", fileList->filter(f); rescan(); }} - private image {allfiles.xbm} tooltip {Change the filename filter.} xywh {340 10 25 25} labelsize 28 labelcolor 4 align 16 + private tooltip {Change the filename filter.} image {allfiles.xbm} xywh {340 10 25 25} labelsize 28 labelcolor 4 align 16 code0 {\#include } } } @@ -208,3 +208,12 @@ else code {return window->visible();} {} } } + +decl {FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname);} {public +} + +decl {FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname);} {public +} + +decl {FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*));} {selected public +} diff --git a/src/fl_file_dir.cxx b/src/fl_file_dir.cxx index b61e4b4b7..0b622c6f5 100644 --- a/src/fl_file_dir.cxx +++ b/src/fl_file_dir.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_file_dir.cxx,v 1.1.2.1 2001/09/30 12:30:13 easysw Exp $" +// "$Id: fl_file_dir.cxx,v 1.1.2.2 2001/09/30 17:37:06 easysw Exp $" // // File chooser widget for the Fast Light Tool Kit (FLTK). // @@ -24,7 +24,7 @@ // #include -#include +#include #include static Fl_File_Chooser *fc = (Fl_File_Chooser *)0; @@ -90,5 +90,5 @@ char* fl_dir_chooser(const char* message, const char* fname) // -// End of "$Id: fl_file_dir.cxx,v 1.1.2.1 2001/09/30 12:30:13 easysw Exp $". +// End of "$Id: fl_file_dir.cxx,v 1.1.2.2 2001/09/30 17:37:06 easysw Exp $". // diff --git a/test/editor.cxx b/test/editor.cxx index dda0488e4..8ee30b17d 100644 --- a/test/editor.cxx +++ b/test/editor.cxx @@ -1,5 +1,5 @@ // -// "$Id: editor.cxx,v 1.2.2.3.2.1 2001/08/04 12:21:34 easysw Exp $" +// "$Id: editor.cxx,v 1.2.2.3.2.2 2001/09/30 17:37:06 easysw Exp $" // // A simple text editor program for the Fast Light Tool Kit (FLTK). // @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include @@ -424,5 +424,5 @@ int main(int argc, char **argv) { } // -// End of "$Id: editor.cxx,v 1.2.2.3.2.1 2001/08/04 12:21:34 easysw Exp $". +// End of "$Id: editor.cxx,v 1.2.2.3.2.2 2001/09/30 17:37:06 easysw Exp $". // diff --git a/test/file_chooser.cxx b/test/file_chooser.cxx index 2e21ccd3d..886db8b1b 100644 --- a/test/file_chooser.cxx +++ b/test/file_chooser.cxx @@ -1,5 +1,5 @@ // -// "$Id: file_chooser.cxx,v 1.4.2.3.2.2 2001/09/29 14:38:59 easysw Exp $" +// "$Id: file_chooser.cxx,v 1.4.2.3.2.3 2001/09/30 17:37:06 easysw Exp $" // // File chooser test program for the Fast Light Tool Kit (FLTK). // @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -56,5 +56,5 @@ int main(int argc, char **argv) { } // -// End of "$Id: file_chooser.cxx,v 1.4.2.3.2.2 2001/09/29 14:38:59 easysw Exp $". +// End of "$Id: file_chooser.cxx,v 1.4.2.3.2.3 2001/09/30 17:37:06 easysw Exp $". // diff --git a/test/pixmap_browser.cxx b/test/pixmap_browser.cxx index 9c0696e85..3e02e9f0a 100644 --- a/test/pixmap_browser.cxx +++ b/test/pixmap_browser.cxx @@ -1,5 +1,5 @@ // -// "$Id: pixmap_browser.cxx,v 1.5.2.4.2.1 2001/09/02 11:23:27 easysw Exp $" +// "$Id: pixmap_browser.cxx,v 1.5.2.4.2.2 2001/09/30 17:37:06 easysw Exp $" // // Another pixmap test program for the Fast Light Tool Kit (FLTK). // @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include Fl_Box *b; @@ -166,5 +166,5 @@ int main(int argc, char **argv) { } // -// End of "$Id: pixmap_browser.cxx,v 1.5.2.4.2.1 2001/09/02 11:23:27 easysw Exp $". +// End of "$Id: pixmap_browser.cxx,v 1.5.2.4.2.2 2001/09/30 17:37:06 easysw Exp $". //