232 |
|
|
233 |
"""A widget that displays a map and offers some interaction""" |
"""A widget that displays a map and offers some interaction""" |
234 |
|
|
235 |
def __init__(self, parent, winid): |
def __init__(self, parent, winid, interactor): |
236 |
wxWindow.__init__(self, parent, winid) |
wxWindow.__init__(self, parent, winid) |
237 |
self.SetBackgroundColour(wxColour(255, 255, 255)) |
self.SetBackgroundColour(wxColour(255, 255, 255)) |
238 |
self.map = None |
self.map = None |
246 |
EVT_LEFT_UP(self, self.OnLeftUp) |
EVT_LEFT_UP(self, self.OnLeftUp) |
247 |
EVT_MOTION(self, self.OnMotion) |
EVT_MOTION(self, self.OnMotion) |
248 |
wx.EVT_IDLE(self, self.OnIdle) |
wx.EVT_IDLE(self, self.OnIdle) |
249 |
import main |
self.interactor = interactor |
|
self.interactor = main.app.interactor |
|
250 |
self.interactor.Subscribe(SELECTED_SHAPE, self.shape_selected) |
self.interactor.Subscribe(SELECTED_SHAPE, self.shape_selected) |
251 |
|
|
252 |
def OnPaint(self, event): |
def OnPaint(self, event): |