Plank.PositionManager – plank Reference Manual

# PositionManager

## Object Hierarchy:

## Description:

public class PositionManager : Object

Handles computing any size/position information for the dock.

Namespace: Plank
Package: plank

## Content:

### Properties:

- public Align Alignment { get; }
  Cached alignment of the dock.
- public int BottomPadding { get; }
  Theme-based bottom padding, scaled by icon size.
- public int GlowSize { get; }
  Theme-based urgent glow size, scaled by icon size.
- public int HorizPadding { get; }
  Theme-based horizontal padding, scaled by icon size.
- public int IconShadowSize { get; }
  Theme-based icon-shadow size, scaled by icon size.
- public int IconSize { get; }
  Cached current icon size for the dock.
- public int IndicatorSize { get; }
  Theme-based indicator size, scaled by icon size.
- public int ItemPadding { get; }
  Theme-based item padding, scaled by icon size.
- public Align ItemsAlignment { get; }
  Cached alignment of the items.
- public int LaunchBounceHeight { get; }
  Theme-based launch-bounce height, scaled by icon size.
- public int LineWidth { get; }
  Theme-based line-width.
- public int MaxItemCount { get; }
  The maximum item count which fit the dock in its maximum size with the current theme and icon-size.
- public int Offset { get; }
  Cached offset of the dock.
- public PositionType Position { get; }
  Cached position of the dock.
- public int TopPadding { get; }
  Theme-based top padding, scaled by icon size.
- public int UrgentBounceHeight { get; }
  Theme-based urgent-bounce height, scaled by icon size.
- public int ZoomIconSize { get; }
  Cached current icon size for the dock.
- public DockController controller { construct; }
- public bool screen_is_composited { get; }

### Static methods:

- public static string[] get_monitor_plug_names (Screen screen)

### Creation methods:

- public PositionManager (DockController controller)
  Creates a new position manager.

### Methods:

- public void get_background_padding (out int x, out int y)
  Get's the padding between background and icons of the dock.
- public Rectangle get_background_region ()
  Get's the region for background of the dock.
- public Rectangle get_barrier ()
- public unowned DockItem? get_current_target_item (DockContainer? container = null)
  Get the item which is the appropriate target for a drag'n'drop action. The returned item may not hovered and is meant to be used as target for e.g. DockContainer.add/move_to functions. If a container is given the result will be restricted to its children.
- public Rectangle get_cursor_region ()
  Returns the cursor region for the dock. This is the region that the cursor can interact with the dock.
- public void get_dock_draw_position (out int x, out int y)
  Get's the x and y position to display the main dock buffer.
- public Rectangle get_dock_window_region ()
  Get's the region to display the dock window at.
- public DockItemDrawValue get_draw_value_for_item (DockItem item)
  The draw-value for a dock item.
- public void get_hover_position (DockItem hovered, out int x, out int y)
  Get's the x and y position to display a hover window for a dock item.
- public void get_hover_position_at (ref int x, ref int y)
  Get's the x and y position to display a hover window for the given coordinates.
- public Rectangle get_hover_region_for_element (DockElement element)
  The cursor region for interacting with a dock element.
- public Rectangle get_icon_geometry (ApplicationDockItem item, bool for_hidden)
  Get the item's icon geometry for the dock.
- public void get_menu_position (DockItem hovered, Requisition requisition, out int x, out int y)
  Get's the x and y position to display a menu for a dock item.
- public unowned DockItem? get_nearest_item_at (int x, int y, DockContainer? container = null)
  Get the item which is the nearest at the given coordinates. If a container is given the result will be restricted to its children.
- public Rectangle get_static_dock_region ()
  Returns the static dock region for the dock. This is the region that the dock occupies when not hidden.
- public void get_struts (ref ulong[] struts)
  Computes the struts for the dock.
- public void get_urgent_glow_position (DockItem item, out int x, out int y)
  Get's the x and y position to display the urgent-glow for a dock item.
- public void initialize ()
  Initializes the position manager.
- public bool is_horizontal_dock ()
  Return whether or not a dock is a horizontal dock.
- public void update (DockTheme theme)
  Updates all internal caches.
- public void update_dock_position ()
  Caches the x and y position of the dock window.
- public void update_draw_values (ArrayList<unowned DockItem> items, DrawValueFunc? func = null, DrawValuesFunc? post_func = null)
  Update and recalculated all internal draw-values using the given methodes for custom manipulations.
- public void update_regions ()
  Call when any cached region needs updating.

### 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