Class

GtkCellRendererPixbuf

Description [src]

class Gtk.CellRendererPixbuf : Gtk.CellRenderer {
  parent: GtkCellRenderer
}

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.

Hierarchy

hierarchy this GtkCellRendererPixbuf ancestor_0 GtkCellRenderer ancestor_0--this ancestor_1 GInitiallyUnowned ancestor_1--ancestor_0 ancestor_2 GObject ancestor_2--ancestor_1

Constructors

gtk_cell_renderer_pixbuf_new

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 methods

Methods inherited from GtkCellRenderer (24)
gtk_cell_renderer_activate

Passes an activate event to the cell renderer for possible processing. Some cell renderers may use events; for example, GtkCellRendererToggle toggles when it gets a mouse click.

gtk_cell_renderer_get_aligned_area

Gets the aligned area used by cell inside cell_area. Used for finding the appropriate edit and focus rectangle.

Available since: 3.0

gtk_cell_renderer_get_alignment

Fills in xalign and yalign with the appropriate values of cell.

Available since: 2.18

gtk_cell_renderer_get_fixed_size

Fills in width and height with the appropriate size of cell.

gtk_cell_renderer_get_padding

Fills in xpad and ypad with the appropriate values of cell.

Available since: 2.18

gtk_cell_renderer_get_preferred_height

Retreives a renderer’s natural size when rendered to widget.

Available since: 3.0

gtk_cell_renderer_get_preferred_height_for_width

Retreives a cell renderers’s minimum and natural height if it were rendered to widget with the specified width.

Available since: 3.0

gtk_cell_renderer_get_preferred_size

Retrieves the minimum and natural size of a cell taking into account the widget’s preference for height-for-width management.

Available since: 3.0

gtk_cell_renderer_get_preferred_width

Retreives a renderer’s natural size when rendered to widget.

Available since: 3.0

gtk_cell_renderer_get_preferred_width_for_height

Retreives a cell renderers’s minimum and natural width if it were rendered to widget with the specified height.

Available since: 3.0

gtk_cell_renderer_get_request_mode

Gets whether the cell renderer prefers a height-for-width layout or a width-for-height layout.

Available since: 3.0

gtk_cell_renderer_get_sensitive

Returns the cell renderer’s sensitivity.

Available since: 2.18

gtk_cell_renderer_get_size

Obtains the width and height needed to render the cell. Used by view widgets to determine the appropriate size for the cell_area passed to gtk_cell_renderer_render(). If cell_area is not NULL, fills in the x and y offsets (if set) of the cell relative to this location.

Deprecated since: 3.0

gtk_cell_renderer_get_state

Translates the cell renderer state to GtkStateFlags, based on the cell renderer and widget sensitivity, and the given GtkCellRendererState.

Available since: 3.0

gtk_cell_renderer_get_visible

Returns the cell renderer’s visibility.

Available since: 2.18

gtk_cell_renderer_is_activatable

Checks whether the cell renderer can do something when activated.

Available since: 3.0

gtk_cell_renderer_render

Invokes the virtual render function of the GtkCellRenderer. The three passed-in rectangles are areas in cr. Most renderers will draw within cell_area; the xalign, yalign, xpad, and ypad fields of the GtkCellRenderer should be honored with respect to cell_area. background_area includes the blank space around the cell, and also the area containing the tree expander; so the background_area rectangles for all cells tile to cover the entire window.

gtk_cell_renderer_set_alignment

Sets the renderer’s alignment within its available space.

Available since: 2.18

gtk_cell_renderer_set_fixed_size

Sets the renderer size to be explicit, independent of the properties set.

gtk_cell_renderer_set_padding

Sets the renderer’s padding.

Available since: 2.18

gtk_cell_renderer_set_sensitive

Sets the cell renderer’s sensitivity.

Available since: 2.18

gtk_cell_renderer_set_visible

Sets the cell renderer’s visibility.

Available since: 2.18

gtk_cell_renderer_start_editing

Starts editing the contents of this cell, through a new GtkCellEditable widget created by the GtkCellRendererClass.start_editing virtual function.

Methods inherited from GObject (42)

Properties

Gtk.CellRendererPixbuf:follow-state

Specifies whether the rendered pixbuf should be colorized according to the GtkCellRendererState.

Available since: 2.8

Deprecated since: 3.16

Gtk.CellRendererPixbuf:gicon

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

Available since: 2.14

Gtk.CellRendererPixbuf:icon-name

The name of the themed icon to display. This property only has an effect if not overridden by “stock_id” or “pixbuf” properties.

Available since: 2.8

Gtk.CellRendererPixbuf:pixbuf
No description available.
Gtk.CellRendererPixbuf:stock-detail
No description available.
Gtk.CellRendererPixbuf:stock-id
No description available.

Available since: 2.2

Deprecated since: 3.10

Gtk.CellRendererPixbuf:stock-size

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

Available since: 2.2

Gtk.CellRendererPixbuf:surface
No description available.

Available since: 3.10

Properties inherited from GtkCellRenderer (16)
Gtk.CellRenderer:cell-background
No description available.
Gtk.CellRenderer:cell-background-gdk

Cell background as a GdkColor.

Deprecated since: 3.4

Gtk.CellRenderer:cell-background-rgba

Cell background as a GdkRGBA.

Available since: 3.0

Gtk.CellRenderer:cell-background-set
No description available.
Gtk.CellRenderer:editing
No description available.
Gtk.CellRenderer:height
No description available.
Gtk.CellRenderer:is-expanded
No description available.
Gtk.CellRenderer:is-expander
No description available.
Gtk.CellRenderer:mode
No description available.
Gtk.CellRenderer:sensitive
No description available.
Gtk.CellRenderer:visible
No description available.
Gtk.CellRenderer:width
No description available.
Gtk.CellRenderer:xalign
No description available.
Gtk.CellRenderer:xpad
No description available.
Gtk.CellRenderer:yalign
No description available.
Gtk.CellRenderer:ypad
No description available.

Signals

Signals inherited from GtkCellRenderer (2)
Gtk.CellRenderer::editing-canceled

This signal gets emitted when the user cancels the process of editing a cell. For example, an editable cell renderer could be written to cancel editing when the user presses Escape.

Available since: 2.4

Gtk.CellRenderer::editing-started

This signal gets emitted when a cell starts to be edited. The intended use of this signal is to do special setup on editable, e.g. adding a GtkEntryCompletion or setting up additional columns in a GtkComboBox.

Available since: 2.6

Signals inherited from GObject (1)

Class structure

struct GtkCellRendererPixbufClass {
  GtkCellRendererClass parent_class;
  void (* _gtk_reserved1) (
void
  );
  void (* _gtk_reserved2) (
void
  );
  void (* _gtk_reserved3) (
void
  );
  void (* _gtk_reserved4) (
void
  );
  
}
Class members
parent_class
GtkCellRendererClass
  No description available.
_gtk_reserved1
void (* _gtk_reserved1) (
void
  )
  No description available.
_gtk_reserved2
void (* _gtk_reserved2) (
void
  )
  No description available.
_gtk_reserved3
void (* _gtk_reserved3) (
void
  )
  No description available.
_gtk_reserved4
void (* _gtk_reserved4) (
void
  )
  No description available.