Plank.DockItem – plank – Vala Binding Reference

Plank.DockItem – plank Reference Manual

# DockItem

## Object Hierarchy:

## Description:

public abstract class DockItem : DockElement

The base class for all dock items.

All known sub-classes:

- ApplicationDockItem
- DockletItem

- FileDockItem
- PlaceholderDockItem

- PlankDockItem
- TransientDockItem

Namespace: Plank
Package: plank

## Content:

### Properties:

- public string Icon { set; get; }
  The dock item's icon.
- protected Pixbuf? ForcePixbuf { public set; public get; }
- public int64 Count { set; get; }
  The count for the dock item.
- public bool CountVisible { set; get; }
  Show the item's count or not.
- public double Progress { set; get; }
  The progress for this dock item.
- public bool ProgressVisible { set; get; }
  Show the item's progress or not.
- public int Position { set; get; }
  The dock item's position on the dock.
- public int LastPosition { protected set; get; }
  The dock item's last position on the dock.
- public ItemState State { protected set; get; }
  The item's current state.
- public IndicatorState Indicator { protected set; get; }
  The indicator shown for the item.
- public Color AverageIconColor { protected set; get; }
  The average color of this item's icon.
- public string DockItemFilename { owned get; }
  The filename of the preferences backing file.
- public string Launcher { get; }
  The launcher associated with this item.
- public DockItemPreferences Prefs { construct; get; }
  The underlying preferences for this item.

### Creation methods:

- public DockItem ()
  Creates a new dock item.

### Methods:

- protected virtual void load_from_launcher ()
  Parses the associated launcher and e.g. sets the icon and text from it.
- public void @delete ()
  Deletes the underlying preferences file.
- protected void reset_icon_buffer ()
  Resets the buffer for this item's icon and requests a redraw.
- public override void reset_buffers ()
  Resets the buffers for this item's icon.
- public void unset_move_state ()
- public Surface get_surface (int width, int height, Surface model)
  Returns the surface for this item.
- public Surface? get_background_surface (int width, int height, Surface model, DrawDataFunc<DockItem>? draw_data_func)
  Returns the background surface for this item.
- public Surface? get_foreground_surface (int width, int height, Surface model, DrawDataFunc<DockItem>? draw_data_func)
  Returns the foreground surface for this item.
- public Surface get_surface_copy (int width, int height, Surface model)
  Returns a copy of the surface for this item.
- protected virtual void draw_icon (Surface surface)
  Draws the item's icon onto a surface.
- protected virtual void draw_icon_fast (Surface surface)
  Draws a placeholder icon onto a surface. This method should be considered time-critical! Make sure to only use simple drawing routines, and do not rely on external resources!
- public virtual bool is_valid ()
  Check the validity of this item.
- public void copy_values_to (DockItem target)
  Copy all property value of this dockitem instance to target instance.

### Signals:

- public signal void deleted ()
  Signal fired when the .dockitem for this item was deleted.

### Inherited Members:

All known members inherited from class Plank.DockElement

- Container
- Text
- IsAttached
- IsVisible
- Button
- ClickedAnimation
- HoveredAnimation
- ScrolledAnimation
- AddTime
- RemoveTime
- LastClicked
- LastHovered

- LastScrolled
- LastUrgent
- LastActive
- LastMove
- LastValid
- create_menu_item
- create_menu_item_with_pixbuf
- clicked
- on_clicked
- hovered
- on_hovered
- scrolled

- on_scrolled
- get_dock
- get_menu_items
- get_drop_text
- can_be_removed
- can_accept_drop
- accept_drop
- unique_id
- as_uri
- reset_buffers
- needs_redraw

All known members inherited from class GLib.Object

- @new
- new_valist
- newv
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- freeze_notify
- @get

- get_class
- get_data
- get_property
- get_qdata
- get_type
- notify_property
- @ref
- ref_sink
- replace_data
- replace_qdata
- remove_toggle_ref
- remove_weak_pointer
- @set

- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- steal_data
- steal_qdata
- thaw_notify
- unref
- weak_ref
- weak_unref
- notify
- ref_count