Plank.Theme – plank – Vala Binding Reference

Plank.Theme – plank Reference Manual

# Theme

## Object Hierarchy:

## Description:

public abstract class Theme : Preferences

A themed renderer for windows.

All known sub-classes:

- DockTheme

Namespace: Plank
Package: plank

## Content:

### Constants:

- public const unowned string DEFAULT_NAME
- public const unowned string GTK_THEME_NAME

### Properties:

- public int TopRoundness { set; get; }
- public int BottomRoundness { set; get; }
- public int LineWidth { set; get; }
- public Color OuterStrokeColor { set; get; }
- public Color FillStartColor { set; get; }
- public Color FillEndColor { set; get; }
- public Color InnerStrokeColor { set; get; }

### Static methods:

- public static StyleContext create_style_context (Type widget_type, StyleContext? parent_style, CssProvider provider, string? object_name, string first_class, ...)
- public static void draw_rounded_rect (Context cr, double x, double y, double width, double height, double top_radius = 6.0, double bottom_radius = 6.0, double line_width = 1.0)
  Draws a rounded rectangle. If compositing is disabled, just draws a normal rectangle.
- public static void draw_rounded_line (Context cr, double x, double y, double width, double height, bool is_round_left, bool is_round_right, Pattern? stroke = null, Pattern? fill = null)
  Draws a rounded horizontal line.
- public static string[] get_theme_list ()
  Get a sorted array of all available theme-names
- public static File? get_theme_folder (string name)
  Try to get an already existing folder located in the themes folder while prefering the user's themes folder. If there is no folder found we fallback to the "Default" theme. If even that folder doesn't exist return NULL (and use built-in defaults)

### Creation methods:

- public Theme ()
- public Theme.with_name (string name)

### Methods:

- public weak StyleContext get_style_context ()
- protected override void reset_properties ()
  Resets all properties to their default values. Called from construct and before loading from the backing file.
- public void load (string type)
  Loads a theme for the renderer to use.
- public int get_top_offset ()
  Returns the top offset.
- public int get_bottom_offset ()
  Returns the bottom offset.
- public void draw_background (Surface surface)
  Draws a background onto the surface.
- protected void draw_inner_rect (Context cr, int width, int height)
  Similar to draw_rounded_rect, but moves in to avoid a containing rounded rect's lines.
- protected override void verify (string prop)
  This method will verify the value of a property. If the value is wrong, this method should replace it with a sanitized value.

### Inherited Members:

All known members inherited from class Plank.Preferences

- verify
- reset_properties
- init_from_file
- init_from_filename

- delay
- apply
- get_filename

- get_backing_file
- @delete
- deleted

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