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()
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()
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()
def GetCursor(self, evt): return Cursor(evt.GetX(), evt.GetY())
def get_cursor(): return Cursor(evt.GetX(), evt.GetY())
def GetBalloonAtCursor(self): cursor = Cursor(*self.ScreenToClient(wx.GetMousePosition())) return self._controller.balloon_at(cursor)
def GetEventAtCursor(self, prefer_container=False): cursor = Cursor(*self.ScreenToClient(wx.GetMousePosition())) return self.GetEventAt(cursor, prefer_container)
def _get_cursor(self, evt): return Cursor(evt.GetX(), evt.GetY())