]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/filehistory.h
Ensure that the progress dialog parent is activated at the end under MSW.
[wxWidgets.git] / include / wx / filehistory.h
index 2d86e064fb1198fcae22e354fb9596ddffa427b0..ea37948686fbed577e30546f7ad299545752264c 100644 (file)
 
 class WXDLLIMPEXP_FWD_CORE wxMenu;
 class WXDLLIMPEXP_FWD_BASE wxConfigBase;
+class WXDLLIMPEXP_FWD_BASE wxFileName;
 
 // ----------------------------------------------------------------------------
 // File history management
 // ----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_CORE wxFileHistory : public wxObject
+class WXDLLIMPEXP_CORE wxFileHistoryBase : public wxObject
 {
 public:
-    wxFileHistory(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1);
+    wxFileHistoryBase(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1);
 
     // Operations
     virtual void AddFileToHistory(const wxString& file);
@@ -79,17 +80,35 @@ private:
     // The ID of the first history menu item (Doesn't have to be wxID_FILE1)
     wxWindowID m_idBase;
 
-    DECLARE_DYNAMIC_CLASS(wxFileHistory)
-    wxDECLARE_NO_COPY_CLASS(wxFileHistory);
+    // Normalize a file name to canonical form. We have a special function for
+    // this to ensure the same normalization is used everywhere.
+    static wxString NormalizeFileName(const wxFileName& filename);
+
+    wxDECLARE_NO_COPY_CLASS(wxFileHistoryBase);
 };
 
 #if WXWIN_COMPATIBILITY_2_6
-inline size_t wxFileHistory::GetNoHistoryFiles() const
+inline size_t wxFileHistoryBase::GetNoHistoryFiles() const
 {
     return m_fileHistory.GetCount();
 }
 #endif // WXWIN_COMPATIBILITY_2_6
 
+
+#if defined(__WXGTK20__)
+    #include "wx/gtk/filehistory.h"
+#else
+    // no platform-specific implementation of wxFileHistory yet
+    class WXDLLIMPEXP_CORE wxFileHistory : public wxFileHistoryBase
+    {
+    public:
+        wxFileHistory(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1)
+            : wxFileHistoryBase(maxFiles, idBase) {}
+
+        DECLARE_DYNAMIC_CLASS(wxFileHistory)
+    };
+#endif
+
 #endif // wxUSE_FILE_HISTORY
 
 #endif // _WX_FILEHISTORY_H_