Exemple #1
0
	def mouse_right_up(self, event):
		if self.moved:
			self.copy = True
			cursor = self.app.cursors[modes.COPY_MODE]
			self.canvas.set_temp_cursor(cursor)
		else:
			AbstractController.mouse_right_up(self, event)
Exemple #2
0
 def mouse_right_up(self, event):
     if self.moved:
         self.copy = True
         cursor = self.app.cursors[modes.COPY_MODE]
         self.canvas.set_temp_cursor(cursor)
     else:
         AbstractController.mouse_right_up(self, event)
 def mouse_move(self, event):
     if self.draw:
         AbstractController.mouse_move(self, event)
     else:
         self.counter += 1
         if self.counter > 5:
             self.counter = 0
             point = event.get_point()
             dpoint = self.canvas.win_to_doc(point)
             if self.selection.is_point_over_marker(dpoint):
                 mark = self.selection.is_point_over_marker(dpoint)[0]
                 self.canvas.resize_marker = mark
                 self.canvas.set_temp_mode(modes.RESIZE_MODE)
Exemple #4
0
	def mouse_move(self, event):
		self.snap = self.presenter.snap
		if self.draw:
			AbstractController.mouse_move(self, event)
		else:
			self.counter += 1
			if self.counter > 5:
				self.counter = 0
				point = event.get_point()
				dpoint = self.canvas.win_to_doc(point)
				if self.selection.is_point_over(dpoint):
					self.canvas.set_temp_mode(modes.MOVE_MODE)
				elif self.selection.pick_at_point(dpoint):
					self.canvas.set_temp_mode(modes.MOVE_MODE)
				elif self.selection.is_point_over_marker(dpoint):
					mark = self.selection.is_point_over_marker(dpoint)[0]
					self.canvas.resize_marker = mark
					self.canvas.set_temp_mode(modes.RESIZE_MODE)
				elif self.snap.is_over_guide(point)[0]:
					self.canvas.set_temp_mode(modes.GUIDE_MODE)
Exemple #5
0
 def mouse_move(self, event):
     self.snap = self.presenter.snap
     if self.draw:
         AbstractController.mouse_move(self, event)
     else:
         self.counter += 1
         if self.counter > 5:
             self.counter = 0
             point = event.get_point()
             dpoint = self.canvas.win_to_doc(point)
             if self.selection.is_point_over(dpoint):
                 self.canvas.set_temp_mode(modes.MOVE_MODE)
             elif self.selection.pick_at_point(dpoint):
                 self.canvas.set_temp_mode(modes.MOVE_MODE)
             elif self.selection.is_point_over_marker(dpoint):
                 mark = self.selection.is_point_over_marker(dpoint)[0]
                 self.canvas.resize_marker = mark
                 self.canvas.set_temp_mode(modes.RESIZE_MODE)
             elif self.snap.is_over_guide(point)[0]:
                 self.canvas.set_temp_mode(modes.GUIDE_MODE)
 def __init__(self, canvas, presenter):
     AbstractController.__init__(self, canvas, presenter)
     self.frame = []
     self._calc_trafo_handlers = {
         MARK_TOP_LEFT_TRAFO: self._calc_top_left_scale_trafo,
         MARK_TOP_TRAFO: self._calc_top_scale_trafo,
         MARK_TOP_RIGHT_TRAFO: self._calc_top_right_scale_trafo,
         MARK_LEFT_TRAFO: self._calc_left_scale_trafo,
         MARK_RIGHT_TRAFO: self._calc_right_scale_trafo,
         MARK_BOTTOM_LEFT_TRAFO: self._calc_bottom_left_scale_trafo,
         MARK_BOTTOM_TRAFO: self._calc_bottom_scale_trafo,
         MARK_BOTTOM_RIGHT_TRAFO: self._calc_bottom_right_scale_trafo,
         MARK_TOP_SKEW: self._calc_top_skew_trafo,
         MARK_BOTTOM_SKEW: self._calc_bottom_skew_trafo,
         MARK_LEFT_SKEW: self._calc_left_skew_trafo,
         MARK_RIGHT_SKEW: self._calc_right_skew_trafo,
         MARK_TOP_LEFT_ROTATE: self._calc_top_left_rotate_trafo,
         MARK_TOP_RIGHT_ROTATE: self._calc_top_right_rotate_trafo,
         MARK_BOTTOM_LEFT_ROTATE: self._calc_bottom_left_rotate_trafo,
         MARK_BOTTOM_RIGHT_ROTATE: self._calc_bottom_right_rotate_trafo,
     }
Exemple #7
0
 def __init__(self, canvas, presenter):
     AbstractController.__init__(self, canvas, presenter)
Exemple #8
0
	def __init__(self, canvas, presenter):
		AbstractController.__init__(self, canvas, presenter)
Exemple #9
0
 def __init__(self, canvas, presenter):
     AbstractController.__init__(self, canvas, presenter)
     self.canvas.eventloop.connect(self.eventloop.DOC_MODIFIED,
                                   self.doc_modified)
Exemple #10
0
 def __init__(self, canvas, presenter):
     AbstractController.__init__(self, canvas, presenter)
     self.move = False
     self.moved = False
     self.copy = False
     self.trafo = []
Exemple #11
0
 def mouse_right_up(self, event):
     if self.moved:
         self.copy = True
         self.set_cursor()
     else:
         AbstractController.mouse_right_up(self, event)
 def mouse_down(self, event):
     AbstractController.mouse_down(self, event)
Exemple #13
0
	def __init__(self, canvas, presenter):
		AbstractController.__init__(self, canvas, presenter)
		self.move = False
		self.moved = False
		self.copy = False
		self.trafo = []
Exemple #14
0
	def mouse_right_up(self, event):
		if self.moved:
			self.copy = True
			self.set_cursor()
		else:
			AbstractController.mouse_right_up(self, event)
Exemple #15
0
 def mouse_right_up(self, event):
     if self.draw:
         return
     AbstractController.mouse_right_up(self, event)
 def __init__(self, canvas, presenter):
     AbstractController.__init__(self, canvas, presenter)
     self.trafo = []
     self.old_selection = []