summaryrefslogtreecommitdiff
path: root/gtk/gtkcellareacontext.h
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2010-11-26 21:26:24 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2010-11-26 21:38:10 +0900
commit487223d480578457f924470c1a1d73eb261eefd7 (patch)
treee6888ecfc4a29875b54e5ba349a47f36ccc183fd /gtk/gtkcellareacontext.h
parentfa3c8f182edcddcfb948513fbdadeeec2e059fe0 (diff)
downloadgtk+-487223d480578457f924470c1a1d73eb261eefd7.tar.gz
Finally really support rendering of cells in an unallocated context.
What this means is basically that a vertically oriented GtkCellAreaBox will render cells properly even if the height is not constant for every for of data in the said GtkCellAreaContext (i.e. the height was not allocated by gtk_cell_area_context_allocate). This is done completely on the fly and so is much more heavy duty at render time (considerably slower but not visibly noticable in lightweight views like GtkTreeMenu). Note that cell alignments are not possible in an unallocated orientation, each row of data individually receives only enough space to render the independant row and no space is reserved for alignments if the size is not a constant size across rows in the same context.
Diffstat (limited to 'gtk/gtkcellareacontext.h')
-rw-r--r--gtk/gtkcellareacontext.h34
1 files changed, 4 insertions, 30 deletions
diff --git a/gtk/gtkcellareacontext.h b/gtk/gtkcellareacontext.h
index 8e3621f313..0796908caf 100644
--- a/gtk/gtkcellareacontext.h
+++ b/gtk/gtkcellareacontext.h
@@ -74,9 +74,8 @@ struct _GtkCellAreaContextClass
/* Store an allocation value for a GtkCellArea contextual to a range of
* treemodel rows */
- void (* allocate_width) (GtkCellAreaContext *context,
- gint width);
- void (* allocate_height) (GtkCellAreaContext *context,
+ void (* allocate) (GtkCellAreaContext *context,
+ gint width,
gint height);
/* Padding for future expansion */
@@ -93,44 +92,27 @@ GtkCellArea *gtk_cell_area_context_get_area (GtkCellArea
/* Apis for GtkCellArea clients to flush the cache */
void gtk_cell_area_context_flush (GtkCellAreaContext *context);
void gtk_cell_area_context_flush_preferred_width (GtkCellAreaContext *context);
-void gtk_cell_area_context_flush_preferred_height_for_width (GtkCellAreaContext *context,
- gint for_width);
void gtk_cell_area_context_flush_preferred_height (GtkCellAreaContext *context);
-void gtk_cell_area_context_flush_preferred_width_for_height (GtkCellAreaContext *context,
- gint for_height);
void gtk_cell_area_context_flush_allocation (GtkCellAreaContext *context);
/* Apis for GtkCellArea clients to sum up the results of a series of requests, this
* call is required to reduce the processing while calculating the size of each row */
void gtk_cell_area_context_sum_preferred_width (GtkCellAreaContext *context);
-void gtk_cell_area_context_sum_preferred_height_for_width (GtkCellAreaContext *context,
- gint for_width);
void gtk_cell_area_context_sum_preferred_height (GtkCellAreaContext *context);
-void gtk_cell_area_context_sum_preferred_width_for_height (GtkCellAreaContext *context,
- gint for_height);
/* Apis to set an allocation size in one dimension or another, the subclass specific context
* will store allocated positions/sizes for individual cells or groups of cells */
-void gtk_cell_area_context_allocate_width (GtkCellAreaContext *context,
- gint width);
-void gtk_cell_area_context_allocate_height (GtkCellAreaContext *context,
+void gtk_cell_area_context_allocate (GtkCellAreaContext *context,
+ gint width,
gint height);
/* Apis for GtkCellArea clients to consult cached values for multiple GtkTreeModel rows */
void gtk_cell_area_context_get_preferred_width (GtkCellAreaContext *context,
gint *minimum_width,
gint *natural_width);
-void gtk_cell_area_context_get_preferred_height_for_width (GtkCellAreaContext *context,
- gint for_width,
- gint *minimum_height,
- gint *natural_height);
void gtk_cell_area_context_get_preferred_height (GtkCellAreaContext *context,
gint *minimum_height,
gint *natural_height);
-void gtk_cell_area_context_get_preferred_width_for_height (GtkCellAreaContext *context,
- gint for_height,
- gint *minimum_width,
- gint *natural_width);
void gtk_cell_area_context_get_allocation (GtkCellAreaContext *context,
gint *width,
gint *height);
@@ -139,17 +121,9 @@ void gtk_cell_area_context_get_allocation (GtkCellArea
void gtk_cell_area_context_push_preferred_width (GtkCellAreaContext *context,
gint minimum_width,
gint natural_width);
-void gtk_cell_area_context_push_preferred_height_for_width (GtkCellAreaContext *context,
- gint for_width,
- gint minimum_height,
- gint natural_height);
void gtk_cell_area_context_push_preferred_height (GtkCellAreaContext *context,
gint minimum_height,
gint natural_height);
-void gtk_cell_area_context_push_preferred_width_for_height (GtkCellAreaContext *context,
- gint for_height,
- gint minimum_width,
- gint natural_width);
G_END_DECLS