Class: Gtk::CellRendererPixbuf

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

Overview

Renders a pixbuf in a cell

A GtkCellRendererPixbuf can be used to render an image in a cell. It allows to render either a given GdkPixbuf (set via the GtkCellRendererPixbuf:pixbuf property) or a named icon (set via the GtkCellRendererPixbuf:icon-name property).

To support the tree view, GtkCellRendererPixbuf also supports rendering two alternative pixbufs, when the GtkCellRenderer:is-expander property is true. If the GtkCellRenderer:is-expanded property is true and the GtkCellRendererPixbuf:pixbuf-expander-open property is set to a pixbuf, it renders that pixbuf, if the GtkCellRenderer:is-expanded property is false and the GtkCellRendererPixbuf:pixbuf-expander-closed property is set to a pixbuf, it renders that one.

Instance Method Summary collapse

Methods inherited from CellRenderer

#activate, #cell_background=, #cell_background_rgba, #cell_background_rgba=, #cell_background_set=, #cell_background_set?, #editing=, #editing?, #get_aligned_area, #get_alignment, #get_fixed_size, #get_padding, #get_preferred_height, #get_preferred_height_for_width, #get_preferred_size, #get_preferred_width, #get_preferred_width_for_height, #get_state, #height, #height=, #is_activatable, #is_expanded, #is_expanded=, #is_expanded?, #is_expander, #is_expander=, #is_expander?, #mode, #mode=, #request_mode, #sensitive, #sensitive=, #sensitive?, #set_alignment, #set_fixed_size, #set_padding, #snapshot, #start_editing, #stop_editing, #visible, #visible=, #visible?, #width, #width=, #xalign, #xalign=, #xpad, #xpad=, #yalign, #yalign=, #ypad, #ypad=

Constructor Details

#initializeGtk::CellRenderer

Creates a new GtkCellRendererPixbuf. Adjust rendering parameters using object properties. Object properties can be set globally (with g_object_set()). Also, with GtkTreeViewColumn, you can bind a property to a value in a GtkTreeModel. For example, you can bind the “pixbuf” property on the cell renderer to a pixbuf value in the model, thus rendering a different image in each row of the GtkTreeView.

Instance Method Details

#giconGio::Icon

The GIcon representing the icon to display. If the icon theme is changed, the image will be updated automatically.

Returns:

  • (Gio::Icon)

    gicon

#gicon=(gicon) ⇒ Gio::Icon

The GIcon representing the icon to display. If the icon theme is changed, the image will be updated automatically.

Parameters:

  • gicon (Gio::Icon)

Returns:

  • (Gio::Icon)

    gicon

  • (Gio::Icon)

    gicon

#icon_nameString

The name of the themed icon to display. This property only has an effect if not overridden by the "pixbuf" property.

Returns:

  • (String)

    icon-name

#icon_name=(icon_name) ⇒ String

The name of the themed icon to display. This property only has an effect if not overridden by the "pixbuf" property.

Parameters:

  • icon_name (String)

Returns:

  • (String)

    icon-name

  • (String)

    icon-name

#icon_sizeGtk::IconSize

The GtkIconSize value that specifies the size of the rendered icon.

Returns:

#icon_size=(icon_size) ⇒ Gtk::IconSize

The GtkIconSize value that specifies the size of the rendered icon.

Parameters:

Returns:

#pixbuf=(pixbuf) ⇒ GdkPixbuf::Pixbuf

Returns pixbuf.

Parameters:

  • pixbuf (GdkPixbuf::Pixbuf)

Returns:

  • (GdkPixbuf::Pixbuf)

    pixbuf

#pixbuf_expander_closedGdkPixbuf::Pixbuf

Returns pixbuf-expander-closed.

Returns:

  • (GdkPixbuf::Pixbuf)

    pixbuf-expander-closed

#pixbuf_expander_closed=(pixbuf_expander_closed) ⇒ GdkPixbuf::Pixbuf

Parameters:

  • pixbuf_expander_closed (GdkPixbuf::Pixbuf)

Returns:

  • (GdkPixbuf::Pixbuf)

    pixbuf-expander-closed

  • (GdkPixbuf::Pixbuf)

    pixbuf-expander-closed

#pixbuf_expander_openGdkPixbuf::Pixbuf

Returns pixbuf-expander-open.

Returns:

  • (GdkPixbuf::Pixbuf)

    pixbuf-expander-open

#pixbuf_expander_open=(pixbuf_expander_open) ⇒ GdkPixbuf::Pixbuf

Parameters:

  • pixbuf_expander_open (GdkPixbuf::Pixbuf)

Returns:

  • (GdkPixbuf::Pixbuf)

    pixbuf-expander-open

  • (GdkPixbuf::Pixbuf)

    pixbuf-expander-open

#textureGdk::Texture

Returns texture.

Returns:

#texture=(texture) ⇒ Gdk::Texture

Parameters:

Returns: