Example #1
0
    def store_allocation(self):
        DockObject.store_allocation(self)

        if self.status == DockItemStatus.FLOATING:
            self.float_rect = self.item.floating_position
        elif self.status == DockItemStatus.AUTOHIDE:
            self.autohide_size = self.item.autohide_size
Example #2
0
    def restore_allocation(self):
        DockObject.restore_allocation(self)
        self.item.update_visible_status()

        if self.status == DockItemStatus.FLOATING:
            self.item.set_float_mode(self.float_rect)
        elif self.status == DockItemStatus.AUTOHIDE:
            self.item.set_autohide_mode(self.bar_doc_position, self.get_autohide_size())
        else:
            self.item.reset_mode()

        if not self.visible_flag:
            self.item.hide_widget()
Example #3
0
    def __init__(self, frame, item):
        """
        
        Arguments:
        - `frame`:
        - `item`:
        """

        DockObject.__init__(self, frame)

        self.frame = frame
        self.item = item

        self.visible_flag = item.visible
        self.autohide_size = -1
        self._status = DockItemStatus.DOCKABLE
        self.float_rect = None
        self.bar_doc_position = None
Example #4
0
 def size_allocate(self, new_alloc):
     self.item.widget.size_allocate(new_alloc)
     DockObject.size_allocate(self, new_alloc)
Example #5
0
    def copy_from(self, ob):
        DockObject.copy_from(self, ob)

        self.item = ob.item
        self.visible_flag = ob.visible_flag
        self.float_rect = ob.float_rect