Gtk.StyleProperties¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_object |
r |
Class Details¶
- class Gtk.StyleProperties(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Gtk.StyleProperties
provides the storage for style information that is used byGtk.StyleContext
and otherGtk.StyleProvider
implementations.Before style properties can be stored in
Gtk.StyleProperties
, they must be registered with gtk_style_properties_register_property().Unless you are writing a
Gtk.StyleProvider
implementation, you are unlikely to use this API directly, as gtk_style_context_get() and its variants are the preferred way to access styling information from widget implementations and theming engine implementations should use the APIs provided byGtk.ThemingEngine
instead.Gtk.StyleProperties
has been deprecated in GTK 3.16. The CSS machinery does not use it anymore and all users of this object have been deprecated.- classmethod new()[source]¶
- Returns:
a new
Gtk.StyleProperties
- Return type:
Returns a newly created
Gtk.StyleProperties
Deprecated since version 3.16:
Gtk.StyleProperties
are deprecated.
- clear()[source]¶
Clears all style information from self.
Deprecated since version 3.16:
Gtk.StyleProperties
are deprecated.
- get_property(property, state)[source]¶
- Parameters:
property (
str
) – style property namestate (
Gtk.StateFlags
) – state to retrieve the property value for
- Returns:
True
if the property exists in self,False
otherwise- value:
return location for the style property value.
- Return type:
(
bool
, value:GObject.Value
)
Gets a style property from self for the given state. When done with value,
GObject.Value.unset
() needs to be called to free any allocated memory.New in version 3.0.
Deprecated since version 3.16:
Gtk.StyleProperties
are deprecated.
- lookup_color(name)[source]¶
- Parameters:
name (
str
) – color name to lookup- Returns:
The mapped color
- Return type:
Returns the symbolic color that is mapped to name.
New in version 3.0.
Deprecated since version 3.8:
Gtk.SymbolicColor
is deprecated.
- map_color(name, color)[source]¶
- Parameters:
name (
str
) – color namecolor (
Gtk.SymbolicColor
) –Gtk.SymbolicColor
to map name to
Maps color so it can be referenced by name. See
Gtk.StyleProperties.lookup_color
()New in version 3.0.
Deprecated since version 3.8:
Gtk.SymbolicColor
is deprecated.
- merge(props_to_merge, replace)[source]¶
- Parameters:
props_to_merge (
Gtk.StyleProperties
) – a secondGtk.StyleProperties
replace (
bool
) – whether to replace values or not
Merges into self all the style information contained in props_to_merge. If replace is
True
, the values will be overwritten, if it isFalse
, the older values will prevail.New in version 3.0.
Deprecated since version 3.16:
Gtk.StyleProperties
are deprecated.
- set_property(property, state, value)[source]¶
- Parameters:
property (
str
) – styling property to setstate (
Gtk.StateFlags
) – state to set the value forvalue (
GObject.Value
) – new value for the property
Sets a styling property in self.
New in version 3.0.
Deprecated since version 3.16:
Gtk.StyleProperties
are deprecated.
- unset_property(property, state)[source]¶
- Parameters:
property (
str
) – property to unsetstate (
Gtk.StateFlags
) – state to unset
Unsets a style property in self.
New in version 3.0.
Deprecated since version 3.16:
Gtk.StyleProperties
are deprecated.