]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wxPython/lib/printout.py
Updates to contributed library stuff, a new version of PyCrust
[wxWidgets.git] / wxPython / wxPython / lib / printout.py
index b158215ff1cf90ced93ad40b8b2cf7fb5b960a78..bca1aee4a4d81d126be200960b2fe4c21d165c01 100644 (file)
@@ -5,8 +5,8 @@
 # Author:       Lorne White (email: lorne.white@telusplanet.net)
 #
 # Created:
 # Author:       Lorne White (email: lorne.white@telusplanet.net)
 #
 # Created:
-# Version       0.7
-# Date:         August 18, 2001
+# Version       0.72
+# Date:         Sept 8, 2001
 # Licence:      wxWindows license
 #----------------------------------------------------------------------------
 
 # Licence:      wxWindows license
 #----------------------------------------------------------------------------
 
@@ -594,6 +594,7 @@ class PrintTable:
         self.row_line_colour = {}
 
         self.parentFrame = parentFrame
         self.row_line_colour = {}
 
         self.parentFrame = parentFrame
+        self.SetPreviewSize()
 
         self.printData = wxPrintData()
         self.scale = 1.0
 
         self.printData = wxPrintData()
         self.scale = 1.0
@@ -609,6 +610,16 @@ class PrintTable:
         self.SetMargins()
         self.SetPortrait()
 
         self.SetMargins()
         self.SetPortrait()
 
+    def SetPreviewSize(self, position = wxPoint(0, 0), size="Full"):
+        if size == "Full":
+            screenWidth = int(wx.wxSystemSettings_GetSystemMetric(wx.wxSYS_SCREEN_X))
+            screenHeight = int(wx.wxSystemSettings_GetSystemMetric(wx.wxSYS_SCREEN_Y))
+            self.preview_frame_size = wxSize(screenWidth, screenHeight)
+            self.preview_frame_pos = position
+        else:
+            self.preview_frame_size = size     
+            self.preview_frame_pos = position
+
     def SetPaperId(self, paper):
         self.printData.SetPaperId(paper)
 
     def SetPaperId(self, paper):
         self.printData.SetPaperId(paper)
 
@@ -843,8 +854,8 @@ class PrintTable:
 
         frame.Initialize()
         if self.parentFrame:
 
         frame.Initialize()
         if self.parentFrame:
-            frame.SetPosition(self.parentFrame.GetPosition())
-            frame.SetSize(self.parentFrame.GetSize())
+            frame.SetPosition(self.preview_frame_pos)
+            frame.SetSize(self.preview_frame_size)
         frame.Show(true)
 
 
         frame.Show(true)