Dazzle.DockItem

g Dazzle.DockItem Dazzle.DockItem GObject.GInterface GObject.GInterface GObject.GInterface->Dazzle.DockItem

Implementations:
 Dazzle.DockBin, Dazzle.DockBinEdge, Dazzle.DockOverlay, Dazzle.DockOverlayEdge, Dazzle.DockPaned, Dazzle.DockStack, Dazzle.DockWidget, Dazzle.DockWindow

Methods

  adopt (child)
  close ()
  emit_presented ()
  get_can_close ()
  get_can_minimize ()
  get_child_visible (child)
  get_icon_name ()
  get_manager ()
  get_parent ()
  get_title ()
  has_widgets ()
  minimize (child, position)
  needs_attention ()
  present ()
  present_child (child)
  ref_gicon ()
  release (child)
  set_child_visible (child, child_visible)
  set_manager (manager)
  update_visibility ()

Virtual Methods

  do_can_minimize (descendant)
  do_close ()
  do_get_can_close ()
  do_get_child_visible (child)
  do_get_icon_name ()
  do_get_manager ()
  do_get_title ()
  do_manager_set (old_manager)
  do_minimize (child, position)
  do_needs_attention ()
  do_present_child (child)
  do_presented ()
  do_ref_gicon ()
  do_release (child)
  do_set_child_visible (child, child_visible)
  do_set_manager (manager)
  do_update_visibility ()

Properties

None

Signals

Name Short Description
manager-set  
needs-attention  
presented  

Fields

None

Class Details

class Dazzle.DockItem
Bases:GObject.GInterface
Structure:Dazzle.DockItemInterface
adopt(child)
Parameters:child (Dazzle.DockItem) –
Return type:bool
close()
Returns:True if the dock item was closed
Return type:bool

This function will request that the dock item close itself.

emit_presented()

Emits the Dazzle.DockItem ::presented signal.

Containers should emit this when their descendant has been presented as the current visible child. This allows dock items to do lazy initialization of content once the widgetry is visible to the user.

Currently, this is best effort, as there are a number of situations that make covering all cases problematic.

New in version 3.30.

get_can_close()
Returns:True if the dock item can be closed by the user, otherwise False.
Return type:bool

If this dock item can be closed by the user, this virtual function should be implemented by the panel and return True.

get_can_minimize()
Returns:True if the widget can be minimized.
Return type:bool
get_child_visible(child)
Parameters:child (Dazzle.DockItem) –
Return type:bool
get_icon_name()
Returns:A newly allocated string or None.
Return type:str or None

Gets the icon_name for the Dazzle.DockItem.

Generally, you want to use a Dazzle.DockWidget which has a “icon-name” property you can set. But this can be helpful for integration of various container widgets.

get_manager()
Returns:A #DzlDockmanager.
Return type:Dazzle.DockManager or None

Gets the dock manager for this dock item.

get_parent()
Returns:A Dazzle.DockItem or None.
Return type:Dazzle.DockItem or None

Gets the parent Dazzle.DockItem, or None.

get_title()
Returns:A newly allocated string or None.
Return type:str or None

Gets the title for the Dazzle.DockItem.

Generally, you want to use a Dazzle.DockWidget which has a “title” property you can set. But this can be helpful for integration of various container widgets.

has_widgets()
Return type:bool
minimize(child, position)
Parameters:
Returns:

True if child was minimized. Otherwise False and position may be updated to a suggested position.

position:A location for a Gtk.PositionType

Return type:

(bool, position: Gtk.PositionType)

This requests that self minimize child if it knows how.

If not, it should suggest the gravity for child if it knows how to determine that. For example, a Dazzle.DockBin might know if the widget was part of the right panel and therefore may set position to Gtk.PositionType.RIGHT.

needs_attention()

Emits the “needs-attention” signal.

New in version 3.34.

present()

This widget will walk the widget hierarchy to ensure that the dock item is visible to the user.

present_child(child)
Parameters:child (Dazzle.DockItem) –
ref_gicon()
Returns:a Gio.Icon or None
Return type:Gio.Icon or None

