Plank.Items.DockItem – plank – Vala Binding Reference

Plank.Items.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
- FileDockItem

- PlaceholderDockItem
- PlankDockItem

- TransientDockItem

Namespace: Plank.Items
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 DockSurface get_surface (int width, int height, DockSurface model)
  Returns the dock surface for this item.
- public DockSurface? get_background_surface (int width, int height, DockSurface model, DrawDataFunc<DockItem>? draw_data_func)
  Returns the background surface for this item.
- public DockSurface? get_foreground_surface (int width, int height, DockSurface model, DrawDataFunc<DockItem>? draw_data_func)
  Returns the foreground surface for this item.
- public DockSurface get_surface_copy (int width, int height, DockSurface model)
  Returns a copy of the dock surface for this item.
- protected virtual void draw_icon (DockSurface surface)
  Draws the item's icon onto a surface.
- protected virtual void draw_icon_fast (DockSurface 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.Items.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
- 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
- newv
- new_valist
- get_type
- get_class
- @ref
- unref
- ref_sink
- weak_ref
- weak_unref
- add_weak_pointer
- remove_weak_pointer

- @get
- @set
- get_property
- set_property
- get_data
- set_data
- set_data_full
- steal_data
- get_qdata
- set_qdata
- set_qdata_full
- steal_qdata

- freeze_notify
- thaw_notify
- dispose
- constructed
- notify_property
- connect
- disconnect
- add_toggle_ref
- remove_toggle_ref
- bind_property
- notify
- ref_count