Example #1
0
 def on_event(self, event):
     '''pass events to the parent'''
     state = self.state
     if (isinstance(event, wx.MouseEvent) and
         not event.ButtonIsDown(wx.MOUSE_BTN_ANY) and
         event.GetWheelRotation() == 0):
         # don't flood the queue with mouse movement
         return
     state.out_queue.put(mp_util.object_container(event))
Example #2
0
 def on_event(self, event):
     '''pass events to the parent'''
     state = self.state
     if (isinstance(event, wx.MouseEvent)
             and not event.ButtonIsDown(wx.MOUSE_BTN_ANY)
             and event.GetWheelRotation() == 0):
         # don't flood the queue with mouse movement
         return
     state.out_queue.put(mp_util.object_container(event))
Example #3
0
 def on_event(self, event):
     '''pass events to the parent'''
     state = self.state
     if isinstance(event, wx.MouseEvent):
         self.on_mouse_event(event)
     if isinstance(event, wx.KeyEvent):
         self.on_key_event(event)
     evt = mp_util.object_container(event)
     pt = self.image_coordinates(wx.Point(evt.X,evt.Y))
     evt.X = pt.x
     evt.Y = pt.y
     state.out_queue.put(evt)
Example #4
0
 def on_event(self, event):
     '''pass events to the parent'''
     state = self.state
     if isinstance(event, wx.MouseEvent):
         self.on_mouse_event(event)
     if isinstance(event, wx.KeyEvent):
         self.on_key_event(event)
     if (isinstance(event, wx.MouseEvent)
             and not event.ButtonIsDown(wx.MOUSE_BTN_ANY)
             and event.GetWheelRotation() == 0):
         # don't flood the queue with mouse movement
         return
     evt = mp_util.object_container(event)
     pt = self.image_coordinates(wx.Point(evt.X, evt.Y))
     evt.X = pt.x
     evt.Y = pt.y
     state.out_queue.put(evt)
Example #5
0
 def on_event(self, event):
     '''pass events to the parent'''
     state = self.state
     if isinstance(event, wx.MouseEvent):
         self.on_mouse_event(event)
     if isinstance(event, wx.KeyEvent):
         self.on_key_event(event)
     if (isinstance(event, wx.MouseEvent) and
         not event.ButtonIsDown(wx.MOUSE_BTN_ANY) and
         event.GetWheelRotation() == 0):
         # don't flood the queue with mouse movement
         return
     evt = mp_util.object_container(event)
     pt = self.image_coordinates(wx.Point(evt.X,evt.Y))
     evt.X = pt.x
     evt.Y = pt.y
     state.out_queue.put(evt)
Example #6
0
 def on_event(self, event):
     '''pass events to the parent'''
     state = self.state
     if isinstance(event, wx.MouseEvent):
         self.on_mouse_event(event)
     if isinstance(event, wx.KeyEvent):
         self.on_key_event(event)
     if isinstance(event, wx.MouseEvent):
         if hasattr(event, 'ButtonIsDown'):
             any_button_down = event.ButtonIsDown(wx.MOUSE_BTN_ANY)
         else:
             any_button_down = event.leftIsDown or event.rightIsDown
         if not any_button_down and event.GetWheelRotation() == 0:
             # don't flood the queue with mouse movement
             return
     evt = mp_util.object_container(event)
     pt = self.image_coordinates(wx.Point(evt.X, evt.Y))
     evt.X = pt.x
     evt.Y = pt.y
     state.out_queue.put(evt)
Example #7
0
 def on_event(self, event):
     '''pass events to the parent'''
     state = self.state
     if isinstance(event, wx.MouseEvent):
         self.on_mouse_event(event)
     if isinstance(event, wx.KeyEvent):
         self.on_key_event(event)
     if isinstance(event, wx.MouseEvent):
         if hasattr(event, 'ButtonIsDown'):
             any_button_down = event.ButtonIsDown(wx.MOUSE_BTN_ANY)
         else:
             any_button_down = event.leftIsDown or event.rightIsDown
         if not any_button_down and event.GetWheelRotation() == 0:
             # don't flood the queue with mouse movement
             return
     evt = mp_util.object_container(event)
     pt = self.image_coordinates(wx.Point(evt.X,evt.Y))
     evt.X = pt.x
     evt.Y = pt.y
     state.out_queue.put(evt)
 def __init__(self, latlon, event, selected):
     self.latlon = latlon
     self.event = mp_util.object_container(event)
     self.selected = selected
 def __init__(self, latlon, event, selected):
     self.latlon = latlon
     self.event = mp_util.object_container(event)
     self.selected = selected