aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-cell.c
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnu.org>1999-12-10 15:36:51 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-12-10 15:36:51 +0800
commit48618eb6eb0d02a6bc74d19d0241ac6b0849d136 (patch)
treedf66b3707b394dd8737d579f04ec9a401eb2f9b4 /widgets/e-table/e-cell.c
parent54e2b5022a8eca59e4aac0d5b0d3cb125d54c008 (diff)
downloadgsoc2013-evolution-48618eb6eb0d02a6bc74d19d0241ac6b0849d136.tar.gz
gsoc2013-evolution-48618eb6eb0d02a6bc74d19d0241ac6b0849d136.tar.zst
gsoc2013-evolution-48618eb6eb0d02a6bc74d19d0241ac6b0849d136.zip
fix this routine.
1999-12-09 Miguel de Icaza <miguel@gnu.org> * e-table-header.c (e_table_header_col_diff): fix this routine. 1999-12-04 Miguel de Icaza <miguel@gnu.org> * e-table-header-item.c (ethi_event): Started drag and drop support. * e-table-item.c (eti_table_model_changed): The columns are controled by the Header, not by the TableModel. * e-table-header-item.c (ethi_draw): Fixed redraw logic to support arbitrary header positioning. * e-cell.h: Revamped e-cell interface. We now provide the model column and the view column to all methods (so that the methods can talk to the view and to the model at the same time). * e-table-item.c: Update to new API * e-cell-test.c: Update to new API 1999-12-03 Miguel de Icaza <miguel@gnu.org> * e-cell.c (e_cell_class_init): Provide emtpy methods for enter_edit, and leave_edit. * e-table-item.c: Killed draw cell. (eti_draw): Perform column mapping here. (e_table_item_leave_edit): ditto. (e_table_item_enter_edit): ditto. (eti_event): ditto. svn path=/trunk/; revision=1478
Diffstat (limited to 'widgets/e-table/e-cell.c')
-rw-r--r--widgets/e-table/e-cell.c44
1 files changed, 28 insertions, 16 deletions
diff --git a/widgets/e-table/e-cell.c b/widgets/e-table/e-cell.c
index 2bc49f7a45..a4a03655dc 100644
--- a/widgets/e-table/e-cell.c
+++ b/widgets/e-table/e-cell.c
@@ -25,30 +25,30 @@ ec_unrealize (ECellView *e_cell)
static void
ec_draw (ECellView *ecell_view, GdkDrawable *drawable,
- int col, int row, gboolean selected,
+ int model_col, int view_col, int row, gboolean selected,
int x1, int y1, int x2, int y2)
{
g_error ("e-cell-draw invoked\n");
}
static gint
-ec_event (ECellView *ecell_view, GdkEvent *event, int col, int row)
+ec_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row)
{
g_error ("e-cell-event invoked\n");
return 0;
}
static gint
-ec_height (ECellView *ecell_view, int col, int row)
+ec_height (ECellView *ecell_view, int model_col, int view_col, int row)
{
g_error ("e-cell-event invoked\n");
return 0;
}
static void
-ec_focus (ECellView *ecell_view, int col, int row, int x1, int y1, int x2, int y2)
+ec_focus (ECellView *ecell_view, int model_col, int view_col, int row, int x1, int y1, int x2, int y2)
{
- ecell_view->focus_col = col;
+ ecell_view->focus_col = view_col;
ecell_view->focus_row = row;
ecell_view->focus_x1 = x1;
ecell_view->focus_y1 = y1;
@@ -67,6 +67,17 @@ ec_unfocus (ECellView *ecell_view)
ecell_view->focus_y2 = -1;
}
+static void *
+ec_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
+{
+ return NULL;
+}
+
+static void
+ec_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *context)
+{
+}
+
static void
e_cell_class_init (GtkObjectClass *object_class)
{
@@ -79,22 +90,23 @@ e_cell_class_init (GtkObjectClass *object_class)
ecc->focus = ec_focus;
ecc->unfocus = ec_unfocus;
ecc->height = ec_height;
+ ecc->enter_edit = ec_enter_edit;
+ ecc->leave_edit = ec_leave_edit;
}
static void
e_cell_init (GtkObject *object)
{
- ECell *e_cell = E_CELL (object);
}
E_MAKE_TYPE(e_cell, "ECell", ECell, e_cell_class_init, e_cell_init, PARENT_TYPE);
void
-e_cell_event (ECellView *ecell_view, GdkEvent *event, int col, int row)
+e_cell_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row)
{
E_CELL_CLASS (GTK_OBJECT (ecell_view->ecell)->klass)->event (
- ecell_view, event, col, row);
+ ecell_view, event, model_col, view_col, row);
}
ECellView *
@@ -112,29 +124,29 @@ e_cell_unrealize (ECellView *ecell_view)
void
e_cell_draw (ECellView *ecell_view, GdkDrawable *drawable,
- int col, int row, gboolean selected, int x1, int y1, int x2, int y2)
+ int model_col, int view_col, int row, gboolean selected, int x1, int y1, int x2, int y2)
{
E_CELL_CLASS (GTK_OBJECT (ecell_view->ecell)->klass)->draw (
- ecell_view, drawable, col, row, selected, x1, y1, x2, y2);
+ ecell_view, drawable, model_col, view_col, row, selected, x1, y1, x2, y2);
}
int
-e_cell_height (ECellView *ecell_view, int col, int row)
+e_cell_height (ECellView *ecell_view, int model_col, int view_col, int row)
{
return E_CELL_CLASS (GTK_OBJECT (ecell_view->ecell)->klass)->height (
- ecell_view, col, row);
+ ecell_view, model_col, view_col, row);
}
void *
-e_cell_enter_edit (ECellView *ecell_view, int col, int row)
+e_cell_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
{
return E_CELL_CLASS (GTK_OBJECT (ecell_view->ecell)->klass)->enter_edit (
- ecell_view, col, row);
+ ecell_view, model_col, view_col, row);
}
void
-e_cell_leave_edit (ECellView *ecell_view, int col, int row, void *edit_context)
+e_cell_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context)
{
E_CELL_CLASS (GTK_OBJECT (ecell_view->ecell)->klass)->leave_edit (
- ecell_view, col, row, edit_context);
+ ecell_view, model_col, view_col, row, edit_context);
}