From f55c64565cd6b2820652b09cd647581067e4c188 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Fri, 31 Dec 1999 02:23:37 +0000 Subject: Ok, the restructuring of ETableItem to compute its size without hacks is Ok, the restructuring of ETableItem to compute its size without hacks is in now. I am feeling better now. 1999-12-30 Miguel de Icaza * e-table-item.c (eti_attach_cell_views): New routine, creates the cell views. (eti_detach_cell_views): Detaches the cell_views from the ETableItem. (eti_realize_cell_views, eti_unrealize_cell_views): Simplified to just do realize/unrealize notification. (eti_add_table_model): Only attach the cells when we have both the table model and the header model. * e-cell.h (ECellClass): Added two new methods: new_view and kill_view which drive the view process (instead of putting that on realize/unrealize). * e-cell.c: Adapt the code to use the new scheme for view instantiation. * e-cell-text.c, e-cell-toggle.c: Adapted to the new class changes. svn path=/trunk/; revision=1523 --- widgets/e-cell.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'widgets/e-cell.h') diff --git a/widgets/e-cell.h b/widgets/e-cell.h index 23173a586c..3c258689e4 100644 --- a/widgets/e-cell.h +++ b/widgets/e-cell.h @@ -19,7 +19,8 @@ struct _ECell { struct _ECellView { ECell *ecell; - ETableModel *table_model; + ETableModel *e_table_model; + void *e_table_item_view; gint focus_x1, focus_y1, focus_x2, focus_y2; gint focus_col, focus_row; @@ -29,9 +30,13 @@ struct _ECellView { typedef struct { GtkObjectClass parent_class; + + ECellView *(*new_view) (ECell *ecell, ETableModel *table_model, void *e_table_item_view); + void (*kill_view) (ECellView *ecell_view); + + void (*realize) (ECellView *ecell_view); + void (*unrealize) (ECellView *ecell_view); - ECellView *(*realize) (ECell *ecell, ETableModel *table_model, void *view); - void (*unrealize) (ECellView *e_cell_view); void (*draw) (ECellView *ecell_view, GdkDrawable *drawable, int model_col, int view_col, int row, gboolean selected, int x1, int y1, int x2, int y2); @@ -46,9 +51,14 @@ typedef struct { } ECellClass; GtkType e_cell_get_type (void); +ECellView *e_cell_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view); +void e_cell_kill_view (ECellView *ecell_view); + void e_cell_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row); -ECellView *e_cell_realize (ECell *ecell, ETableModel *table_model, void *view); + +void e_cell_realize (ECellView *ecell_view); void e_cell_unrealize (ECellView *ecell_view); + void e_cell_draw (ECellView *ecell_view, GdkDrawable *dr, int model_col, int view_col, int row, gboolean selected, int x1, int y1, int x2, int y2); -- cgit v1.2.3