コード例 #1
0
ファイル: timelinepanel.py プロジェクト: weeksjm/gnumed
 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
ファイル: timelinecanvas.py プロジェクト: luzpaz/gnumed
 def GetCursor(self, evt):
     return Cursor(evt.GetX(), evt.GetY())
コード例 #5
0
ファイル: timelinecanvas.py プロジェクト: luzpaz/gnumed
 def get_cursor():
     return Cursor(evt.GetX(), evt.GetY())
コード例 #6
0
ファイル: timelinecanvas.py プロジェクト: luzpaz/gnumed
 def GetBalloonAtCursor(self):
     cursor = Cursor(*self.ScreenToClient(wx.GetMousePosition()))
     return self._controller.balloon_at(cursor)
コード例 #7
0
ファイル: timelinecanvas.py プロジェクト: luzpaz/gnumed
 def GetEventAtCursor(self, prefer_container=False):
     cursor = Cursor(*self.ScreenToClient(wx.GetMousePosition()))
     return self.GetEventAt(cursor, prefer_container)
コード例 #8
0
ファイル: maincanvas.py プロジェクト: weeksjm/gnumed
 def _get_cursor(self, evt):
     return Cursor(evt.GetX(), evt.GetY())