Skip to content

Commit

Permalink
Small doc clarification for how to #include this widget.
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8093 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
erco77 committed Dec 21, 2010
1 parent 51644b7 commit 23b3c85
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion FL/Fl_Native_File_Chooser_FLTK.H
Expand Up @@ -41,6 +41,15 @@
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>
Expand All @@ -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
Expand Down

0 comments on commit 23b3c85

Please sign in to comment.