Author: greg.ercolano
Date: 2010-12-21 01:48:57 -0800 (Tue, 21 Dec 2010)
New Revision: 8093
Log:
Small doc clarification for how to #include this widget.



Modified:
   branches/branch-1.3/FL/Fl_Native_File_Chooser_FLTK.H

Modified: branches/branch-1.3/FL/Fl_Native_File_Chooser_FLTK.H
===================================================================
--- branches/branch-1.3/FL/Fl_Native_File_Chooser_FLTK.H        2010-12-21 
09:19:31 UTC (rev 8092)
+++ branches/branch-1.3/FL/Fl_Native_File_Chooser_FLTK.H        2010-12-21 
09:48:57 UTC (rev 8093)
@@ -41,7 +41,16 @@
   In cases where there is no native file browser, FLTK's own file browser
   is used instead.
 
+  To use this widget correctly, use the following include in your code:
   \code
+  #include <FL/Fl_Native_File_Chooser.H>
+  \endcode
+  Do not include the other Fl_Native_File_Choser_XXX.H files in your code;
+  those are platform specific files that will be included automatically
+  depending on your build platform.
+
+  The following example shows how to pick a single file:
+  \code
   // Create and post the local native file chooser
   #include <FL/Fl_Native_File_Chooser.H>
   [..]
@@ -50,7 +59,7 @@
   fnfc.type(Fl_Native_File_Chooser::BROWSE_FILE);
   fnfc.filter("Text\t*.txt\n"
               "C Files\t*.{cxx,h,c}");
-  fnfc.directory("/var/tmp");
+  fnfc.directory("/var/tmp");           // default directory to use
   // Show native chooser
   switch ( fnfc.show() ) {
     case -1: printf("ERROR: %s\n", fnfc.errmsg());    break;  // ERROR

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to