def iter_children(self) -> Iterable[ItemWidget]: """Iterates all of the item's children.""" children = dpgcore.get_item_children(self.id) if not children: return for child in children: yield get_item_by_id(child)
def get_parent(self) -> Optional[ContainerWidget]: """Get this item's parent.""" parent_id = dpgcore.get_item_parent(self.id) if not parent_id: return None return get_item_by_id(parent_id)
def get_instance(cls): """Get the standard instance that is automatically created by DPG.""" return get_item_by_id('documentation##standard')