Gtk.ColumnViewCell

g GObject.Object GObject.Object Gtk.ListItem Gtk.ListItem GObject.Object->Gtk.ListItem Gtk.ColumnViewCell Gtk.ColumnViewCell Gtk.ListItem->Gtk.ColumnViewCell

Subclasses:

None

Methods

Inherited:

Gtk.ListItem (15), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_child ()

get_focusable ()

get_item ()

get_position ()

get_selected ()

set_child (child)

set_focusable (focusable)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Gtk.ListItem (9)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gtk.ColumnViewCell(**kwargs)
Bases:

Gtk.ListItem

Abstract:

No

Structure:

Gtk.ColumnViewCellClass

GtkColumnViewCell is used by [class`Gtk`.ColumnViewColumn] to represent items in a cell in [class`Gtk`.ColumnView].

The ``GtkColumnViewCell``s are managed by the columnview widget (with its factory) and cannot be created by applications, but they need to be populated by application code. This is done by calling [method`Gtk`.ColumnViewCell.set_child].

``GtkColumnViewCell``s exist in 2 stages:

The unbound stage where the listitem is not currently connected to an item in the list. In that case, the [property`Gtk`.ColumnViewCell:item] property is set to None.

The bound stage where the listitem references an item from the list. The [property`Gtk`.ColumnViewCell:item] property is not None.

New in version 4.12.

get_child()[source]
Returns:

The child

Return type:

Gtk.Widget or None

Gets the child previously set via Gtk.ColumnViewCell.set_child() or None if none was set.

New in version 4.12.

get_focusable()[source]
Returns:

True if the item is focusable

Return type:

bool

Checks if a list item has been set to be focusable via Gtk.ColumnViewCell.set_focusable().

New in version 4.12.

get_item()[source]
Returns:

The item displayed

Return type:

GObject.Object or None

Gets the model item that associated with self.

If self is unbound, this function returns None.

New in version 4.12.

get_position()[source]
Returns:

The position of this item

Return type:

int

Gets the position in the model that self currently displays.

If self is unbound, Gtk.INVALID_LIST_POSITION is returned.

New in version 4.12.

get_selected()[source]
Returns:

True if the item is selected.

Return type:

bool

Checks if the item is displayed as selected.

The selected state is maintained by the liste widget and its model and cannot be set otherwise.

New in version 4.12.

set_child(child)[source]
Parameters:

child (Gtk.Widget or None) – The list item’s child or None to unset

Sets the child to be used for this listitem.

This function is typically called by applications when setting up a listitem so that the widget can be reused when binding it multiple times.

New in version 4.12.

set_focusable(focusable)[source]
Parameters:

focusable (bool) – if the item should be focusable

Sets self to be focusable.

If an item is focusable, it can be focused using the keyboard. This works similar to [method`Gtk`.Widget.set_focusable].

Note that if items are not focusable, the keyboard cannot be used to activate them and selecting only works if one of the listitem’s children is focusable.

By default, list items are focusable.

New in version 4.12.