Class: Gtk::StyleProperties

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

Instance Method Summary collapse

Instance Method Details

#clearnil

Clears all style information from props.

Returns:

  • (nil)

#get(state, array) ⇒ nil

Retrieves several style property values from props for a given state.

Parameters:

  • state (Gtk::StateFlags)

    state to retrieve the property values for

  • array (Array)

    property name /return value pairs, followed by nil

Returns:

  • (nil)

#get_property(property, state, value) ⇒ TrueClass

Gets a style property from props for the given state. When done with value, g_value_unset() needs to be called to free any allocated memory.

Parameters:

  • property (String)

    style property name

  • state (Gtk::StateFlags)

    state to retrieve the property value for

  • value (GObject::Value)

    return location for the style property value.

Returns:

  • (TrueClass)

    true if the property exists in props, false otherwise

#get_valist(state, args) ⇒ nil

Retrieves several style property values from props for a given state.

Parameters:

  • state (Gtk::StateFlags)

    state to retrieve the property values for

  • args (Gtk::va_list)

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

Returns:

  • (nil)

#lookup_color(name) ⇒ Gtk::SymbolicColor

Returns the symbolic color that is mapped to name.

Parameters:

  • name (String)

    color name to lookup

Returns:

  • (Gtk::SymbolicColor)

    The mapped color

#map_color(name, color) ⇒ nil

Maps color so it can be referenced by name. See gtk_style_properties_lookup_color()

Parameters:

  • name (String)

    color name

  • color (Gtk::SymbolicColor)

    Gtk::SymbolicColor to map name to

Returns:

  • (nil)

#merge(props_to_merge, replace) ⇒ nil

Merges into props all the style information contained in props_to_merge. If replace is true, the values will be overwritten, if it is false, the older values will prevail.

Parameters:

  • props_to_merge (Gtk::StyleProperties)

    a second Gtk::StyleProperties

  • replace (TrueClass)

    whether to replace values or not

Returns:

  • (nil)

#newGtk::StyleProperties

Returns a newly created Gtk::StyleProperties

Returns:

#set(state, array) ⇒ nil

Sets several style properties on props.

Parameters:

  • state (Gtk::StateFlags)

    state to set the values for

  • array (Array)

    property name/value pairs, followed by nil

Returns:

  • (nil)

#set_property(property, state, value) ⇒ nil

Sets a styling property in props.

Parameters:

  • property (String)

    styling property to set

  • state (Gtk::StateFlags)

    state to set the value for

  • value (GObject::Value)

    new value for the property

Returns:

  • (nil)

#set_valist(state, args) ⇒ nil

Sets several style properties on props.

Parameters:

  • state (Gtk::StateFlags)

    state to set the values for

  • args (Gtk::va_list)

    va_list of property name/value pairs, followed by nil

Returns:

  • (nil)

#unset_property(property, state) ⇒ nil

Unsets a style property in props.

Parameters:

  • property (String)

    property to unset

  • state (Gtk::StateFlags)

    state to unset

Returns:

  • (nil)