]> git.saurik.com Git - wxWidgets.git/commitdiff
Allow printing objects to be passed a wxWindow, not a wxFrame
authorJulian Smart <julian@anthemion.co.uk>
Mon, 26 May 2003 09:55:28 +0000 (09:55 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 26 May 2003 09:55:28 +0000 (09:55 +0000)
(vestigial remains of older wxWin version)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/hteasypr.tex
docs/latex/wx/prevwin.tex
docs/toback24.txt
include/wx/html/htmprint.h
include/wx/prntbase.h
src/common/prntbase.cpp
src/html/htmprint.cpp

index 3f7b7e594979fc2fc84e11b59456464e491af646..418454f34959e1ae8f16086cb87ceeb813bc05c4 100644 (file)
@@ -28,16 +28,15 @@ this class stores various settings in it.
 
 \membersection{wxHtmlEasyPrinting::wxHtmlEasyPrinting}\label{wxhtmleasyprintingwxhtmleasyprinting}
 
-\func{}{wxHtmlEasyPrinting}{\param{const wxString\& }{name = "Printing"}, \param{wxFrame* }{parent\_frame = NULL}}
+\func{}{wxHtmlEasyPrinting}{\param{const wxString\& }{name = "Printing"}, \param{wxWindow* }{parentWindow = NULL}}
 
 Constructor.
 
 \wxheading{Parameters}
 
-\docparam{name}{Name of the printing. Used by preview frames and setup dialogs.}
-
-\docparam{parent\_frame}{pointer to the frame that will own preview frame and setup dialogs. May be NULL.}
+\docparam{name}{Name of the printing object. Used by preview frames and setup dialogs.}
 
+\docparam{parentWindow}{pointer to the window that will own the preview frame and setup dialogs. May be NULL.}
 
 \membersection{wxHtmlEasyPrinting::PreviewFile}\label{wxhtmleasyprintingpreviewfile}
 
index 7963f7c5ffbb8216851a79bc4f8227e7e3fd2e6a..36d65927a105552ae453e28bfb3dfca0406f4b2e 100644 (file)
@@ -141,7 +141,7 @@ class may be used without derivation.
 
 \membersection{wxPreviewFrame::wxPreviewFrame}
 
-\func{}{wxPreviewFrame}{\param{wxPrintPreview* }{preview}, \param{wxFrame* }{parent}, \param{const wxString\& }{title},
+\func{}{wxPreviewFrame}{\param{wxPrintPreview* }{preview}, \param{wxWindow* }{parent}, \param{const wxString\& }{title},
  \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& size }{size = wxDefaultSize},
  \param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = ``frame"}}
 
index c4bc8320c04b6ffacbf542f3274bae5a84cf0691..b3d323e44119e2079b8c94d519ba2810f78162ad 100644 (file)
@@ -166,13 +166,6 @@ Checking in include/wx/textbuf.h;
 /pack/cvsroots/wxwindows/wxWindows/include/wx/textbuf.h,v  <--  textbuf.h
 new revision: 1.8; previous revision: 1.7
 
-18. Better notebook page sizing
-
-nbbase.cpp, CalcSizeFromPage, plus #includes at top of file.
-This gets the tab size and adds a bit for borders.
-We should do the same for other platforms, only rationalise
-it so that wxNotebook returns the tab rect info.
-
 19. Add wxFileConfig bug fix, marked by <JACS>...</JACS> in Parse().
 This prevents mungeing of the config file after reading in
 entries (say, just one entry in one group), then adding entries
index 71448016c7d89de593085d030d98e1ef5511b7e7..8ee27426378cf1c120574d34daffc58047298303 100644 (file)
@@ -196,7 +196,7 @@ private:
 class WXDLLEXPORT wxHtmlEasyPrinting : public wxObject
 {
 public:
-    wxHtmlEasyPrinting(const wxString& name = wxT("Printing"), wxFrame *parent_frame = NULL);
+    wxHtmlEasyPrinting(const wxString& name = wxT("Printing"), wxWindow *parentWindow = NULL);
     ~wxHtmlEasyPrinting();
 
     bool PreviewFile(const wxString &htmlfile);
@@ -244,7 +244,7 @@ private:
     int *m_FontsSizes;
     wxString m_FontFaceFixed, m_FontFaceNormal;
     wxString m_Headers[2], m_Footers[2];
-    wxFrame *m_Frame;
+    wxWindow *m_ParentWindow;
 
     DECLARE_NO_COPY_CLASS(wxHtmlEasyPrinting)
 };
index 8525fb46894fa2b51f5c34bed5c75c0a15579660..51430ffa1b16741cc4c3038afd3c9d1ef8fc5bcb 100644 (file)
@@ -192,7 +192,7 @@ class WXDLLEXPORT wxPreviewFrame: public wxFrame
 {
 public:
     wxPreviewFrame(wxPrintPreviewBase *preview,
-                   wxFrame *parent,
+                   wxWindow *parent,
                    const wxString& title = wxT("Print Preview"),
                    const wxPoint& pos = wxDefaultPosition,
                    const wxSize& size = wxDefaultSize,
index 0b3899fdc47d2790b9eb091cfd64be4feb0f1ea1..fc2df6a7057e1c968aaf934fbecb31d4588668e2 100644 (file)
@@ -503,7 +503,7 @@ BEGIN_EVENT_TABLE(wxPreviewFrame, wxFrame)
     EVT_CLOSE(wxPreviewFrame::OnCloseWindow)
 END_EVENT_TABLE()
 
-wxPreviewFrame::wxPreviewFrame(wxPrintPreviewBase *preview, wxFrame *parent, const wxString& title,
+wxPreviewFrame::wxPreviewFrame(wxPrintPreviewBase *preview, wxWindow *parent, const wxString& title,
                                const wxPoint& pos, const wxSize& size, long style, const wxString& name):
 wxFrame(parent, -1, title, pos, size, style, name)
 {
@@ -511,7 +511,7 @@ wxFrame(parent, -1, title, pos, size, style, name)
     m_controlBar = NULL;
     m_previewCanvas = NULL;
 
-    // Looks silly on Windows with a standard Windows icon    
+    // Give the application icon
 #ifdef __WXMSW__
     wxFrame* topFrame = wxDynamicCast(wxTheApp->GetTopWindow(), wxFrame);
     if (topFrame)
index 89f5e3c83ce852bfe082bad38dba2c5303783b5e..099cf3bbd546057ffe23c39fd55b750cae74f199 100644 (file)
@@ -430,9 +430,9 @@ void wxHtmlPrintout::SetFonts(wxString normal_face, wxString fixed_face,
 //----------------------------------------------------------------------------
 
 
-wxHtmlEasyPrinting::wxHtmlEasyPrinting(const wxString& name, wxFrame *parent_frame)
+wxHtmlEasyPrinting::wxHtmlEasyPrinting(const wxString& name, wxWindow *parentWindow)
 {
-    m_Frame = parent_frame;
+    m_ParentWindow = parentWindow;
     m_Name = name;
     m_PrintData = new wxPrintData;
     m_PageSetupData = new wxPageSetupDialogData;
@@ -510,7 +510,7 @@ bool wxHtmlEasyPrinting::DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *pr
         return FALSE;
     }
 
-    wxPreviewFrame *frame = new wxPreviewFrame(preview, m_Frame,
+    wxPreviewFrame *frame = new wxPreviewFrame(preview, m_ParentWindow,
                                                m_Name + _(" Preview"),
                                                wxPoint(100, 100), wxSize(650, 500));
     frame->Centre(wxBOTH);
@@ -526,7 +526,7 @@ bool wxHtmlEasyPrinting::DoPrint(wxHtmlPrintout *printout)
     wxPrintDialogData printDialogData(*m_PrintData);
     wxPrinter printer(&printDialogData);
 
-    if (!printer.Print(m_Frame, printout, TRUE))
+    if (!printer.Print(m_ParentWindow, printout, TRUE))
     {
         return FALSE;
     }
@@ -540,7 +540,7 @@ bool wxHtmlEasyPrinting::DoPrint(wxHtmlPrintout *printout)
 void wxHtmlEasyPrinting::PrinterSetup()
 {
     wxPrintDialogData printDialogData(*m_PrintData);
-    wxPrintDialog printerDialog(m_Frame, &printDialogData);
+    wxPrintDialog printerDialog(m_ParentWindow, &printDialogData);
 
     printerDialog.GetPrintDialogData().SetSetupDialog(TRUE);
 
@@ -559,7 +559,7 @@ void wxHtmlEasyPrinting::PageSetup()
     }
 
     m_PageSetupData->SetPrintData(*m_PrintData);
-    wxPageSetupDialog pageSetupDialog(m_Frame, m_PageSetupData);
+    wxPageSetupDialog pageSetupDialog(m_ParentWindow, m_PageSetupData);
 
     if (pageSetupDialog.ShowModal() == wxID_OK)
     {