Exemplo n.º 1
0
 def remove_self(self):
     """Remove the element from its own parent"""
     elementid, parent = summon_core.get_element_parent(self.ptr)
     
     if parent == 0:
         raise Exception("element has no parent, cannot remove")
     else:
         summon_core.remove_group2(parent, self.ptr)
Exemplo n.º 2
0
 def remove(self, *elements):
     """Remove drawing elements from the children of this element"""
     summon_core.remove_group2(self.ptr, *[x.ptr for x in elements])
Exemplo n.º 3
0
 def clear(self):
     """Remove all drawing elements under group"""
     children = summon_core.get_element_children(self.ptr)
     ptrs = [children[i] for i in xrange(1, len(children), 2)]            
     summon_core.remove_group2(self.ptr, *ptrs)