Plank.DockContainer – plank Reference Manual

# DockContainer

## Object Hierarchy:

## Description:

public abstract class DockContainer : DockElement

A container and controller class for managing dock elements on a dock.

All known sub-classes:

- ApplicationDockItemProvider
- DefaultApplicationDockItemProvider

- DockController

- DockItemProvider

Namespace: Plank
Package: plank

## Content:

### Properties:

- public ArrayList<DockElement> Elements { get; }
  The list of the all containing dock elements.
- public ArrayList<DockElement> VisibleElements { get; }
  The ordered list of the visible dock elements.

### Static methods:

- protected static void move_element (List<DockElement> elements, int from, int to, List<unowned DockElement>? moved = null)

### Creation methods:

- protected DockContainer ()
  Creates a new container for dock elements.

### Methods:

- public bool add (DockElement element, DockElement? target = null)
  Adds a dock-element to the collection.
- public bool add_all (ArrayList<DockElement> elements)
  Adds a ordered list of dock-elements to the collection.
- public bool clear ()
  Clears and therefore removes all dock-elements from the collection.
- protected abstract void connect_element (DockElement element)
- protected abstract void disconnect_element (DockElement element)
- public virtual bool move_to (DockElement move, DockElement target)
  Move an element to the position of another element. This shifts all elements which are placed between these two elements.
- public virtual void prepare ()
  Do some special implementation specific preparation
- public void prepend (DockElement element)
  Prepends a dock-element to the collection. So the dock-element will appear at the first position.
- public bool remove (DockElement element)
  Removes a dock-element from the collection.
- public bool remove_all (ArrayList<DockElement> elements)
  Removes all given dock-elements from the collection.
- public virtual bool replace (DockElement new_element, DockElement old_element)
  Replace an element with another element.
- public override void reset_buffers ()
  Reset internal buffers of all elements.
- protected virtual void update_visible_elements ()

### Signals:

- public signal void elements_changed (List<DockElement> added, List<DockElement> removed)
  Triggered when the collection of elements has changed.
- public signal void positions_changed (List<unowned DockElement> elements)
  Triggered anytime element-positions were changed.
- public signal void states_changed ()
  Triggered when the state of an element changes.

### Fields:

- protected ArrayList<DockElement> internal_elements
- protected static PlaceholderDockItem placeholder_item
- protected ArrayList<DockElement> visible_elements

### Inherited Members:

All known members inherited from class Plank.DockElement

- AddTime
- Button
- ClickedAnimation
- Container
- HoveredAnimation
- IsAttached
- IsVisible
- LastActive
- LastClicked
- LastHovered
- LastMove
- LastScrolled
- LastUrgent

- LastValid
- RemoveTime
- ScrolledAnimation
- Text
- accept_drop
- as_uri
- can_accept_drop
- can_be_removed
- clicked
- create_literal_menu_item
- create_literal_menu_item_with_pixbuf
- create_menu_item

- create_menu_item_with_pixbuf
- get_dock
- get_drop_text
- get_menu_items
- hovered
- needs_redraw
- on_clicked
- on_hovered
- on_scrolled
- reset_buffers
- scrolled
- unique_id

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