### Class

# GtkCellAreaContext

deprecated: 4.10

#### Description [src]

    class Gtk.CellAreaContext : GObject.Object
    {
      /* No available fields */
    }

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().

Deprecated since: 4.10

This object will be removed in GTK 5

#### Hierarchy

#### Ancestors

- GObject

#### Instance methods

###### gtk_cell_area_context_allocate

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

deprecated: 4.10

###### gtk_cell_area_context_get_allocation

Fetches the current allocation size for `context`.

deprecated: 4.10

###### gtk_cell_area_context_get_area

Fetches the `GtkCellArea` this `context` was created by.

deprecated: 4.10

###### gtk_cell_area_context_get_preferred_height

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

deprecated: 4.10

###### gtk_cell_area_context_get_preferred_height_for_width

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

deprecated: 4.10

###### gtk_cell_area_context_get_preferred_width

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

deprecated: 4.10

###### gtk_cell_area_context_get_preferred_width_for_height

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

deprecated: 4.10

###### gtk_cell_area_context_push_preferred_height

Causes the minimum and/or natural height to grow if the new proposed sizes exceed the current minimum and natural height.

deprecated: 4.10

###### gtk_cell_area_context_push_preferred_width

Causes the minimum and/or natural width to grow if the new proposed sizes exceed the current minimum and natural width.

deprecated: 4.10

###### gtk_cell_area_context_reset

Resets any previously cached request and allocation data.

deprecated: 4.10

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Gtk.CellAreaContext:area

The `GtkCellArea` this context was created by.

deprecated: 4.10

###### Gtk.CellAreaContext:minimum-height

The minimum height for the `GtkCellArea` in this context for all `GtkTreeModel` rows that this context was requested for using gtk_cell_area_get_preferred_height().

deprecated: 4.10

###### Gtk.CellAreaContext:minimum-width

The minimum width for the `GtkCellArea` in this context for all `GtkTreeModel` rows that this context was requested for using gtk_cell_area_get_preferred_width().

deprecated: 4.10

###### Gtk.CellAreaContext:natural-height

The natural height for the `GtkCellArea` in this context for all `GtkTreeModel` rows that this context was requested for using gtk_cell_area_get_preferred_height().

deprecated: 4.10

###### Gtk.CellAreaContext:natural-width

The natural width for the `GtkCellArea` in this context for all `GtkTreeModel` rows that this context was requested for using gtk_cell_area_get_preferred_width().

deprecated: 4.10

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GtkCellAreaContextClass {
      void (* allocate) (
        GtkCellAreaContext* context,
        int width,
        int height
      );
      void (* reset) (
        GtkCellAreaContext* context
      );
      void (* get_preferred_height_for_width) (
        GtkCellAreaContext* context,
        int width,
        int* minimum_height,
        int* natural_height
      );
      void (* get_preferred_width_for_height) (
        GtkCellAreaContext* context,
        int height,
        int* minimum_width,
        int* natural_width
      );

    }

No description available.

###### Class members

`allocate: void (* allocate) ( GtkCellAreaContext* context, int width, int height )`

  This tells the context that an allocation width or height (or both) have been decided for a group of rows. The context should store any allocations for internally aligned cells at this point so that they dont need to be recalculated at `gtk_cell_area_render()` time.

`reset: void (* reset) ( GtkCellAreaContext* context )`

  Clear any previously stored information about requested and allocated sizes for the context.

`get_preferred_height_for_width: void (* get_preferred_height_for_width) ( GtkCellAreaContext* context, int width, int* minimum_height, int* natural_height )`

  Returns the aligned height for the given width that context must store while collecting sizes for it’s rows.

`get_preferred_width_for_height: void (* get_preferred_width_for_height) ( GtkCellAreaContext* context, int height, int* minimum_width, int* natural_width )`

  Returns the aligned width for the given height that context must store while collecting sizes for it’s rows.

#### Virtual methods

###### Gtk.CellAreaContextClass.allocate

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

deprecated: 4.10

###### Gtk.CellAreaContextClass.get_preferred_height_for_width

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

deprecated: 4.10

###### Gtk.CellAreaContextClass.get_preferred_width_for_height

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

deprecated: 4.10

###### Gtk.CellAreaContextClass.reset

Resets any previously cached request and allocation data.

deprecated: 4.10