]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormFiledialog.h
Introduce LFUN_PRINT.
[lyx.git] / src / frontends / xforms / FormFiledialog.h
index 8dbc73ab6f18df5cd45b1ea316a5418e9022898e..93b97b26c3194270fe5b0dea0db7eb1c979ae2c5 100644 (file)
@@ -7,19 +7,12 @@
  * \author unknown
  * \author John Levon
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef FORMFILEDIALOG_H
 #define FORMFILEDIALOG_H
 
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "LString.h"
-
 #include "forms_fwd.h"
 
 #include "frontends/FileDialog.h"
@@ -35,11 +28,11 @@ class Dialogs;
 class DirEntry {
 public:
        ///
-       string name_;
+       std::string name_;
        ///
-       string displayed_;
+       std::string displayed_;
        ///
-       string ls_entry_;
+       std::string ls_entry_;
 };
 
 
@@ -52,27 +45,36 @@ public:
 
 class FD_filedialog;
 
+namespace lyx {
+namespace support {
+
+class FileFilterList;
+
+} // namespace support
+} // namespace lyx
+
+
 class FileDialog::Private : public boost::signals::trackable {
 public:
        ///
-       Private(Dialogs &);
+       Private();
        ///
        ~Private();
 
        /// sets file selector user button action
-       void SetButton(int iIndex, string const & pszName = string(),
-                      string const & pszPath = string());
+       void SetButton(int iIndex, std::string const & pszName = std::string(),
+                      std::string const & pszPath = std::string());
        /// gets last dialog directory
-       string const GetDirectory() const;
+       std::string const GetDirectory() const;
        /// launches dialog and returns selected file
-       string const Select(string const & pszTitle = string(),
-                      string const & pszPath = string(),
-                      string const & pszMask = string(),
-                      string const & pszSuggested = string());
+       std::string const Select(std::string const & pszTitle,
+                                std::string const & pszPath,
+                                lyx::support::FileFilterList const & filters,
+                                std::string const & pszSuggested);
        /// launches dialog and returns selected directory
-       string const SelectDir(string const & pszTitle = string(),
-                      string const & pszPath = string(),
-                      string const & pszSuggested = string());
+       std::string const SelectDir(std::string const & pszTitle = std::string(),
+                      std::string const & pszPath = std::string(),
+                      std::string const & pszSuggested = std::string());
        /// XForms objects callback (static)
        static void FileDlgCB(FL_OBJECT *, long);
        /// Callback for double click in list
@@ -90,15 +92,15 @@ private:
        ///
        static int minh_;
        ///
-       string user_path1_;
+       std::string user_path1_;
        ///
-       string user_path2_;
+       std::string user_path2_;
        ///
-       string directory_;
+       std::string directory_;
        ///
-       string mask_;
+       std::string mask_;
        ///
-       string file_name_;
+       std::string file_name_;
        ///
        int depth_;
        ///
@@ -106,7 +108,7 @@ private:
        ///
        long last_time_;
        ///
-       string info_line_;
+       std::string info_line_;
        ///
        typedef std::vector<DirEntry> DirEntries;
        ///
@@ -123,11 +125,12 @@ private:
        /// updates dialog list to match class directory
        void Reread();
        /// sets dialog current directory
-       void SetDirectory(string const & pszPath);
+       void SetDirectory(std::string const & pszPath);
        /// sets dialog file mask
-       void SetMask(string const & pszNewMask);
+       void SetFilters(std::string const & filters);
+       void SetFilters(lyx::support::FileFilterList const & filters);
        /// sets dialog information line
-       void SetInfoLine(string const & pszLine);
+       void SetInfoLine(std::string const & pszLine);
        /// handle dialog during file selection
        bool RunDialog();
        /// Handle callback from list