summaryrefslogtreecommitdiff
path: root/gtk/gtkcellrenderer.h
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2010-11-25 17:41:26 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2010-11-25 17:41:26 +0900
commit2dd2c7ce054313a3e31b162ce78507c295926e0b (patch)
treee03608c8ec7887f3292ffbf729923b466c804e3f /gtk/gtkcellrenderer.h
parent5f7787ab2ead2cdd11ebe17b16dd9498daaaf9c5 (diff)
downloadgtk+-2dd2c7ce054313a3e31b162ce78507c295926e0b.tar.gz
Added gtk_cell_renderer_get_aligned_area() and class vfunc.
Since a cell renderer might use more space than the natural size when recieving expand space it's impossible to know how much space is actually used to render content. Adding this virtual method to allow text renderers to implement it, the base default method uses height-for-width apis and aligns the cell assuming the renderer uses a fixed size. This commit removes the similar code from gtkcellarea and subclasses.
Diffstat (limited to 'gtk/gtkcellrenderer.h')
-rw-r--r--gtk/gtkcellrenderer.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkcellrenderer.h b/gtk/gtkcellrenderer.h
index 736569ccea..03d9df5130 100644
--- a/gtk/gtkcellrenderer.h
+++ b/gtk/gtkcellrenderer.h
@@ -111,6 +111,11 @@ struct _GtkCellRendererClass
gint height,
gint *minimum_width,
gint *natural_width);
+ void (* get_aligned_area) (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ GtkCellRendererState flags,
+ const GdkRectangle *cell_area,
+ GdkRectangle *aligned_area);
void (* get_size) (GtkCellRenderer *cell,
GtkWidget *widget,
const GdkRectangle *cell_area,
@@ -177,6 +182,12 @@ void gtk_cell_renderer_get_preferred_size (GtkCellRend
GtkWidget *widget,
GtkRequisition *minimum_size,
GtkRequisition *natural_size);
+void gtk_cell_renderer_get_aligned_area (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ GtkCellRendererState flags,
+ const GdkRectangle *cell_area,
+ GdkRectangle *aligned_area);
+
#ifndef GTK_DISABLE_DEPRECATED
void gtk_cell_renderer_get_size (GtkCellRenderer *cell,
GtkWidget *widget,