示例#1
0
    def __init__(self, content, path=None, image_name='image',
                 is_expandable=False, anchor=ANCHOR_CENTER):
        Wrapper.__init__(self, content, is_expandable=is_expandable, anchor=anchor)

        # private
        self._frame = None
        if path is None:
            self._path = ['frame']
        else:
            self._path = path
        self._image_name = image_name
示例#2
0
 def unload_graphics(self):
     if self._frame is not None:
         self._frame.unload()
         self._frame = None
     Wrapper.unload_graphics(self)
示例#3
0
 def delete(self):
     Wrapper.delete(self)
     if self._window is not None:
         self._window.remove_handlers(self)
         self._window = None
     self._batch._draw_list_dirty = True  # forces resorting groups
示例#4
0
 def load_graphics(self):
     Wrapper.load_graphics(self)
     theme = self.theme[self.get_path()]
     if self._frame is None:
         template = theme[self._image_name]
         self._frame = template.generate(theme['gui_color'], **self.get_batch('panel'))
示例#5
0
 def delete(self):
     Wrapper.delete(self)
     if self._window is not None:
         self._window.remove_handlers(self)
         self._window = None
     self._batch._draw_list_dirty = True  # forces resorting groups