コード例 #1
0
ファイル: external.py プロジェクト: veltsov/skencil-tk
 def __init__(self, data=None, trafo=None, duplicate=None):
     RectangularObject.__init__(self, trafo, duplicate=duplicate)
     GraphicsObject.__init__(self, duplicate=duplicate)
     if duplicate is not None:
         data = duplicate.data
     self.data = data
     data.AddUser(self)
コード例 #2
0
 def __init__(self, objects=None, duplicate=None):
     GraphicsObject.__init__(self, duplicate=duplicate)
     if duplicate is not None:
         objects = []
         for obj in duplicate.objects:
             objects.append(obj.Duplicate())
         self.objects = objects
     elif objects:
         self.objects = objects
     else:
         self.objects = []
     self.changing_children = 0
     self.set_parent()
コード例 #3
0
ファイル: compound.py プロジェクト: shumik/skencil-c
    def __init__(self, objects = None, duplicate = None):
	GraphicsObject.__init__(self, duplicate = duplicate)
	if duplicate is not None:
	    objects = []
	    for obj in duplicate.objects:
		objects.append(obj.Duplicate())
	    self.objects = objects
	elif objects:
	    self.objects = objects
	else:
	    self.objects = []
	self.changing_children = 0
	self.set_parent()
コード例 #4
0
 def SetParent(self, parent):
     if parent is self.parent:
         return
     GraphicsObject.SetParent(self, parent)
     if parent is not None:
         self.set_parent()
     else:
         self.unset_parent()
コード例 #5
0
ファイル: external.py プロジェクト: shumik/skencil-c
    def __init__(self, data = None, trafo = None, duplicate = None):
	RectangularObject.__init__(self, trafo, duplicate = duplicate)
	GraphicsObject.__init__(self, duplicate = duplicate)
	if duplicate is not None:
	    data = duplicate.data
	self.data = data
コード例 #6
0
 def SelectionInfo(self, child=None):
     info = GraphicsObject.SelectionInfo(self)
     if info and child is not None:
         path = info[0]
         return (path + (_sketch.IdIndex(self.objects, child), ), child)
     return info
コード例 #7
0
 def Destroy(self):
     self.destroy_objects()
     GraphicsObject.Destroy(self)
コード例 #8
0
 def SetDocument(self, doc):
     for obj in self.objects:
         obj.SetDocument(doc)
     GraphicsObject.SetDocument(self, doc)
     self.set_parent()