From: Daid Date: Sat, 24 Mar 2012 17:12:10 +0000 (+0100) Subject: Added printWindow placeholder X-Git-Tag: RC1~19 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1021f0f3f7dd375f1d4f11051a5b0005037e1db9;p=cura.git Added printWindow placeholder --- diff --git a/Cura/newui/printWindow.py b/Cura/newui/printWindow.py new file mode 100644 index 00000000..9df9794a --- /dev/null +++ b/Cura/newui/printWindow.py @@ -0,0 +1,38 @@ +from __future__ import absolute_import +import __init__ + +import wx + +printWindowHandle = None + +def printFile(filename): + global printWindowHandle + print "Want to print: " + filename + if printWindowHandle == None: + printWindowHandle = printWindow() + printWindowHandle.Show(True) + printWindowHandle.Raise() + +class printWindow(wx.Frame): + "Main user interface window" + def __init__(self): + super(printWindow, self).__init__(None, -1, title='Printing') + self.SetSizer(wx.GridBagSizer(2, 2)) + + self.statsPanel = wx.Panel(self) + self.GetSizer().Add(self.statsPanel, pos=(0,0), span=(4,1), flag=wx.EXPAND) + + self.GetSizer().Add(wx.Button(self, -1, 'Test'), pos=(0,1)) + self.GetSizer().Add(wx.Button(self, -1, 'Test'), pos=(1,1)) + self.GetSizer().Add(wx.Button(self, -1, 'Test'), pos=(2,1)) + + self.Bind(wx.EVT_CLOSE, self.OnClose) + + self.Layout() + self.Fit() + self.Centre() + + def OnClose(self, e): + global printWindowHandle + printWindowHandle = None + self.Destroy()