Bases: gtk.Container
The etk.DockGroup widget is a gtk.Container that groups its children in a tabbed interface.
Tabs can be reorder by dragging them to the desired location within the same or another etk.DockGroup having the same group-id. You can also drag a complete etk.DockGroup onto another etk.DockGroup having the same group-id to merge all etk.DockItems from the source into the destination etk.DockGroup.
Parameters: | item – a DockItem |
---|---|
Returns: | the index number of the item tab in the DockGroup |
The append_item() method appends a DockItem to the DockGroup using the DockItem specified by item.
Parameters: | item – a DockItem |
---|---|
Returns: | the index number of the item tab in the DockGroup |
The prepend_item() method prepends a DockItem to the DockGroup using the DockItem specified by item.
Parameters: |
|
---|---|
Returns: | the index number of the item tab in the DockGroup |
The insert_item() method inserts a DockItem into the DockGroup at the location specified by position (0 is the first item). item is the DockItem to insert. If position is None the item is appended to the DockGroup.
Parameters: | item_num – the index of an item tab, starting from 0. If None, the last item will be removed. |
---|
The remove_item() method removes the item at the location specified by item_num. The value of item_num starts from 0.
Parameters: | item – a DockItem |
---|---|
Returns: | the index of the item tab specified by item, or None if item is not in the DockGroup |
The item_num() method returns the index of the item tab which contains the DockItem specified by item or None if no item tab contains item.
Returns: | the number of item tabs in the DockGroup. |
---|
The get_n_items() method returns the number of item tabs in the DockGroup.
Parameters: | item_num – the index of an item tab in the DockGroup. |
---|---|
Returns: | a DockItem, or None if item_num is out of bounds. |
The get_nth_item() method returns the DockItem contained in the item tab with the index specified by item_num. If item_num is out of bounds for the item range of the DockGroup this method returns None.
Returns: | the index (starting from 0) of the current item tab in the DockGroup. If the DockGroup has no item tabs, then None will be returned. |
---|
The get_current_item() method returns the index of the current item tab numbered from 0, or None if there are no item tabs.
Parameters: | item_num – the index of the item tab to switch to, starting from 0. If negative, the first item tab will be used. If greater than the number of item tabs in the DockGroup, the last item tab will be used. |
---|
Switches to the item number specified by item_num. If item_num is negative the first item is selected. If greater than the number of items in the DockGroup, the last item is selected.
The next_item() method switches to the next item. Nothing happens if the current item is the last item.
The prev_item() method switches to the previous item. Nothing happens if the current item is the first item.
Parameters: |
|
---|
The reorder_item() method reorders the DockGroup items so that item appears in the location specified by position. If position is greater than or equal to the number of children in the list, item will be moved to the end of the list. If position is negative, item will be moved to the beginning of the list.