Gdl.Dock

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gdl.Dock Gdl.Dock Gdl.DockObject Gdl.DockObject Gdl.DockObject->Gdl.Dock Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gdl.DockObject Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gdl.DockObject (34), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)

Structs:

Gdl.DockObjectClass (1), Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new ()

add_floating_item (item, x, y, width, height)

add_item (item, placement)

get_item_by_name (name)

get_named_items ()

get_placeholder_by_name (name)

get_root ()

hide_preview ()

new_from (floating)

set_skip_taskbar (skip)

show_preview (rect)

xor_rect (rect)

xor_rect_hide ()

Virtual Methods

Inherited:

Gdl.DockObject (7), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

do_layout_changed ()

Properties

Inherited:

Gdl.DockObject (4), Gtk.Container (3), Gtk.Widget (39)

Name

Type

Flags

Short Description

default-title

str

r/w

Default title for the newly created floating docks

floating

bool

r/w/co

Whether the dock is floating in its own window

floatx

int

r/w/c

X coordinate for a floating dock

floaty

int

r/w/c

Y coordinate for a floating dock

height

int

r/w/c

Height for the dock when it’s of floating type

skip-taskbar

bool

r/w/c

Whether or not to prevent a floating dock window from appearing in the taskbar

width

int

r/w/c

Width for the dock when it’s of floating type

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gdl.DockObject (2), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Short Description

layout-changed

Signals that the layout has changed, one or more widgets have been moved, added or removed.

Fields

Inherited:

Gdl.DockObject (2), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

object

Gdl.DockObject

r

Class Details

class Gdl.Dock(**kwargs)
Bases:

Gdl.DockObject

Abstract:

No

Structure:

Gdl.DockClass

classmethod new()
Returns:

A new Gdl.Dock widget.

Return type:

Gtk.Widget

Create a new dock.

add_floating_item(item, x, y, width, height)
Parameters:
  • item (Gdl.DockItem) – A Gdl.DockItem widget

  • x (int) – X coordinate of the floating item

  • y (int) – Y coordinate of the floating item

  • width (int) – width of the floating item

  • height (int) – height of the floating item

Dock an item as a floating item. It creates a new window containing a new dock widget sharing the same master where the item is docked.

add_item(item, placement)
Parameters:

Dock in self, the widget item at the position defined by placement. The function takes care of finding the right parent widget eventually creating it if needed.

get_item_by_name(name)
Parameters:

name (str) – An item name

Returns:

A Gdl.DockItem widget or None

Return type:

Gdl.DockItem

Looks for an Gdl.DockItem widget bound to the master of the dock item. It does not search only in the children of this particular dock widget.

get_named_items()
Returns:

A list of Gdl.DockItem. The list should be freedwith g_list_free(), but the item still belong to the master.

Return type:

[Gdl.DockObject]

Returns a list of all item bound to the master of the dock, not only the children of this particular dock widget.

get_placeholder_by_name(name)
Parameters:

name (str) – An item name

Returns:

A Gdl.DockPlaceholder object or None

Return type:

Gdl.DockPlaceholder

Looks for an Gdl.DockPlaceholder object bound to the master of the dock item. It does not search only in the children of this particular dock widget.

Deprecated since version 3.6: This function is always returning None.

get_root()
Returns:

A Gdl.DockObject or None.

Return type:

Gdl.DockObject or None

Get the first child of the Gdl.DockObject.

hide_preview()

Hide the preview window used to materialize the dock target.

new_from(floating)
Parameters:

floating (bool) – True to create a floating dock

Returns:

A new Gdl.Dock widget

Return type:

Gtk.Widget

Create a new dock widget having the same master than self.

set_skip_taskbar(skip)
Parameters:

skip (bool) – True if floating docks should be prevented from appearing in the taskbar

Sets whether or not a floating dock window should be prevented from appearing in the system taskbar.

New in version 3.6.

show_preview(rect)
Parameters:

rect (Gdk.Rectangle) – The position and the size of the preview window

Show a preview window used to materialize the dock target.

xor_rect(rect)
Parameters:

rect (Gdk.Rectangle) – The position and the size of the preview window

Show a preview window used to materialize the dock target.

Deprecated since version 3.6: Use Gdl.Dock.show_preview instead.

xor_rect_hide()

Hide the preview window used to materialize the dock target.

Deprecated since version 3.6: Use Gdl.Dock.hide_preview instead.

do_layout_changed() virtual

Signal Details

Gdl.Dock.signals.layout_changed(dock)
Signal Name:

layout-changed

Flags:

RUN_LAST

Parameters:

dock (Gdl.Dock) – The object which received the signal

Signals that the layout has changed, one or more widgets have been moved, added or removed.

Property Details

Gdl.Dock.props.default_title
Name:

default-title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Default title for the newly created floating docks

Gdl.Dock.props.floating
Name:

floating

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether the dock is floating in its own window

Gdl.Dock.props.floatx
Name:

floatx

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT

X coordinate for a floating dock

Gdl.Dock.props.floaty
Name:

floaty

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT

Y coordinate for a floating dock

Gdl.Dock.props.height
Name:

height

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, CONSTRUCT

Height for the dock when it’s of floating type

Gdl.Dock.props.skip_taskbar
Name:

skip-taskbar

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether or not to prevent a floating dock window from appearing in the taskbar. Note that this only affects floating windows that are created after this flag is set; existing windows are not affected. Usually, this property is used when you create the dock.

New in version 3.6.

Gdl.Dock.props.width
Name:

width

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, CONSTRUCT

Width for the dock when it’s of floating type