Gtk.CellAreaClass

Fields

Name

Type

Access

Description

activate

object

r

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

add

object

r

adds a Gtk.CellRenderer to the area.

apply_attributes

object

r

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

copy_context

object

r

Creates a new Gtk.CellAreaContext 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 Gtk.CellAreaContext to store cell alignment and allocation details for a said Gtk.CellArea 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 Gtk.Widgets drawn onto the area.

focus

object

r

This virtual method should be implemented to navigate focus from cell to cell inside the Gtk.CellArea. The Gtk.CellArea 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 recieves 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 Gtk.CellCallback function on every Gtk.CellRenderer in the area with the provided user data until the callback returns True.

foreach_alloc

object

r

Calls the Gtk.CellAllocCallback function on every Gtk.CellRenderer 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 Gtk.CellRenderer.

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 Gtk.CellArea.do_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 Gtk.TreeModel row that context will be allocated for since this information was stored at Gtk.CellArea.do_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 Gtk.CellArea. While requests are performed over a series of rows, alignments and overall minimum and natural sizes should be stored in the corresponding Gtk.CellAreaContext.

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 Gtk.CellArea.do_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 Gtk.CellArea can respond to Gtk.CellArea.do_activate(), usually this does not need to be implemented since the base class takes care of this however it can be enhanced if the Gtk.CellArea subclass can handle activation in other ways than activating its Gtk.CellRenderers.

parent_class

GObject.InitiallyUnownedClass

r

remove

object

r

removes a Gtk.CellRenderer from the area.

render

object

r

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

set_cell_property

object

r

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

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 GObject.ParamSpec of the child property or None if self has no child property with that name.

Return type:

GObject.ParamSpec

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

New in version 3.0.

install_cell_property(property_id, pspec)[source]
Parameters:

Installs a cell property on a cell area class.

New in version 3.0.

list_cell_properties()[source]
Returns:

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

Return type:

[GObject.ParamSpec]

Returns all cell properties of a cell area class.

New in version 3.0.