Gtk.CellAreaClass

Fields

Name

Type

Access

Description

activate

object

r

This is called when the layouting widget rendering the GtkCellArea activates the focus cell (see Gtk.CellArea.get_focus_cell()).

add

object

r

adds a GtkCellRenderer to the area.

apply_attributes

object

r

Apply the cell attributes to the cells. This is implemented as a signal and generally GtkCellArea subclasses don’t need to implement it since it is handled by the base class.

copy_context

object

r

Creates a new GtkCellAreaContext in the same state as the passed context with any cell alignment data and allocations intact.

create_context

object

r

Creates and returns a class specific GtkCellAreaContext to store cell alignment and allocation details for a said GtkCellArea class.

event

object

r

Handle an event in the area, this is generally used to activate a cell at the event location for button events but can also be used to generically pass events to ``GtkWidget``s drawn onto the area.

focus

object

r

This virtual method should be implemented to navigate focus from cell to cell inside the GtkCellArea. The GtkCellArea should move focus from cell to cell inside the area and return False if focus logically leaves the area with the following exceptions: When the area contains no activatable cells, the entire area receives focus. Focus should not be given to cells that are actually “focus siblings” of other sibling cells (see Gtk.CellArea.get_focus_from_sibling()). Focus is set by calling Gtk.CellArea.set_focus_cell().

foreach

object

r

calls the GtkCellCallback function on every GtkCellRenderer in the area with the provided user data until the callback returns True.

foreach_alloc

object

r

Calls the GtkCellAllocCallback function on every GtkCellRenderer in the area with the allocated area for the cell and the provided user data until the callback returns True.

get_cell_property

object

r

This should be implemented to report the values of child cell properties for a given child GtkCellRenderer.

get_preferred_height

object

r

Calculates the minimum and natural height of the areas cells with the current attributes applied. Essentially this is the same as GtkCellAreaClass.get_preferred_width() only for areas that are being requested as Gtk.SizeRequestMode.WIDTH_FOR_HEIGHT.

get_preferred_height_for_width

object

r

Calculates the minimum and natural height for the area if the passed context would be allocated the given width. When implementing this virtual method it is safe to assume that context has already stored the aligned cell widths for every GtkTreeModel row that context will be allocated for since this information was stored at GtkCellAreaClass.get_preferred_width() time. This virtual method should also store any necessary alignments of cell heights for the case that the context is allocated a height.

get_preferred_width

object

r

Calculates the minimum and natural width of the areas cells with the current attributes applied while considering the particular layouting details of the said GtkCellArea. While requests are performed over a series of rows, alignments and overall minimum and natural sizes should be stored in the corresponding GtkCellAreaContext.

get_preferred_width_for_height

object

r

Calculates the minimum and natural width for the area if the passed context would be allocated the given height. The same as GtkCellAreaClass.get_preferred_height_for_width() only for handling requests in the Gtk.SizeRequestMode.WIDTH_FOR_HEIGHT mode.

get_request_mode

object

r

This allows an area to tell its layouting widget whether it prefers to be allocated in Gtk.SizeRequestMode.HEIGHT_FOR_WIDTH or Gtk.SizeRequestMode.WIDTH_FOR_HEIGHT mode.

is_activatable

object

r

Returns whether the GtkCellArea can respond to GtkCellAreaClass.activate(), usually this does not need to be implemented since the base class takes care of this however it can be enhanced if the GtkCellArea subclass can handle activation in other ways than activating its GtkCellRenderers.

padding

[object]

r

parent_class

GObject.InitiallyUnownedClass

r

remove

object

r

removes a GtkCellRenderer from the area.

set_cell_property

object

r

This should be implemented to handle changes in child cell properties for a given GtkCellRenderer that were previously installed on the GtkCellAreaClass with Gtk.CellAreaClass.install_cell_property().

snapshot

object

r

Actually snapshot the area’s cells to the specified rectangle, background_area should be correctly distributed to the cells corresponding background areas.

Methods

find_cell_property (property_name)

install_cell_property (property_id, pspec)

list_cell_properties ()

Details

class Gtk.CellAreaClass
find_cell_property(property_name)[source]
Parameters:

property_name (str) – the name of the child property to find

Returns:

the GParamSpec of the child property

Return type:

GObject.ParamSpec

Finds a cell property of a cell area class by name.

Deprecated since version 4.10.

install_cell_property(property_id, pspec)[source]
Parameters:
  • property_id (int) – the id for the property

  • pspec (GObject.ParamSpec) – the GParamSpec for the property

Installs a cell property on a cell area class.

Deprecated since version 4.10.

list_cell_properties()[source]
Returns:

a newly allocated None-terminated array of GParamSpec *. The array must be freed with GLib.free().

Return type:

[GObject.ParamSpec]

Returns all cell properties of a cell area class.

Deprecated since version 4.10.