52 |
dc = wxPaintDC(self) |
dc = wxPaintDC(self) |
53 |
dc.BeginDrawing() |
dc.BeginDrawing() |
54 |
w, h = self.GetSizeTuple() |
w, h = self.GetSizeTuple() |
55 |
dc.SetPen(wxPen(self.__instance.panelGridColor)) |
dc.SetPen(wxPen(self.__instance.workspace.panelGridColor)) |
56 |
for x in range(self.__instance.widgetWidth,w-3, self.__instance.widgetWidth): |
for x in range(self.__instance.workspace.widgetWidth,w-3, self.__instance.workspace.widgetWidth): |
57 |
dc.DrawLine(x,0,x,h-1) |
dc.DrawLine(x,0,x,h-1) |
58 |
|
|
59 |
for y in range(self.__instance.widgetHeight,h-2,self.__instance.widgetHeight): |
for y in range(self.__instance.workspace.widgetHeight,h-2,self.__instance.workspace.widgetHeight): |
60 |
dc.DrawLine(0,y,w-1,y) |
dc.DrawLine(0,y,w-1,y) |
61 |
dc.EndDrawing() |
dc.EndDrawing() |
62 |
event.Skip() |
event.Skip() |
65 |
w = event.GetDragRect().width |
w = event.GetDragRect().width |
66 |
h = event.GetDragRect().height |
h = event.GetDragRect().height |
67 |
|
|
68 |
neww = int(w/float(self.__instance.widgetWidth)+.5) |
neww = int(w/float(self.__instance.workspace.widgetWidth)+.5) |
69 |
newh = int(h/float(self.__instance.widgetHeight)+.5) |
newh = int(h/float(self.__instance.workspace.widgetHeight)+.5) |
70 |
|
|
71 |
layout = self.__instance.instance.rootObject._layout |
layout = self.__instance.instance.rootObject._layout |
72 |
|
|