コード例 #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
コード例 #3
0
	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)
コード例 #8
0
 def ButtonUp(self, p, button, state):
     Editor.DragStop(self, p)
コード例 #9
0
 def ButtonDown(self, p, button, state):
     Editor.DragStart(self, p)
コード例 #10
0
 def __init__(self, object):
     Editor.__init__(self, object)
     self.caret = 0
     object.set_editor(self)