Gdl.DockObject

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.DockObject Gdl.DockObject Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gdl.DockObject Gtk.Widget->Gtk.Container

Subclasses:

Gdl.Dock, Gdl.DockItem, Gdl.DockPlaceholder

Methods

Inherited:

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

nick_from_type (type)

class

set_is_compound (is_compound)

class

set_type_for_nick (nick, type)

class

type_from_nick (nick)

bind (master)

child_placement (child, placement)

detach (recursive)

dock (requestor, position, other_data)

dock_request (x, y, request)

freeze ()

get_controller ()

get_long_name ()

get_master ()

get_name ()

get_parent_object ()

get_pixbuf ()

get_stock_id ()

get_toplevel ()

is_automatic ()

is_bound ()

is_closed ()

is_compound ()

is_frozen ()

layout_changed_notify ()

present (child)

reduce ()

reorder (child, new_position, other_data)

set_long_name (name)

set_manual ()

set_name (name)

set_pixbuf (icon)

set_stock_id (stock_id)

thaw ()

unbind ()

Virtual Methods

Inherited:

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

do_child_placement (child, placement)

do_detach (recursive)

do_dock (requestor, position, other_data)

do_dock_request (x, y, request)

do_present (child)

do_reduce ()

do_reorder (child, new_position, other_data)

Properties

Inherited:

Gtk.Container (3), Gtk.Widget (39)

Name

Type

Flags

Short Description

long-name

str

r/w/c

Human readable name for the dock object

master

Gdl.DockMaster

r/w/c

Dock master this dock object is bound to

pixbuf-icon

int

r/w

Pixbuf icon for the dock object

stock-id

str

r/w/c

Stock icon for the dock object

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

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

Name

Short Description

detach

Signals that the Gdl.DockObject is detached.

dock

Signals that the Gdl.DockObject has been docked.

Fields

Inherited:

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

Name

Type

Access

Description

container

Gtk.Container

r

deprecated_flags

Gdl.DockObjectFlags

r

deprecated_master

GObject.Object

r

Class Details

class Gdl.DockObject(**kwargs)
Bases:

Gtk.Container

Abstract:

No

Structure:

Gdl.DockObjectClass

classmethod nick_from_type(type)
Parameters:

type (GObject.GType) – The type for which to find the nickname

Returns:

If the object has a nickname, then it is returned. Otherwise, the type name.

Return type:

str

Finds the nickname for a given type

classmethod set_is_compound(is_compound)
Parameters:

is_compound (bool) – True is the dock object contains other objects

Define in the corresponding kind of dock object can contains children.

New in version 3.6.

classmethod set_type_for_nick(nick, type)
Parameters:
  • nick (str) – The nickname for the object type

  • type (GObject.GType) – The object type

Returns:

If the nick was previously assigned, the old type is returned. Otherwise, GObject.TYPE_NONE.

Return type:

GObject.GType

Assigns an object type to a given nickname. If the nickname already exists, then it reassigns it to a new object type.

classmethod type_from_nick(nick)
Parameters:

nick (str) – The nickname for the object type

Returns:

If the nickname has previously been assigned, then the corresponding object type is returned. Otherwise, GObject.TYPE_NONE.

Return type:

GObject.GType

Finds the object type assigned to a given nickname.

bind(master)
Parameters:

master (GObject.Object) – A Gdl.DockMaster

Add a link between a Gdl.DockObject and a master. It is normally not used directly because it is automatically called when a new object is docked.

child_placement(child, placement)
Parameters:
Returns:

True if child is a child of self.

Return type:

bool

This function returns information about placement of a child dock object inside another dock object. The function returns True if child is effectively a child of self. placement should normally be initially setup to Gdl.DockPlacement.NONE. If it’s set to some other value, this function will not touch the stored value if the specified placement is “compatible” with the actual placement of the child.

placement can be None, in which case the function simply tells if child is attached to self.

detach(recursive)
Parameters:

recursive (bool) – True to detach children

Dissociate a dock object from its parent, including or not its children.

dock(requestor, position, other_data)
Parameters:

Dock a dock widget in self at the defined position.

dock_request(x, y, request)
Parameters:
Returns:

True if self has been docked.

Return type:

bool

Dock a dock widget in self at the defined position.

freeze()

Temporarily freezes a dock object, any call to reduce on the object has no immediate effect. If Gdl.DockObject.freeze() has been called more than once, Gdl.DockObject.thaw() must be called an equal number of times.

get_controller()
Returns:

a Gdl.DockObject object

Return type:

Gdl.DockObject

Retrieves the controller of the object.

New in version 3.6.

get_long_name()
Returns:

the name of the object.

Return type:

str

Retrieves the long name of the object. This name is an human readable string which can be displayed in the user interface.

New in version 3.6.

get_master()
Returns:

a Gdl.DockMaster object

Return type:

GObject.Object

Retrieves the master of the object.

New in version 3.6.

get_name()
Returns:

the name of the object.

Return type:

str

Retrieves the name of the object. This name is used to identify the object.

New in version 3.6.

get_parent_object()
Returns:

a Gdl.DockObject or None if such object does not exist.

Return type:

Gdl.DockObject or None

Returns a parent Gdl.DockObject if it exists.

get_pixbuf()
Returns:

icon for dock object

Return type:

