Gdl.DockItem¶
- Subclasses:
Methods¶
- Inherited:
Gdl.DockObject (34), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)
- Structs:
Gdl.DockItemClass (1), Gdl.DockObjectClass (1), Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gdl.DockObject (7), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)
|
|
|
|
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
General behavior for the dock item (i.e. whether it can float, if it’s locked, etc.) |
||
r/w |
Whether the widget is closed. |
||
r/w |
If set, the dock item is hidden but it has a corresponding icon in the dock bar allowing to show it again. |
||
r/w |
If set, the dock item cannot be dragged around and it doesn’t show a grip |
||
r/w/c |
Orientation of the docking item |
||
r/w |
Preferred height for the dock item |
||
r/w |
Preferred width for the dock item |
||
r/w |
If set, the dock item can be resized when docked in a GtkPanel widget |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Gdl.DockObject (2), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Short Description |
---|---|
Signals that this dock has been deselected in a switcher. |
|
Signals that the dock item has begun to be dragged. |
|
Signals that the dock item dragging has ended. |
|
Signals that a dock item dragging motion event has occured. |
|
The |
|
Signals that this dock has been selected from a switcher. |
Fields¶
- Inherited:
Gdl.DockObject (2), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Type |
Access |
Description |
---|---|---|---|
object |
r |
Class Details¶
- class Gdl.DockItem(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(name, long_name, behavior)¶
- Parameters:
name (
str
) – Unique name for identifying the dock object.long_name (
str
) – Human readable name for the dock object.behavior (
Gdl.DockItemBehavior
) – General behavior for the dock item (i.e. whether it can float, if it’s locked, etc.), as specified byGdl.DockItemBehavior
flags.
- Returns:
The newly created dock item grip widget.
- Return type:
Creates a new dock item widget.
- classmethod new_with_pixbuf_icon(name, long_name, pixbuf_icon, behavior)¶
- Parameters:
name (
str
) – Unique name for identifying the dock object.long_name (
str
) – Human readable name for the dock object.pixbuf_icon (
GdkPixbuf.Pixbuf
) – Pixbuf icon for the dock object.behavior (
Gdl.DockItemBehavior
) – General behavior for the dock item (i.e. whether it can float, if it’s locked, etc.), as specified byGdl.DockItemBehavior
flags.
- Returns:
The newly created dock item grip widget.
- Return type:
Creates a new dock item grip widget with a given pixbuf icon.
New in version 3.3.2.
- classmethod new_with_stock(name, long_name, stock_id, behavior)¶
- Parameters:
name (
str
) – Unique name for identifying the dock object.long_name (
str
) – Human readable name for the dock object.stock_id (
str
) – Stock icon for the dock object.behavior (
Gdl.DockItemBehavior
) – General behavior for the dock item (i.e. whether it can float, if it’s locked, etc.), as specified byGdl.DockItemBehavior
flags.
- Returns:
The newly created dock item grip widget.
- Return type:
Creates a new dock item grip widget with a given stock id.
- classmethod set_has_grip(has_grip)¶
-
Define in the corresponding kind of dock item has a grip. Even if an item has a grip it can be hidden.
New in version 3.6.
- bind(dock)¶
- Parameters:
dock (
Gtk.Widget
) – TheGdl.Dock
widget to bind it to. Note that this widget must be a type ofGdl.Dock
.
Binds this dock item to a new dock master.
- dock_to(target, position, docking_param)¶
- Parameters:
target (
Gdl.DockItem
orNone
) – The dock item that will be used as the point of reference.position (
Gdl.DockPlacement
) – The position to dock #item, relative to #target.docking_param (
int
) – This value is unused, and will be ignored.
Relocates a dock item to a new location relative to another dock item.
- get_behavior_flags()¶
- Returns:
the behavior of the item.
- Return type:
Retrieves the behavior of the item.
New in version 3.6.
- get_child()¶
- Returns:
pointer to child of the
Gdl.DockItem
- Return type:
Gets the child of the
Gdl.DockItem
, orNone
if the item contains no child widget. The returned widget does not have a reference added, so you do not need to unref it.New in version 3.6.
- get_drag_area(rect)¶
- Parameters:
rect (
Gdk.Rectangle
) – A pointer to aGdk.Rectangle
that will receive the drag position
Gets the size and the position of the drag window in pixels.
New in version 3.6.
- get_grip()¶
- Returns:
Returns the current label widget.
- Return type:
Gtk.Widget
orNone
This function returns the dock item’s grip label widget.
- get_orientation()¶
- Returns:
the orientation of the object.
- Return type:
Retrieves the orientation of the object.
New in version 3.6.
- get_tablabel()¶
- Returns:
Returns the tab label widget.
- Return type:
Gets the current tab label widget. Note that this label widget is only visible when the “switcher-style” property of the
Gdl.DockMaster
is set toGdl.SwitcherStyle.TABS
- hide_grip()¶
This function hides the dock item’s grip widget.
- hide_item()¶
This function hides the dock item. Since version 3.6, when dock items are hidden they are not removed from the layout.
The dock item close button causes the panel to be hidden.
- iconify_item()¶
This function iconifies the dock item. When dock items are iconified they are hidden, and appear only as icons in dock bars.
The dock item iconify button causes the panel to be iconified.
- is_closed()¶
-
Checks whether a given
Gdl.DockItem
is closed. It can be only hidden or detached.New in version 3.6.
- is_iconified()¶
-
Checks whether a given
Gdl.DockItem
is iconified.New in version 3.6.
- is_placeholder()¶
-
Checks whether a given
Gdl.DockItem
is a placeholder created by theGdl.DockLayout
object and does not contain a child.New in version 3.6.
- lock()¶
This function locks the dock item. When locked the dock item cannot be dragged around and it doesn’t show a grip.
- notify_deselected()¶
This function emits the deselected signal. It is used by
Gdl.Switcher
to let clients know that this item has been deselected.
- notify_selected()¶
This function emits the selected signal. It is to be used by
Gdl.Switcher
to let clients know that this item has been switched to.
- or_child_has_focus()¶
-
Checks whether a given
Gdl.DockItem
or its child widget has focus. This check is performed recursively on child widgets.New in version 3.3.2.
- preferred_size(req)¶
- Parameters:
req (
Gtk.Requisition
) – A pointer to aGtk.Requisition
into which the preferred size will be written.
Gets the preferred size of the dock item in pixels.
- set_behavior_flags(behavior, clear)¶
- Parameters:
behavior (
Gdl.DockItemBehavior
) – Behavior flags to turn onclear (
bool
) – Whether to clear state before turning on flags
This function sets the behavior of the dock item.
New in version 3.6.
- set_child(child)¶
- Parameters:
child (
Gtk.Widget
orNone
) – aGtk.Widget
Set a new child for the
Gdl.DockItem
. This child is different from the children using theGtk.Container
interface. It is a private child reserved for the widget implementation.If a child is already present, it will be replaced. If widget is
None
the child will be removed.New in version 3.6.
- set_default_position(reference)¶
- Parameters:
reference (
Gdl.DockObject
) – TheGdl.DockObject
which is the default dock for self
This method has only an effect when you add you dock_item with
Gdl.DockItemBehavior.NEVER_FLOATING
. In this case you have to assign it a default position.*Deprecated 3.6: This function is doing nothing now.
- set_orientation(orientation)¶
- Parameters:
orientation (
Gtk.Orientation
) – The orientation to set the item to. If the orientation is set toGtk.Orientation.VERTICAL
, the grip widget will be shown along the top of the edge of item (if it is not hidden). If the orientation is set toGtk.Orientation.HORIZONTAL
, the grip widget will be shown down the left edge of the item (even if the widget text direction is set to RTL).
This function sets the layout of the dock item.
- set_tablabel(tablabel)¶
- Parameters:
tablabel (
Gtk.Widget
) – The widget that will become the tab label.
Replaces the current tab label widget with another widget. Note that this label widget is only visible when the “switcher-style” property of the
Gdl.DockMaster
is set toGdl.SwitcherStyle.TABS
- show_grip()¶
This function shows the dock item’s grip widget.
- show_item()¶
This function shows the dock item. When dock items are shown, they are displayed in their normal layout position.
- unbind()¶
Unbinds this dock item from it’s dock master.
- unlock()¶
This function unlocks the dock item. When unlocked the dock item can be dragged around and can show a grip.
- unset_behavior_flags(behavior)¶
- Parameters:
behavior (
Gdl.DockItemBehavior
) – Behavior flags to turn off
This function sets the behavior of the dock item.
New in version 3.6.
- do_dock_drag_begin() virtual¶
- do_dock_drag_motion(device, x, y) virtual¶
- Parameters:
device (
Gdk.Device
) –x (
int
) –y (
int
) –
- do_move_focus_child(direction) virtual¶
- Parameters:
direction (
Gtk.DirectionType
) –
- do_set_orientation(orientation) virtual¶
- Parameters:
orientation (
Gtk.Orientation
) – The orientation to set the item to. If the orientation is set toGtk.Orientation.VERTICAL
, the grip widget will be shown along the top of the edge of item (if it is not hidden). If the orientation is set toGtk.Orientation.HORIZONTAL
, the grip widget will be shown down the left edge of the item (even if the widget text direction is set to RTL).
This function sets the layout of the dock item.
Signal Details¶
- Gdl.DockItem.signals.deselected(dock_item)¶
- Signal Name:
deselected
- Flags:
- Parameters:
dock_item (
Gdl.DockItem
) – The object which received the signal
Signals that this dock has been deselected in a switcher.
- Gdl.DockItem.signals.dock_drag_begin(dock_item)¶
- Signal Name:
dock-drag-begin
- Flags:
- Parameters:
dock_item (
Gdl.DockItem
) – The object which received the signal
Signals that the dock item has begun to be dragged.
- Gdl.DockItem.signals.dock_drag_end(dock_item, cancel)¶
- Signal Name:
dock-drag-end
- Flags:
- Parameters:
dock_item (
Gdl.DockItem
) – The object which received the signalcancel (
bool
) – This value is set toTrue
if the drag was cancelled by the user. #cancel is set toFalse
if the drag was accepted.
Signals that the dock item dragging has ended.
- Gdl.DockItem.signals.dock_drag_motion(dock_item, device, x, y)¶
- Signal Name:
dock-drag-motion
- Flags:
- Parameters:
dock_item (
Gdl.DockItem
) – The object which received the signaldevice (
Gdk.Device
) – The device used.x (
int
) – The x-position that the dock item has been dragged to.y (
int
) – The y-position that the dock item has been dragged to.
Signals that a dock item dragging motion event has occured.
- Gdl.DockItem.signals.move_focus_child(dock_item, dir)¶
- Signal Name:
move-focus-child
- Flags:
- Parameters:
dock_item (
Gdl.DockItem
) – The object which received the signaldir (
Gtk.DirectionType
) – The direction in which to move focus
The
::move-focus-child
signal is emitted when a change of focus is requested for the child widget of a dock item. The dir parameter specifies the direction in which focus is to be shifted.New in version 3.3.2.
- Gdl.DockItem.signals.selected(dock_item)¶
- Signal Name:
selected
- Flags:
- Parameters:
dock_item (
Gdl.DockItem
) – The object which received the signal
Signals that this dock has been selected from a switcher.
Property Details¶
- Gdl.DockItem.props.behavior¶
- Name:
behavior
- Type:
- Default Value:
- Flags:
General behavior for the dock item (i.e. whether it can float, if it’s locked, etc.)
- Gdl.DockItem.props.closed¶
-
If set, the dock item is closed.
New in version 3.6.
- Gdl.DockItem.props.iconified¶
-
If set, the dock item is hidden but it has a corresponding icon in the dock bar allowing to show it again.
New in version 3.6.
- Gdl.DockItem.props.locked¶
-
If set, the dock item cannot be dragged around and it doesn’t show a grip
- Gdl.DockItem.props.orientation¶
- Name:
orientation
- Type:
- Default Value:
- Flags:
The orientation of the docking item. If the orientation is set to
Gtk.Orientation.VERTICAL
, the grip widget will be shown along the top of the edge of item (if it is not hidden). If the orientation is set toGtk.Orientation.HORIZONTAL
, the grip widget will be shown down the left edge of the item (even if the widget text direction is set to RTL).
- Gdl.DockItem.props.preferred_height¶
-
Preferred height for the dock item
- Gdl.DockItem.props.preferred_width¶
-
Preferred width for the dock item