diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-11-25 17:41:26 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-11-25 17:41:26 +0900 |
commit | 2dd2c7ce054313a3e31b162ce78507c295926e0b (patch) | |
tree | e03608c8ec7887f3292ffbf729923b466c804e3f /gtk/gtkcellrenderer.h | |
parent | 5f7787ab2ead2cdd11ebe17b16dd9498daaaf9c5 (diff) | |
download | gtk+-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.h | 11 |
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, |