Class: Gtk::ThemingEngine

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Overview

Base class for theming engines.

Instance Method Summary collapse

Instance Method Details

#directionGtk::TextDirection

Returns the widget direction used for rendering.

Returns:

#get(state, array) ⇒ nil

Retrieves several style property values that apply to the currently rendered element.

Parameters:

  • state (Gtk::StateFlags)

    state to retrieve values for

  • array (Array)

    property name /return value pairs, followed by nil

Returns:

  • (nil)

#get_background_color(state, color) ⇒ nil

Gets the background color for a given state.

Parameters:

  • state (Gtk::StateFlags)

    state to retrieve the color for

  • color (Gdk::RGBA)

    return value for the background color

Returns:

  • (nil)

#get_border(state, border) ⇒ nil

Gets the border for a given state as a Gtk::Border.

Parameters:

  • state (Gtk::StateFlags)

    state to retrieve the border for

  • border (Gtk::Border)

    return value for the border settings

Returns:

  • (nil)

#get_border_color(state, color) ⇒ nil

Gets the border color for a given state.

Parameters:

  • state (Gtk::StateFlags)

    state to retrieve the color for

  • color (Gdk::RGBA)

    return value for the border color

Returns:

  • (nil)

#get_color(state, color) ⇒ nil

Gets the foreground color for a given state.

Parameters:

  • state (Gtk::StateFlags)

    state to retrieve the color for

  • color (Gdk::RGBA)

    return value for the foreground color

Returns:

  • (nil)

#get_font(state) ⇒ Pango::FontDescription

Returns the font description for a given state.

Parameters:

Returns:

  • (Pango::FontDescription)

    the Pango::FontDescription for the given state. This object is owned by GTK+ and should not be freed.

#get_margin(state, margin) ⇒ nil

Gets the margin for a given state as a Gtk::Border.

Parameters:

  • state (Gtk::StateFlags)

    state to retrieve the border for

  • margin (Gtk::Border)

    return value for the margin settings

Returns:

  • (nil)

#get_padding(state, padding) ⇒ nil

Gets the padding for a given state as a Gtk::Border.

Parameters:

  • state (Gtk::StateFlags)

    state to retrieve the padding for

  • padding (Gtk::Border)

    return value for the padding settings

Returns:

  • (nil)

#get_property(property, state, value) ⇒ nil

Gets a property value as retrieved from the style settings that apply to the currently rendered element.

Parameters:

  • property (String)

    the property name

  • state (Gtk::StateFlags)

    state to retrieve the value for

  • value (GObject::Value)

    return location for the property value, you must free this memory using g_value_unset() once you are done with it.

Returns:

  • (nil)

#get_style(array) ⇒ nil

Retrieves several widget style properties from engine according to the currently rendered content’s style.

Parameters:

  • array (Array)

    property name /return value pairs, followed by nil

Returns:

  • (nil)

#get_style_property(property_name, value) ⇒ nil

Gets the value for a widget style property.

Parameters:

  • property_name (String)

    the name of the widget style property

  • value (GObject::Value)

    Return location for the property value, free with g_value_unset() after use.

Returns:

  • (nil)

#get_style_valist(args) ⇒ nil

Retrieves several widget style properties from engine according to the currently rendered content’s style.

Parameters:

  • args (Gtk::va_list)

    va_list of property name/return location pairs, followed by nil

Returns:

  • (nil)

#get_valist(state, args) ⇒ nil

Retrieves several style property values that apply to the currently rendered element.

Parameters:

  • state (Gtk::StateFlags)

    state to retrieve values for

  • args (Gtk::va_list)

    va_list of property name/return location pairs, followed by nil

Returns:

  • (nil)

#has_class(style_class) ⇒ TrueClass

Returns true if the currently rendered contents have defined the given class name.

Parameters:

  • style_class (String)

    class name to look up

Returns:

  • (TrueClass)

    true if engine has class_name defined

#has_region(style_region, flags) ⇒ TrueClass

Returns true if the currently rendered contents have the region defined. If flags_return is not nil, it is set to the flags affecting the region.

Parameters:

  • style_region (String)

    a region name

  • flags (Gtk::RegionFlags)

    return location for region flags

Returns:

  • (TrueClass)

    true if region is defined

#junction_sidesGtk::JunctionSides

Returns the widget direction used for rendering.

Returns:

#lookup_color(color_name, color) ⇒ TrueClass

Looks up and resolves a color name in the current style’s color map.

Parameters:

  • color_name (String)

    color name to lookup

  • color (Gdk::RGBA)

    Return location for the looked up color

Returns:

  • (TrueClass)

    true if color_name was found and resolved, false otherwise

#nameString

The theming engine name, this name will be used when registering custom properties, for a theming engine named “Clearlooks” registering a “glossy” custom property, it could be referenced in the CSS file as

|[ -Clearlooks-glossy: true; ]|

Returns:

  • (String)

    name

#name=(name) ⇒ String

The theming engine name, this name will be used when registering custom properties, for a theming engine named “Clearlooks” registering a “glossy” custom property, it could be referenced in the CSS file as

|[ -Clearlooks-glossy: true; ]|

Parameters:

  • name (String)

Returns:

  • (String)

    name

  • (String)

    name

#pathGtk::WidgetPath

Returns the widget path used for style matching.

Returns:

  • (Gtk::WidgetPath)

    A Gtk::WidgetPath

#screenGdk::Screen

Returns the Gdk::Screen to which engine currently rendering to.

Returns:

#stateGtk::StateFlags

returns the state used when rendering.

Returns:

#state_is_running(state, progress) ⇒ TrueClass

Returns true if there is a transition animation running for the current region (see gtk_style_context_push_animatable_region()).

If progress is not nil, the animation progress will be returned there, 0.0 means the state is closest to being false, while 1.0 means it’s closest to being true. This means transition animations will run from 0 to 1 when state is being set to true and from 1 to 0 when it’s being set to false.

Parameters:

  • state (Gtk::StateType)

    a widget state

  • progress (Float)

    return location for the transition progress

Returns:

  • (TrueClass)

    true if there is a running transition animation for state.