Gtk.CellRendererPixbuf

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.CellRenderer Gtk.CellRenderer GObject.InitiallyUnowned->Gtk.CellRenderer GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.CellRendererPixbuf Gtk.CellRendererPixbuf Gtk.CellRenderer->Gtk.CellRendererPixbuf

Subclasses:

None

Methods

Inherited:

Gtk.CellRenderer (25), GObject.Object (37)

Structs:

Gtk.CellRendererClass (1), GObject.ObjectClass (5)

class

new ()

Virtual Methods

Inherited:

Gtk.CellRenderer (12), GObject.Object (7)

Properties

Inherited:

Gtk.CellRenderer (16)

Name

Type

Flags

Short Description

follow-state

bool

d/r/w

Whether the rendered pixbuf should be colorized according to the state deprecated

gicon

Gio.Icon

r/w

The Gio.Icon being displayed

icon-name

str

r/w

The name of the icon from the icon theme

pixbuf

GdkPixbuf.Pixbuf

r/w

The pixbuf to render

pixbuf-expander-closed

GdkPixbuf.Pixbuf

r/w

Pixbuf for closed expander

pixbuf-expander-open

GdkPixbuf.Pixbuf

r/w

Pixbuf for open expander

stock-detail

str

r/w

Render detail to pass to the theme engine

stock-id

str

d/r/w

The stock ID of the stock icon to render deprecated

stock-size

int

r/w

The Gtk.IconSize value that specifies the size of the rendered icon

surface

cairo.Surface

r/w

The surface to render

Signals

Inherited:

Gtk.CellRenderer (2), GObject.Object (1)

Fields

Inherited:

Gtk.CellRenderer (2), GObject.Object (1)

Name

Type

Access

Description

parent

Gtk.CellRenderer

r

Class Details

class Gtk.CellRendererPixbuf(**kwargs)
Bases:

Gtk.CellRenderer

Abstract:

No

Structure:

Gtk.CellRendererPixbufClass

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.CellRendererPixbuf :pixbuf property) or a named icon (set via the Gtk.CellRendererPixbuf :icon-name 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.CellRendererPixbuf :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.CellRendererPixbuf :pixbuf-expander-closed property is set to a pixbuf, it renders that one.

classmethod new()[source]
Returns:

the new cell renderer

Return type:

Gtk.CellRenderer

Creates a new Gtk.CellRendererPixbuf. Adjust rendering parameters using object properties. Object properties can be set globally (with g_object_set()). Also, with Gtk.TreeViewColumn, you can bind a property to a value in a Gtk.TreeModel. 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 Gtk.TreeView.

Property Details

Gtk.CellRendererPixbuf.props.follow_state
Name:

follow-state

Type:

bool

Default Value:

True

Flags:

DEPRECATED, READABLE, WRITABLE

Specifies whether the rendered pixbuf should be colorized according to the Gtk.CellRendererState.

New in version 2.8.

Deprecated since version 3.16: Cell renderers always follow state.

Gtk.CellRendererPixbuf.props.gicon
Name:

gicon

Type:

Gio.Icon

Default Value:

None

Flags:

READABLE, WRITABLE

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

New in version 2.14.

Gtk.CellRendererPixbuf.props.icon_name
Name:

icon-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

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

New in version 2.8.

Gtk.CellRendererPixbuf.props.pixbuf
Name:

pixbuf

Type:

GdkPixbuf.Pixbuf

Default Value:

None

Flags:

READABLE, WRITABLE

The pixbuf to render

Gtk.CellRendererPixbuf.props.pixbuf_expander_closed
Name:

pixbuf-expander-closed

Type:

GdkPixbuf.Pixbuf

Default Value:

None

Flags:

READABLE, WRITABLE

Pixbuf for closed expander

Gtk.CellRendererPixbuf.props.pixbuf_expander_open
Name:

pixbuf-expander-open

Type:

GdkPixbuf.Pixbuf

Default Value:

None

Flags:

READABLE, WRITABLE

Pixbuf for open expander

Gtk.CellRendererPixbuf.props.stock_detail
Name:

stock-detail

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Render detail to pass to the theme engine

Gtk.CellRendererPixbuf.props.stock_id
Name:

stock-id

Type:

str

Default Value:

None

Flags:

DEPRECATED, READABLE, WRITABLE

The stock ID of the stock icon to render

New in version 2.2.

Deprecated since version 3.10: Use Gtk.CellRendererPixbuf :icon-name instead.

Gtk.CellRendererPixbuf.props.stock_size
Name:

stock-size

Type:

int

Default Value:

1

Flags:

READABLE, WRITABLE

The Gtk.IconSize value that specifies the size of the rendered icon.

New in version 2.2.

Gtk.CellRendererPixbuf.props.surface
Name:

surface

Type:

cairo.Surface

Default Value:

None

Flags:

READABLE, WRITABLE

The surface to render

New in version 3.10.