Gdl.DockObject¶
- Subclasses:
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 |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/c |
Human readable name for the dock object |
||
r/w/c |
Dock master this dock object is bound to |
||
r/w |
Pixbuf icon for the dock object |
||
r/w/c |
Stock icon for the dock object |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Signals that the |
|
Signals that the |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
container |
r |
||
deprecated_flags |
r |
||
deprecated_master |
r |
Class Details¶
- class Gdl.DockObject(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- 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:
Finds the nickname for a given type
- classmethod set_is_compound(is_compound)¶
-
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 typetype (
GObject.GType
) – The object type
- Returns:
If the nick was previously assigned, the old type is returned. Otherwise,
GObject.TYPE_NONE
.- Return type:
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:
Finds the object type assigned to a given nickname.
- bind(master)¶
- Parameters:
master (
GObject.Object
) – AGdl.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:
child (
Gdl.DockObject
) – the child of the self we want the placement forplacement (
Gdl.DockPlacement
orNone
) – where to return the placement information
- Returns:
True
if child is a child of self.- Return type:
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 toGdl.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)¶
-
Dissociate a dock object from its parent, including or not its children.
- dock(requestor, position, other_data)¶
- Parameters:
requestor (
Gdl.DockObject
) – The widget to dockposition (
Gdl.DockPlacement
) – The position for the childother_data (
GObject.Value
orNone
) – Optional data giving additional information depending on the dock object.
Dock a dock widget in self at the defined position.
- dock_request(x, y, request)¶
- Parameters:
x (
int
) – X coordinatey (
int
) – Y coordinaterequest (
Gdl.DockRequest
) – AGdl.DockRequest
with information about the docking position
- Returns:
True
if self has been docked.- Return type:
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:
Retrieves the controller of the object.
New in version 3.6.
- get_long_name()¶
- Returns:
the name of the object.
- Return type:
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:
Retrieves the master of the object.
New in version 3.6.
- get_name()¶
- Returns:
the name of the object.
- Return type:
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
orNone
if such object does not exist.- Return type:
Returns a parent
Gdl.DockObject
if it exists.
- get_pixbuf()¶
- Returns:
icon for dock object
- Return type:
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:
Retrieves the a stock id used as the object icon.
New in version 3.6.
- is_automatic()¶
-
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()¶
-
Check if the object is bound to a master.
- is_closed()¶
-
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()¶
-
Check if an object is a compound object, accepting children widget or not.
- is_frozen()¶
-
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
orNone
) – The child widget to present orNone
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:
child (
Gdl.DockObject
) – The child widget to reordernew_position (
Gdl.DockPlacement
) – New position for the childother_data (
GObject.Value
orNone
) – Optional data giving additional information depending on the dock object.
- Returns:
True
if child has been moved- Return type:
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
orNone
) – a icon orNone
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:
child (
Gdl.DockObject
) – the child of the object we want the placement forplacement (
Gdl.DockPlacement
orNone
) – where to return the placement information
- Returns:
True
if child is a child of object.- Return type:
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 toGdl.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¶
-
Dissociate a dock object from its parent, including or not its children.
- do_dock(requestor, position, other_data) virtual¶
- Parameters:
requestor (
Gdl.DockObject
) – The widget to dockposition (
Gdl.DockPlacement
) – The position for the childother_data (
GObject.Value
orNone
) – Optional data giving additional information depending on the dock object.
Dock a dock widget in object at the defined position.
- do_dock_request(x, y, request) virtual¶
- Parameters:
x (
int
) – X coordinatey (
int
) – Y coordinaterequest (
Gdl.DockRequest
) – AGdl.DockRequest
with information about the docking position
- Returns:
True
if object has been docked.- Return type:
Dock a dock widget in object at the defined position.
- do_present(child) virtual¶
- Parameters:
child (
Gdl.DockObject
orNone
) – The child widget to present orNone
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:
child (
Gdl.DockObject
) – The child widget to reordernew_position (
Gdl.DockPlacement
) – New position for the childother_data (
GObject.Value
orNone
) – Optional data giving additional information depending on the dock object.
- Returns:
True
if child has been moved- Return type:
Move the child widget at another place.
Signal Details¶
- Gdl.DockObject.signals.detach(dock_object, recursive)¶
- Signal Name:
detach
- Flags:
- Parameters:
dock_object (
Gdl.DockObject
) – The object which received the signalrecursive (
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:
- Parameters:
dock_object (
Gdl.DockObject
) – The object which received the signalrequestor (
Gdl.DockObject
) – The widget to dockposition (
Gdl.DockPlacement
) – The position for the childother_data (
GObject.Value
orNone
) – Optional data giving additional information
Signals that the
Gdl.DockObject
has been docked.
Property Details¶
- Gdl.DockObject.props.long_name¶
-
A long descriptive name.
- Gdl.DockObject.props.master¶
- Name:
master
- Type:
- Default Value:
- Flags:
The master which manages all the objects in a dock ring
- Gdl.DockObject.props.pixbuf_icon¶
-
A
GdkPixbuf.Pixbuf
to use for the icon of the dock object.New in version 3.3.2.