gtk.style

Module for [Style] class

Types 3

A #GtkStyle object encapsulates the information that provides the look and feel for a widget.

In GTK+ 3.0, GtkStyle has been deprecated and replaced by

#GtkStyleContext.

Each #GtkWidget has an associated #GtkStyle object that is used when rendering that widget. Also, a #GtkStyle holds information for the five possible widget states though not every widget supports all five states; see #GtkStateType.

Usually the #GtkStyle for a widget is the same as the default style that is set by GTK+ and modified the theme engine.

Usually applications should not need to use or modify the #GtkStyle of their widgets.

Methods
GType _gType() @property
Style self()Returns `this`, for use in `with` statements.
StyleGidBuilder builder()Get builder for [gtk.style.Style] Returns: New builder object
void applyDefaultBackground(cairo.context.Context cr, gdk.window.Window window, gtk.types.StateType stateType, int x, int y, int width, int height)
gtk.style.Style copy()Creates a copy of the passed in #GtkStyle object. Returns: a copy of style
void detach()Detaches a style from a window. If the style is not attached to any windows anymore, it is unrealized. See [gtk.style.Style.attach].
void getStyleProperty(gobject.types.GType widgetType, string propertyName, out gobject.value.Value value)Queries the value of a style property corresponding to a widget class is in the given style.
bool hasContext()Returns whether style has an associated #GtkStyleContext. Returns: true if style has a #GtkStyleContext
bool lookupColor(string colorName, out gdk.color.Color color)Looks up color_name in the style’s logical color mappings, filling in color and returning true if found, otherwise returning false. Do not cache the found mapping, because it depends on the #GtkS...
gtk.icon_set.IconSet lookupIconSet(string stockId)Looks up stock_id in the icon factories associated with style and the default icon factory, returning an icon set if found, otherwise null.
gdkpixbuf.pixbuf.Pixbuf renderIcon(gtk.icon_source.IconSource source, gtk.types.TextDirection direction, gtk.types.StateType state, gtk.types.IconSize size, gtk.widget.Widget widget = null, string detail = null)Renders the icon specified by source at the given size according to the given parameters and returns the result in a pixbuf.
void setBackground(gdk.window.Window window, gtk.types.StateType stateType)Sets the background of window to the background color or pixmap specified by style for the given state.
gulong connectRealize(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.style.Style))) && Parameters!T.length < 2)Connect to `Realize` signal.
gulong connectUnrealize(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.style.Style))) && Parameters!T.length < 2)Connect to `Unrealize` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new #GtkStyle. Returns: a new #GtkStyle.

Fluent builder for [gtk.style.Style]

Methods
Style build()