]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
1. wxWindow::IsTopLevel() added and documented
[wxWidgets.git] / src / common / docview.cpp
index cb1ddc4380da6fc4bbf0870ea25b5b74f61e2e22..ece6ec34a4c61a284bce669a34512105dd98028c 100644 (file)
@@ -53,6 +53,7 @@
 #include "wx/msgdlg.h"
 #include "wx/choicdlg.h"
 #include "wx/docview.h"
+#include "wx/prntbase.h"
 #include "wx/printdlg.h"
 #include "wx/confbase.h"
 
@@ -240,9 +241,7 @@ bool wxDocument::SaveAs()
         return FALSE;
 
     wxString fileName(tmp);
-    wxString path("");
-    wxString name("");
-    wxString ext("");
+    wxString path, name, ext;
     wxSplitPath(fileName, & path, & name, & ext);
 
     if (ext.IsEmpty() || ext == _T(""))
@@ -787,6 +786,7 @@ void wxDocManager::OnFileSaveAs(wxCommandEvent& WXUNUSED(event))
 
 void wxDocManager::OnPrint(wxCommandEvent& WXUNUSED(event))
 {
+#if wxUSE_PRINTING_ARCHITECTURE
     wxView *view = GetCurrentView();
     if (!view)
         return;
@@ -799,6 +799,7 @@ void wxDocManager::OnPrint(wxCommandEvent& WXUNUSED(event))
 
         delete printout;
     }
+#endif // wxUSE_PRINTING_ARCHITECTURE
 }
 
 void wxDocManager::OnPrintSetup(wxCommandEvent& WXUNUSED(event))
@@ -817,6 +818,7 @@ void wxDocManager::OnPrintSetup(wxCommandEvent& WXUNUSED(event))
 
 void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event))
 {
+#if wxUSE_PRINTING_ARCHITECTURE
     wxView *view = GetCurrentView();
     if (!view)
         return;
@@ -834,6 +836,7 @@ void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event))
         frame->Initialize();
         frame->Show(TRUE);
     }
+#endif // wxUSE_PRINTING_ARCHITECTURE
 }
 
 void wxDocManager::OnUndo(wxCommandEvent& WXUNUSED(event))
@@ -1154,7 +1157,11 @@ wxDocTemplate *wxDocManager::FindTemplateForPath(const wxString& path)
 // template extension.
 
 wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
+#ifdef __WXMSW__
                                                 int noTemplates,
+#else
+                                                int WXUNUSED(noTemplates),
+#endif
                                                 wxString& path,
                                                 long WXUNUSED(flags),
                                                 bool WXUNUSED(save))
@@ -1183,9 +1190,12 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
 
     int FilterIndex = 0;
     wxString pathTmp = wxFileSelectorEx(_("Select a file"),
-                                        _T(""), _T(""), _T(""),
+                                        _T(""),
+                                        _T(""),
                                         &FilterIndex,
-                                        descrBuf, 0, wxTheApp->GetTopWindow());
+                                        descrBuf,
+                                        0,
+                                        wxTheApp->GetTopWindow());
 
     if (!pathTmp.IsEmpty())
     {