Gtk.CellRendererPixbuf

const Gtk = imports.gi.Gtk;

let cell_renderer_pixbuf = new Gtk.CellRendererPixbuf({
    follow_state: value,
    gicon: value,
    icon_name: value,
    pixbuf: value,
    pixbuf_expander_closed: value,
    pixbuf_expander_open: value,
    stock_detail: value,
    stock_id: value,
    stock_size: value,
});
  

A Gtk.CellRendererPixbuf can be used to render an image in a cell. It allows to render either a given GdkPixbuf.Pixbuf (set via the Gtk.pixbuf property) or a stock icon (set via the Gtk.stock-id property).

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

Hierarchy

  • GObject.Object
    • GObject.InitiallyUnowned
      • Gtk.CellRenderer
        • Gtk.CellRendererPixbuf