Class: Gtk::Style
- Inherits:
-
Object
- Object
- Gtk::Style
- Defined in:
- (unknown)
Instance Method Summary collapse
- #apply_default_background(cr, window, state_type, x, y, width, height) ⇒ nil
-
#attach(window) ⇒ Gtk::Style
Attaches a style to a window; this process allocates the colors and creates the GC’s for the style - it specializes it to a particular visual.
-
#context ⇒ Gtk::StyleContext
Context.
- #context=(context) ⇒ Gtk::StyleContext
-
#copy ⇒ Gtk::Style
Creates a copy of the passed in Gtk::Style object.
-
#detach ⇒ nil
Detaches a style from a window.
-
#get(widget_type, first_property_name, array) ⇒ nil
Gets the values of a multiple style properties for widget_type from style.
-
#get_style_property(widget_type, property_name, value) ⇒ nil
Queries the value of a style property corresponding to a widget class is in the given style.
-
#get_valist(widget_type, first_property_name, var_args) ⇒ nil
Non-vararg variant of gtk_style_get().
-
#has_context ⇒ TrueClass
Returns whether style has an associated Gtk::StyleContext.
-
#lookup_color(color_name, color) ⇒ TrueClass
Looks up color_name in the style’s logical color mappings, filling in color and returning true if found, otherwise returning false.
-
#lookup_icon_set(stock_id) ⇒ Gtk::IconSet
Looks up stock_id in the icon factories associated with style and the default icon factory, returning an icon set if found, otherwise nil.
-
#new ⇒ Gtk::Style
Creates a new Gtk::Style.
-
#render_icon(source, direction, state, size, widget, detail) ⇒ GdkPixbuf::Pixbuf
Renders the icon specified by source at the given size according to the given parameters and returns the result in a pixbuf.
-
#set_background(window, state_type) ⇒ nil
Sets the background of window to the background color or pixmap specified by style for the given state.
Instance Method Details
#apply_default_background(cr, window, state_type, x, y, width, height) ⇒ nil
#attach(window) ⇒ Gtk::Style
Attaches a style to a window; this process allocates the colors and creates the GC’s for the style - it specializes it to a particular visual. The process may involve the creation of a new style if the style has already been attached to a window with a different style and visual.
Since this function may return a new object, you have to use it in the following way: ‘style = gtk_style_attach (style, window)`
#context ⇒ Gtk::StyleContext
Returns context.
#context=(context) ⇒ Gtk::StyleContext
#copy ⇒ Gtk::Style
Creates a copy of the passed in Gtk::Style object.
#detach ⇒ nil
Detaches a style from a window. If the style is not attached to any windows anymore, it is unrealized. See gtk_style_attach().
#get(widget_type, first_property_name, array) ⇒ nil
Gets the values of a multiple style properties for widget_type from style.
#get_style_property(widget_type, property_name, value) ⇒ nil
Queries the value of a style property corresponding to a widget class is in the given style.
#get_valist(widget_type, first_property_name, var_args) ⇒ nil
Non-vararg variant of gtk_style_get(). Used primarily by language bindings.
#has_context ⇒ TrueClass
Returns whether style has an associated Gtk::StyleContext.
#lookup_color(color_name, color) ⇒ TrueClass
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 Gtk::Style and might change when a theme switch occurs.
#lookup_icon_set(stock_id) ⇒ Gtk::IconSet
Looks up stock_id in the icon factories associated with style and the default icon factory, returning an icon set if found, otherwise nil.
#new ⇒ Gtk::Style
Creates a new Gtk::Style.
#render_icon(source, direction, state, size, widget, detail) ⇒ GdkPixbuf::Pixbuf
Renders the icon specified by source at the given size according to the given parameters and returns the result in a pixbuf.
#set_background(window, state_type) ⇒ nil
Sets the background of window to the background color or pixmap specified by style for the given state.