Basics
Guides
API Reference
Basics
Guides
API Reference
[21:7] extends: object
Stores geometrical information for a series of rows in a GtkCellArea The
GtkCellAreaContext object is created by a given GtkCellArea
implementation via its GtkCellAreaClass.create_context() virtual method and
is used to store cell sizes and alignments for a series of GtkTreeModel
rows that are requested and rendered in the same context. GtkCellLayout
widgets can create any number of contexts in which to request and render
groups of data rows. However, it’s important that the same context which was
used to request sizes for a given GtkTreeModel row also be used for the
same row when calling other GtkCellArea APIs such as gtk_cell_area_render()
and gtk_cell_area_event().
CellAreaContext (Handle = null)
Creates a new
CellAreaContextby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asObject ()
Wraps this handle as
Object.
A Object object.allocate (int width, int height)
Allocates a width and/or a height for all rows which are to be rendered with @context. Usually allocation is performed only horizontally or sometimes vertically since a group of rows are usually rendered side by side vertically or horizontally and share either the same width or the same height. Sometimes they are allocated in both horizontal and vertical orientations producing a homogeneous effect of the rows. This is generally the case for
GtkTreeViewwhenGtkTreeView:fixed-height-modeis enabled.
width is the allocated width for all GtkTreeModel rows rendered withor -1.height is the allocated height for all GtkTreeModel rows rendered with @context, or -1.None.get_area ()
Fetches the
GtkCellAreathis @context was created by. This is generally unneeded by layouting widgets; however, it is important for the context implementation itself to fetch information about the area it is being used for. For instance atGtkCellAreaContextClass.allocate()time it’s important to know details about any cell spacing that theGtkCellAreais configured with in order to compute a proper allocation.
push_preferred_height (int minimum_height, int natural_height)
Causes the minimum and/or natural height to grow if the new proposed sizes exceed the current minimum and natural height. This is used by
GtkCellAreaContextimplementations during the request process over a series ofGtkTreeModelrows to progressively push the requested height over a series of gtk_cell_area_get_preferred_height() requests.
minimum_height is the proposed new minimum height for @context.natural_height is the proposed new natural height for @context.None.push_preferred_width (int minimum_width, int natural_width)
Causes the minimum and/or natural width to grow if the new proposed sizes exceed the current minimum and natural width. This is used by
GtkCellAreaContextimplementations during the request process over a series ofGtkTreeModelrows to progressively push the requested width over a series of gtk_cell_area_get_preferred_width() requests.
minimum_width is the proposed new minimum width for @context.natural_width is the proposed new natural width for @context.None.reset ()
Resets any previously cached request and allocation data. When underlying
GtkTreeModeldata changes its important to reset the context if the content size is allowed to shrink. If the content size is only allowed to grow (this is usually an option for views rendering large data stores as a measure of optimization), then only the row that changed or was inserted needs to be (re)requested with gtk_cell_area_get_preferred_width(). When the new overall size of the context requires that the allocated size changes (or whenever this allocation changes at all), the variable row sizes need to be re-requested for every row. For instance, if the rows are displayed all with the same width from top to bottom then a change in the allocated width necessitates a recalculation of all the displayed row heights using gtk_cell_area_get_preferred_height_for_width().
None.[198:14] static extends: object
Generated metadata helpers for CellAreaContext class surfaces.
properties ()
Returns property metadata for
CellAreaContext.
A list.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.