예제 #1
0
 def _timeline_canvas_on_right_down(self, event):
     cursor = Cursor(event.GetX(), event.GetY())
     timeline_event = self.timeline_canvas.GetEventAt(cursor)
     if timeline_event is not None and not self.timeline_canvas.GetDb(
     ).is_read_only():
         self.timeline_canvas.SetEventSelected(timeline_event, True)
         self._display_event_context_menu()
     event.Skip()
예제 #2
0
 def _timeline_canvas_on_right_down(self, event):
     cursor = Cursor(event.GetX(), event.GetY())
     timeline_event = self.timeline_canvas.GetEventAt(cursor)
     if timeline_event is not None and not self.timeline_canvas.GetDb().is_read_only():
         self.timeline_canvas.SetEventSelected(timeline_event, True)
         self._display_event_context_menu()
     else:
         display_timeline_context_menu = getattr(self.main_frame, "display_timeline_context_menu", None)
         if callable(display_timeline_context_menu):
             display_timeline_context_menu()
     event.Skip()
예제 #3
0
 def _timeline_canvas_on_double_clicked(self, event):
     if self.timeline_canvas.GetDb().is_read_only():
         return
     cursor = Cursor(event.GetX(), event.GetY())
     timeline_event = self.timeline_canvas.GetEventAt(cursor)
     time = self.timeline_canvas.GetTimeAt(cursor.x)
     if timeline_event is not None:
         if timeline_event.is_milestone():
             self.open_milestone_editor(timeline_event)
         else:
             self.open_event_editor(timeline_event)
     else:
         open_create_event_editor(self._edit_controller, self, self.config,
                                  self.timeline_canvas.GetDb(), time, time)
     event.Skip()
예제 #4
0
 def GetCursor(self, evt):
     return Cursor(evt.GetX(), evt.GetY())
예제 #5
0
 def get_cursor():
     return Cursor(evt.GetX(), evt.GetY())
예제 #6
0
 def GetBalloonAtCursor(self):
     cursor = Cursor(*self.ScreenToClient(wx.GetMousePosition()))
     return self._controller.balloon_at(cursor)
예제 #7
0
 def GetEventAtCursor(self, prefer_container=False):
     cursor = Cursor(*self.ScreenToClient(wx.GetMousePosition()))
     return self.GetEventAt(cursor, prefer_container)
예제 #8
0
 def _get_cursor(self, evt):
     return Cursor(evt.GetX(), evt.GetY())