Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
Now a cell can either have a "fixed" size or it can have
an "aligned" starting point or both. "fixed" size cells take
no space when they are invisible.
Added a few apis,
- GtkCellAreaContext get_preferred_height_for_width &
width for height apis and vfuncs, this lets the icon view
request the collective (and aligned) height for width for
a said row.
- gtk_cell_area_copy_context() this creates a duplicate of
an already created and requested context, this way the icon
view uses a global context to request the widths of all rows
and then makes a copy with all the stored alignments and
uses a separate copy to calculate the height and alignments
of each row separately.
This allows us to reduce code allocation code paths in subclasses, as
a result GtkCellArea implements the ->render() vfunc and the subclass
only decides the cell area and background area distributions in a single
code path.
gtk_cell_area_foreach_alloc() itterates over an allocated list of cells
and calls a callback with the cell's allocation until the callback returns
TRUE.
- Removed vfunc get_cell_allocation() and implemented
gtk_cell_area_get_cell_allocation() using foreach_alloc()
- Added gtk_cell_area_get_cell_at_position() using foreach_alloc()
- Removed GtkCellAreaBox ->event() implementation and implemented
mouse "click" cell activation in GtkCellArea class directly using
gtk_cell_area_get_cell_at_position().
the ->focus() method was getting mixed up when more than
one cell was in the same group (not aligned), added the
proper check to break out of the loop on time.
- When we reach a cell that is out of the render area, break out
of the loop (for columns user resized too small)
- CLAMP the size of the last renderer to fit into the area
(so that renderers get a chance to ellipsize when rendered
with a space less than allocation, same reason as above).
- Hand out remaining space in the render area to the last cell,
this is for shallow rows in the expand column which may recieve
more than the allocated width.
If the area has no activatable cells and has focus when
focus should be cycled, immediately focus out of the area
(because focus in that case is given to the entire area).
This is because focus in treeviews can be given to cells that cannot do anything
with activation (for better keynav), so we dissociate the concept of cell
activation and focusing.
Slight tweak for GtkTreeView, also non-editable cells must be able to receive
focus to get all keyboard navigation right. This will be further tweaked
to get focus siblings to work like focus cells did in GtkTreeView before
refactoring.
The allocated size, or (horizontally speaking) for-width size, can be
smaller than the sum of all minimum widths. For example when the user
is resizing tree view columns manually.