Gets a Gio.Icon for the dock item, if any has been set.

If an icon-name has been set, a new Gio.Icon for that icon-name may be returned.

New in version 3.34.

release(child)
Parameters:child (Dazzle.DockItem) –

This virtual method should remove child from self if the dock item knows how to do so. For example, the Dazzle.DockStack will remove child from it’s internal Gtk.Stack.

After the virtual function has been executed, child tracking will be removed so that Dazzle.DockItem implementations do not need to implement themselves.

set_child_visible(child, child_visible)
Parameters:
set_manager(manager)
Parameters:manager (Dazzle.DockManager or None) – A Dazzle.DockManager

Sets the dock manager for this Dazzle.DockItem.

update_visibility()
do_can_minimize(descendant) virtual
Parameters:descendant (Dazzle.DockItem) –
Returns:True if the widget can be minimized.
Return type:bool
do_close() virtual
Returns:True if the dock item was closed
Return type:bool

This function will request that the dock item close itself.

do_get_can_close() virtual
Returns:True if the dock item can be closed by the user, otherwise False.
Return type:bool

If this dock item can be closed by the user, this virtual function should be implemented by the panel and return True.

do_get_child_visible(child) virtual
Parameters:child (Dazzle.DockItem) –
Return type:bool
do_get_icon_name() virtual
Returns:A newly allocated string or None.
Return type:str or None

Gets the icon_name for the Dazzle.DockItem.

Generally, you want to use a Dazzle.DockWidget which has a “icon-name” property you can set. But this can be helpful for integration of various container widgets.

do_get_manager() virtual
Returns:A #DzlDockmanager.
Return type:Dazzle.DockManager or None

Gets the dock manager for this dock item.

do_get_title() virtual
Returns:A newly allocated string or None.
Return type:str or None

Gets the title for the Dazzle.DockItem.

Generally, you want to use a Dazzle.DockWidget which has a “title” property you can set. But this can be helpful for integration of various container widgets.

do_manager_set(old_manager) virtual
Parameters:old_manager (Dazzle.DockManager) –
do_minimize(child, position) virtual
Parameters:
Returns:

True if child was minimized. Otherwise False and position may be updated to a suggested position.

position:A location for a Gtk.PositionType

Return type:

(bool, position: Gtk.PositionType)

This requests that self minimize child if it knows how.

If not, it should suggest the gravity for child if it knows how to determine that. For example, a Dazzle.DockBin might know if the widget was part of the right panel and therefore may set position to Gtk.PositionType.RIGHT.

do_needs_attention() virtual

Emits the “needs-attention” signal.

New in version 3.34.

do_present_child(child) virtual
Parameters:child (Dazzle.DockItem) –
do_presented() virtual
do_ref_gicon() virtual
Returns:a Gio.Icon or None
Return type:Gio.Icon or None

Gets a Gio.Icon for the dock item, if any has been set.

If an icon-name has been set, a new Gio.Icon for that icon-name may be returned.

New in version 3.34.

do_release(child) virtual
Parameters:child (Dazzle.DockItem) –

This virtual method should remove child from self if the dock item knows how to do so. For example, the Dazzle.DockStack will remove child from it’s internal Gtk.Stack.

After the virtual function has been executed, child tracking will be removed so that Dazzle.DockItem implementations do not need to implement themselves.

do_set_child_visible(child, child_visible) virtual
Parameters:
do_set_manager(manager) virtual
Parameters:manager (Dazzle.DockManager or None) – A Dazzle.DockManager

Sets the dock manager for this Dazzle.DockItem.

do_update_visibility() virtual

Signal Details

Dazzle.DockItem.signals.manager_set(dock_item, object)
Signal Name:

manager-set

Flags:

RUN_LAST

Parameters:
Dazzle.DockItem.signals.needs_attention(dock_item)
Signal Name:needs-attention
Flags:RUN_LAST
Parameters:dock_item (Dazzle.DockItem) – The object which received the signal
Dazzle.DockItem.signals.presented(dock_item)
Signal Name:presented
Flags:RUN_LAST
Parameters:dock_item (Dazzle.DockItem) – The object which received the signal