60 self.Preview = wx.Panel(self, style=wx.SIMPLE_BORDER) |
60 self.Preview = wx.Panel(self, style=wx.SIMPLE_BORDER) |
61 self.Preview.SetBackgroundColour(wx.WHITE) |
61 self.Preview.SetBackgroundColour(wx.WHITE) |
62 |
62 |
63 # Add function to preview panel so that it answers to graphic elements |
63 # Add function to preview panel so that it answers to graphic elements |
64 # like Viewer |
64 # like Viewer |
65 setattr(self.Preview, "GetDrawingMode", lambda:FREEDRAWING_MODE) |
65 setattr(self.Preview, "GetDrawingMode", lambda: FREEDRAWING_MODE) |
66 setattr(self.Preview, "GetScaling", lambda:None) |
66 setattr(self.Preview, "GetScaling", lambda: None) |
67 setattr(self.Preview, "GetBlockType", controller.GetBlockType) |
67 setattr(self.Preview, "GetBlockType", controller.GetBlockType) |
68 setattr(self.Preview, "IsOfType", controller.IsOfType) |
68 setattr(self.Preview, "IsOfType", controller.IsOfType) |
69 |
69 |
70 # Bind paint event on Preview panel |
70 # Bind paint event on Preview panel |
71 self.Preview.Bind(wx.EVT_PAINT, self.OnPaint) |
71 self.Preview.Bind(wx.EVT_PAINT, self.OnPaint) |