예제 #1
0
	def __init__(self, object):
		self.selected_path = -1
		self.selected_idx = -1
		self.selection_type = SelNone
		self.other_segment = -1
		Editor.__init__(self, object)
		self.Deselect()
예제 #2
0
 def ButtonDown(self, p, button, state):
     if self.selection == 1:
         start = self.trafo(cos(self.start_angle), sin(self.start_angle))
     else:
         start = self.trafo(cos(self.end_angle), sin(self.end_angle))
     Editor.DragStart(self, start)
     return p - start
	def ButtonDown(self, p, button, state):
		if self.selection is not None:
			start = self.selection.p
			Editor.DragStart(self, start)
			return p - start
		else:
			return None
예제 #4
0
파일: xmleditor.py 프로젝트: ebadi/axe
#! /usr/bin/env python3
"""Startup script for XML Editor
"""
import sys
from base import Editor

if len(sys.argv) > 1:
    Editor(sys.argv[1])
else:
    Editor('')
예제 #5
0
파일: text.py 프로젝트: shumik/skencil-c
    def __init__(self, object):
	Editor.__init__(self, object)
	self.caret = 0
	object.set_editor(self)
예제 #6
0
 def ButtonUp(self, p, button, state):
     p = self.apply_constraint(p, state)
     Editor.DragStop(self, p)
     start_angle, end_angle, arc_type = self.angles()
     return CreateMultiUndo(self.object.SetAngles(start_angle, end_angle),
                            self.object.SetArcType(arc_type))
예제 #7
0
 def MouseMove(self, p, state):
     p = self.apply_constraint(p, state)
     Editor.MouseMove(self, p, state)
 def ButtonUp(self, p, button, state):
     Editor.DragStop(self, p)
 def ButtonDown(self, p, button, state):
     Editor.DragStart(self, p)
 def __init__(self, object):
     Editor.__init__(self, object)
     self.caret = 0
     object.set_editor(self)