Esempio n. 1
0
    def update_hierarchy(self, newparent, oldparent):
        world = oldparent
        while world:
            unobserve(world, self.on_parent_changed)
            world = world.parent

        world = newparent
        while world:
            observe(world, self.on_parent_changed)
            world = world.parent
Esempio n. 2
0
    def __init__(self, parent, editor, vertex):
        Handle.__init__(self, parent, editor)
        self.vertices = [vertex]
        Handle.move(self, vertex)
        self.ideal.move(vertex)

        observe(vertex, self.on_changed)
        world = vertex.parent
        while world:
            observe(world, self.on_parent_changed)
            world = world.parent
Esempio n. 3
0
    def __init__(self, parent, editor, orientation):
        Handle.__init__(self, parent, editor)

        self.orientation = orientation
        self.place()
        self.ideal.move(soya.Point(orientation, 0.0, 0.0, -1.0))

        observe(orientation, self.on_changed)
        world = orientation.parent
        while world:
            observe(world, self.on_parent_changed)
            world = world.parent
Esempio n. 4
0
    def __init__(self, parent, editor, position):
        Handle.__init__(self, parent, editor)

        self.position = position
        self.ideal.move(position)
        Handle.move(self, position)

        observe(position, self.on_changed)
        world = position.parent
        while world:
            observe(world, self.on_parent_changed)
            world = world.parent
Esempio n. 5
0
 def add_vertex(self, vertex):
     vertex.parent = self.vertices[0].parent
     vertex.move(self)
     self.vertices.append(vertex)
     observe(vertex, self.on_changed)
Esempio n. 6
0
 def setevent  (self):
   items = custom._find_children(self.item)
   observe(self.item, self.content_changed)
   if (not items is None) and (not items is self.item): observe(items, self.content_changed)
Esempio n. 7
0
 def setevent  (self): observe  (self.edited, self.edited_changed)
 def unsetevent(self): unobserve(self.edited, self.edited_changed)