pub trait CellAreaContextImpl: CellAreaContextImplExt + ObjectImpl {
    // Provided methods
    fn reset(&self) { ... }
    fn preferred_height_for_width(&self, width: i32) -> (i32, i32) { ... }
    fn preferred_width_for_height(&self, height: i32) -> (i32, i32) { ... }
    fn allocate(&self, width: i32, height: i32) { ... }
}
👎Deprecated: Since 4.10

Provided Methods§

source

fn reset(&self)

👎Deprecated: Since 4.10

Resets any previously cached request and allocation data.

When underlying TreeModel data 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().

§Deprecated since 4.10

This object will be removed in GTK 5

source

fn preferred_height_for_width(&self, width: i32) -> (i32, i32)

👎Deprecated: Since 4.10

Gets the accumulative preferred height for @width for all rows which have been requested for the same said @width with this context.

After gtk_cell_area_context_reset() is called and/or before ever requesting the size of a CellArea, the returned values are -1.

§Deprecated since 4.10

This object will be removed in GTK 5

§width

a proposed width for allocation

§Returns
§minimum_height

location to store the minimum height

§natural_height

location to store the natural height

source

fn preferred_width_for_height(&self, height: i32) -> (i32, i32)

👎Deprecated: Since 4.10

Gets the accumulative preferred width for @height for all rows which have been requested for the same said @height with this context.

After gtk_cell_area_context_reset() is called and/or before ever requesting the size of a CellArea, the returned values are -1.

§Deprecated since 4.10

This object will be removed in GTK 5

§height

a proposed height for allocation

§Returns
§minimum_width

location to store the minimum width

§natural_width

location to store the natural width

source

fn allocate(&self, width: i32, height: i32)

👎Deprecated: Since 4.10

Allocates a width and/or a height for all rows which are to be rendered with @self.

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 TreeView when GtkTreeView:fixed-height-mode is enabled.

§Deprecated since 4.10

This object will be removed in GTK 5

§width

the allocated width for all TreeModel rows rendered with @self, or -1

§height

the allocated height for all TreeModel rows rendered with @self, or -1

Object Safety§

This trait is not object safe.

Implementors§