Class: Gtk::CellRendererPixbuf
- Inherits:
-
CellRenderer
- Object
- GObject::InitiallyUnowned
- CellRenderer
- Gtk::CellRendererPixbuf
- 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
-
#gicon ⇒ Gio::Icon
The GIcon representing the icon to display.
-
#gicon=(gicon) ⇒ Gio::Icon
The GIcon representing the icon to display.
-
#icon_name ⇒ String
The name of the themed icon to display.
-
#icon_name=(icon_name) ⇒ String
The name of the themed icon to display.
-
#icon_size ⇒ Gtk::IconSize
The
GtkIconSizevalue that specifies the size of the rendered icon. -
#icon_size=(icon_size) ⇒ Gtk::IconSize
The
GtkIconSizevalue that specifies the size of the rendered icon. -
#initialize ⇒ Gtk::CellRenderer
constructor
Creates a new
GtkCellRendererPixbuf. -
#pixbuf=(pixbuf) ⇒ GdkPixbuf::Pixbuf
Pixbuf.
-
#pixbuf_expander_closed ⇒ GdkPixbuf::Pixbuf
Pixbuf-expander-closed.
- #pixbuf_expander_closed=(pixbuf_expander_closed) ⇒ GdkPixbuf::Pixbuf
-
#pixbuf_expander_open ⇒ GdkPixbuf::Pixbuf
Pixbuf-expander-open.
- #pixbuf_expander_open=(pixbuf_expander_open) ⇒ GdkPixbuf::Pixbuf
-
#texture ⇒ Gdk::Texture
Texture.
- #texture=(texture) ⇒ Gdk::Texture
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
#initialize ⇒ Gtk::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
#gicon ⇒ Gio::Icon
The GIcon representing the icon to display. If the icon theme is changed, the image will be updated automatically.
#gicon=(gicon) ⇒ Gio::Icon
The GIcon representing the icon to display. If the icon theme is changed, the image will be updated automatically.
#icon_name ⇒ String
The name of the themed icon to display. This property only has an effect if not overridden by the "pixbuf" property.
#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.
#icon_size ⇒ Gtk::IconSize
The GtkIconSize value that specifies the size of the rendered icon.
#icon_size=(icon_size) ⇒ Gtk::IconSize
The GtkIconSize value that specifies the size of the rendered icon.
#pixbuf=(pixbuf) ⇒ GdkPixbuf::Pixbuf
Returns pixbuf.
#pixbuf_expander_closed ⇒ GdkPixbuf::Pixbuf
Returns pixbuf-expander-closed.
#pixbuf_expander_closed=(pixbuf_expander_closed) ⇒ GdkPixbuf::Pixbuf
#pixbuf_expander_open ⇒ GdkPixbuf::Pixbuf
Returns pixbuf-expander-open.
#pixbuf_expander_open=(pixbuf_expander_open) ⇒ GdkPixbuf::Pixbuf
#texture ⇒ Gdk::Texture
Returns texture.