GdkPixbuf.Pixbuf

Retrieves a pixbuf used as the dock object icon.

New in version 3.6.

get_stock_id()
Returns:

A stock id corresponding to the object icon.

Return type:

str

Retrieves the a stock id used as the object icon.

New in version 3.6.

get_toplevel()
Returns:

A Gdl.Dock or None.

Return type:

Gdl.Dock or None

Get the top level Gdl.Dock widget of self or None if cannot be found.

is_automatic()
Returns:

True if the object is managed automatically by the dock master.

Return type:

bool

Determine if an object is managed by the dock master, such object is destroyed automatically when it is not needed anymore.

New in version 3.6.

is_bound()
Returns:

True if self has a master

Return type:

bool

Check if the object is bound to a master.

is_closed()
Returns:

True if the dock object is closed.

Return type:

bool

Checks whether a given Gdl.DockObject is closed. It can be only hidden and still in the widget hierarchy or detached.

New in version 3.6.

is_compound()
Returns:

True if self is a compound object.

Return type:

bool

Check if an object is a compound object, accepting children widget or not.

is_frozen()
Returns:

True if the object is frozen.

Return type:

bool

Determine if an object is frozen and is not removed immediately from the widget hierarchy when it is reduced.

New in version 3.6.

layout_changed_notify()

Emits the Gdl.DockMaster ::layout-changed signal on the master of the object if existing.

New in version 3.6.

present(child)
Parameters:

child (Gdl.DockObject or None) – The child widget to present or None

Presents the GDL object to the user. By example, this will select the corresponding page if the object is in a notebook. If child is missing, only the self will be show.

reduce()

Remove a compound object if it is not longer useful to hold the child. The object has to be removed and the child reattached to the parent.

reorder(child, new_position, other_data)
Parameters:
Returns:

True if child has been moved

Return type:

bool

Move the child widget at another place.

set_long_name(name)
Parameters:

name (str) – a name for the object

Set the long name of the object. This name is an human readable string which can be displayed in the user interface.

New in version 3.6.

set_manual()

A Gdl.DockObject is managed by default by the dock master, use this function to make it a manual object if you want to manage the destruction of the object.

New in version 3.6.

set_name(name)
Parameters:

name (str) – a name for the object

Set the name of the object used to identify it.

New in version 3.6.

set_pixbuf(icon)
Parameters:

icon (GdkPixbuf.Pixbuf or None) – a icon or None

Set a icon for a dock object using a GdkPixbuf.Pixbuf.

New in version 3.6.

set_stock_id(stock_id)
Parameters:

stock_id (str) – a stock id

Set an icon for the dock object using a stock id.

New in version 3.6.

thaw()

Thaws a dock object frozen with Gdl.DockObject.freeze(). Any pending reduce calls are made, maybe leading to the destruction of the object.

unbind()

This removes the link between an dock object and its master.

do_child_placement(child, placement) virtual
Parameters:
Returns:

True if child is a child of object.

Return type:

bool

This function returns information about placement of a child dock object inside another dock object. The function returns True if child is effectively a child of object. placement should normally be initially setup to Gdl.DockPlacement.NONE. If it’s set to some other value, this function will not touch the stored value if the specified placement is “compatible” with the actual placement of the child.

placement can be None, in which case the function simply tells if child is attached to object.

do_detach(recursive) virtual
Parameters:

recursive (bool) – True to detach children

Dissociate a dock object from its parent, including or not its children.

do_dock(requestor, position, other_data) virtual
Parameters:

Dock a dock widget in object at the defined position.

do_dock_request(x, y, request) virtual
Parameters:
Returns:

True if object has been docked.

Return type:

bool

Dock a dock widget in object at the defined position.

do_present(child) virtual
Parameters:

child (Gdl.DockObject or None) – The child widget to present or None

Presents the GDL object to the user. By example, this will select the corresponding page if the object is in a notebook. If child is missing, only the object will be show.

do_reduce() virtual

Remove a compound object if it is not longer useful to hold the child. The object has to be removed and the child reattached to the parent.

do_reorder(child, new_position, other_data) virtual
Parameters:
Returns:

True if child has been moved

Return type:

bool

Move the child widget at another place.

Signal Details

Gdl.DockObject.signals.detach(dock_object, recursive)
Signal Name:

detach

Flags:

RUN_LAST

Parameters:
  • dock_object (Gdl.DockObject) – The object which received the signal

  • recursive (bool) – True if children have to be detached too.

Signals that the Gdl.DockObject is detached.

Gdl.DockObject.signals.dock(dock_object, requestor, position, other_data)
Signal Name:

dock

Flags:

RUN_FIRST

Parameters:

Signals that the Gdl.DockObject has been docked.

Property Details

Gdl.DockObject.props.long_name
Name:

long-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

A long descriptive name.

Gdl.DockObject.props.master
Name:

master

Type:

Gdl.DockMaster

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The master which manages all the objects in a dock ring

Gdl.DockObject.props.pixbuf_icon
Name:

pixbuf-icon

Type:

int

Default Value:

None

Flags:

READABLE, WRITABLE

A GdkPixbuf.Pixbuf to use for the icon of the dock object.

New in version 3.3.2.

Gdl.DockObject.props.stock_id
Name:

stock-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

A stock id to use for the icon of the dock object.