Plank.DockElement – plank Reference Manual

# DockElement

## Object Hierarchy:

## Description:

public abstract class DockElement : Object

The base class for all dock elements.

All known sub-classes:

- ApplicationDockItem
- ApplicationDockItemProvider
- DefaultApplicationDockItemProvider
- DockContainer

- DockController
- DockItem
- DockItemProvider
- DockletItem

- FileDockItem
- PlaceholderDockItem
- PlankDockItem
- TransientDockItem

Namespace: Plank
Package: plank

## Content:

### Properties:

- public int64 AddTime { get; set; }
  The time the item was added to the dock.
- public PopupButton Button { get; protected set; }
  The buttons this item shows popup menus for.
- public AnimationType ClickedAnimation { get; protected set; }
  The animation to show for the item's last click event.
- public DockContainer? Container { get; set; }
  The dock element's container which it is added too (if any).
- public AnimationType HoveredAnimation { get; protected set; }
  The animation to show for the item's last hover event.
- public bool IsAttached { get; set; }
  Whether the item is currently hidden on the dock. If TRUE it will be drawn and does consume space. If FALSE it will not be drawn and does not consume space.
- public bool IsVisible { get; set; }
  Whether the item is currently visible on the dock. If TRUE it will be drawn and does consume space. If FALSE it will not be drawn and does consume space.
- public int64 LastActive { get; protected set; }
  The last time the item changed its active status.
- public int64 LastClicked { get; protected set; }
  The last time the item was clicked.
- public int64 LastHovered { get; protected set; }
  The last time the item was hovered.
- public int64 LastMove { get; protected set; }
  The last time the item changed its position.
- public int64 LastScrolled { get; protected set; }
  The last time the item was scrolled.
- public int64 LastUrgent { get; protected set; }
  The last time the item changed its urgent status.
- public int64 LastValid { get; protected set; }
  The last time the item was valid.
- public int64 RemoveTime { get; set; }
  The time the item was removed from the dock.
- public AnimationType ScrolledAnimation { get; protected set; }
  The animation to show for the item's last scroll event.
- public string Text { get; set; }
  The dock item's text.

### Static methods:

- protected static MenuItem create_literal_menu_item (string title, string? icon = null, bool force_show_icon = true)
  Creates a new menu item with mnemonics disabled.
- protected static MenuItem create_literal_menu_item_with_pixbuf (string title, owned Pixbuf pixbuf, bool force_show_icon = true)
  Creates a new menu item with mnemonics disabled.
- protected static MenuItem create_menu_item (string title, string? icon = null, bool force_show_icon = false)
  Creates a new menu item with mnemonics enabled.
- protected static MenuItem create_menu_item_with_pixbuf (string title, owned Pixbuf pixbuf, bool force_show_icon = false)
  Creates a new menu item with mnemonics enabled.

### Creation methods:

- protected DockElement ()

### Methods:

- public virtual bool accept_drop (ArrayList<string> uris)
  Accepts a drop of the given URIs.
- public string as_uri ()
  Returns a unique URI for this dock element.
- public virtual bool can_accept_drop (ArrayList<string> uris)
  Returns if the item accepts a drop of the given URIs.
- public virtual bool can_be_removed ()
  Returns if this item can be removed from the dock.
- public void clicked (PopupButton button, ModifierType mod, uint32 event_time)
  Called when an item is clicked on.
- public unowned DockController? get_dock ()
  Get the dock which this element is part of
- public virtual string get_drop_text ()
  The item's text for drop actions.
- public virtual ArrayList<MenuItem> get_menu_items ()
  Returns a list of the item's menu items.
- public void hovered ()
  Called when an item gets hovered.
- protected virtual AnimationType on_clicked (PopupButton button, ModifierType mod, uint32 event_time)
  Called when an item is clicked on.
- protected virtual AnimationType on_hovered ()
  Called when an item gets hovered.
- protected virtual AnimationType on_scrolled (ScrollDirection direction, ModifierType mod, uint32 event_time)
  Called when an item is scrolled over.
- public abstract void reset_buffers ()
  Resets the buffers for this element.
- public void scrolled (ScrollDirection direction, ModifierType mod, uint32 event_time)
  Called when an item is scrolled over.
- public virtual string unique_id ()
  Returns a unique ID for this dock item.

### Signals:

- public signal void needs_redraw ()
  Signal fired when the dock element needs redrawn.

### Inherited Members:

All known members inherited from class GLib.Object

- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data

- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer

- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref