]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/FileDialog.h
* Doxy: polish html output.
[lyx.git] / src / frontends / FileDialog.h
index 4d3d2aa23d3199f06e880a1308be69dedcf647d2..a4e69da2f286cdf31ff1429bc459f317a9d897dd 100644 (file)
 #define FILEDIALOG_H
 
 #include "lfuns.h"
-
 #include "support/docstring.h"
 
-#include <utility>
 #include <string>
 
 
 namespace lyx {
-namespace support {
-
-class FileFilterList;
-
-} // namespace support
-} // namespace lyx
 
+namespace support { class FileFilterList; }
 
 
 /**
@@ -39,7 +32,7 @@ class FileDialog
 {
 public:
        /// label, directory path button
-       typedef std::pair<lyx::docstring, lyx::docstring> Button;
+       typedef std::pair<docstring, docstring> Button;
 
        /// result type
        enum ResultType {
@@ -48,7 +41,7 @@ public:
        };
 
        /// result return
-       typedef std::pair<FileDialog::ResultType, lyx::docstring> Result;
+       typedef std::pair<FileDialog::ResultType, docstring> Result;
 
        /**
         * Constructs a file dialog with title \param title.
@@ -59,29 +52,28 @@ public:
         *
         * Up to two optional extra buttons are allowed for specifying
         * additional directories in the navigation (an empty
-        * directory is interpreted as getcwd())
+        * directory is interpreted as FileName::getcwd())
         */
-       FileDialog(lyx::docstring const & title,
-                  kb_action a = LFUN_SELECT_FILE_SYNC,
-                  Button b1 = Button(lyx::docstring(), lyx::docstring()),
-                  Button b2 = Button(lyx::docstring(), lyx::docstring()));
-
+       FileDialog(docstring const & title, kb_action a = LFUN_SELECT_FILE_SYNC);
 
        ~FileDialog();
 
+       void setButton1(docstring const & label, docstring const & dir);
+       void setButton2(docstring const & label, docstring const & dir);
+
        /// Choose a file for opening, starting in directory \c path.
-       Result const open(lyx::docstring const & path,
-                         lyx::support::FileFilterList const & filters,
-                         lyx::docstring const & suggested);
+       Result const open(docstring const & path,
+                         support::FileFilterList const & filters,
+                         docstring const & suggested);
 
        /// Choose a directory, starting in directory \c path.
-       Result const opendir(lyx::docstring const & path = lyx::docstring(),
-                            lyx::docstring const & suggested = lyx::docstring());
+       Result const opendir(docstring const & path = docstring(),
+                            docstring const & suggested = docstring());
 
        /// Choose a file for saving, starting in directory \c  path.
-       Result const save(lyx::docstring const & path,
-                         lyx::support::FileFilterList const & filters,
-                         lyx::docstring const & suggested);
+       Result const save(docstring const & path,
+                         support::FileFilterList const & filters,
+                         docstring const & suggested);
 
 private:
        class Private;
@@ -89,11 +81,12 @@ private:
        Private * private_;
 
        /// the dialog title
-       lyx::docstring title_;
+       docstring title_;
 
        /// success action to perform if not synchronous
        kb_action success_;
-
 };
 
+} // namespace lyx
+
 #endif // FILEDIALOG_H