]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
added our own implementation of strto[u]ll() if the system doesn't have one (patch...
[wxWidgets.git] / src / common / docview.cpp
index e97ea52f18079495fd427c64f38e7e71a729d1da..a72517a65b0a3f36c8f4cfcaab1eecea758e13f7 100644 (file)
@@ -40,6 +40,8 @@
     #include "wx/intl.h"
     #include "wx/log.h"
     #include "wx/msgdlg.h"
+    #include "wx/mdi.h"
+    #include "wx/choicdlg.h"
 #endif
 
 #include "wx/ffile.h"
     #include "wx/filename.h"
 #endif
 
-#ifdef __WXGTK__
-    #include "wx/mdi.h"
-#endif
-
 #if wxUSE_PRINTING_ARCHITECTURE
     #include "wx/prntbase.h"
     #include "wx/printdlg.h"
 #endif
 
-#include "wx/choicdlg.h"
 #include "wx/confbase.h"
 #include "wx/file.h"
 #include "wx/cmdproc.h"
@@ -98,7 +95,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject)
 // function prototypes
 // ----------------------------------------------------------------------------
 
-static inline wxString FindExtension(const wxChar *path);
 static wxWindow* wxFindSuitableParent(void);
 
 // ----------------------------------------------------------------------------
@@ -277,7 +273,7 @@ bool wxDocument::SaveAs()
 
     if (docTemplate->GetViewClassInfo() && docTemplate->GetDocClassInfo())
     {
-        wxList::compatibility_iterator node = wxDocManager::GetDocumentManager()->GetTemplates().GetFirst();
+        wxList::compatibility_iterator node = docTemplate->GetDocumentManager()->GetTemplates().GetFirst();
         while (node)
         {
             wxDocTemplate *t = (wxDocTemplate*) node->GetData();
@@ -1926,6 +1922,11 @@ BEGIN_EVENT_TABLE(wxDocParentFrame, wxFrame)
     EVT_CLOSE(wxDocParentFrame::OnCloseWindow)
 END_EVENT_TABLE()
 
+wxDocParentFrame::wxDocParentFrame()
+{
+    m_docManager = NULL;
+}
+
 wxDocParentFrame::wxDocParentFrame(wxDocManager *manager,
                                    wxFrame *frame,
                                    wxWindowID id,
@@ -1939,6 +1940,19 @@ wxDocParentFrame::wxDocParentFrame(wxDocManager *manager,
     m_docManager = manager;
 }
 
+bool wxDocParentFrame::Create(wxDocManager *manager,
+                              wxFrame *frame,
+                              wxWindowID id,
+                              const wxString& title,
+                              const wxPoint& pos,
+                              const wxSize& size,
+                              long style,
+                              const wxString& name)
+{
+    m_docManager = manager;
+    return base_type::Create(frame, id, title, pos, size, style, name);
+}
+
 void wxDocParentFrame::OnExit(wxCommandEvent& WXUNUSED(event))
 {
     Close();