From 3018f79188018eb590be1412a95b830a0d842fbc Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sat, 9 Dec 2000 22:20:52 +0000 Subject: Added the actions parameter to ect_event. Added an actions field to 2000-12-09 Christopher James Lahey * e-cell-text.c: Added the actions parameter to ect_event. Added an actions field to CellEdit. Handle CellEdit properly in the ect_event function to do grabbing and ungrabbing when appropriate. Set the actions field in CellEdit when appropriate in e_cell_text_view_command. * e-cell-toggle.c, e-cell-tree.c, e-cell.c, e-cell.h: Added a ECellActions enum, a ECellActions actions parameter to e_cell_event and added the actions parameter to all the handlers of the event method including having ECellTree pass it on to its child cell. * e-table-header-item.c: Use the NULL cursor instead of the E_CURSORS_ARROW cursor. * e-table-item.c, e-table-item.h: Added grabbed_row and grabbed_col fields to ETableItem (-1 on either means ungrabbed.) Pay attention to them in the find_cell function. Handle the actions parameter of e_cell_event and grab or ungrab the pointer to a given cell if requested. This is done using the new function eti_e_cell_event (which is internal to e-table-item.c,) instead of the old e_cell_event function call. Fake an ungrabbed table when calling find_cell from within the compute_location method. svn path=/trunk/; revision=6889 --- widgets/table/e-cell.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'widgets/table/e-cell.h') diff --git a/widgets/table/e-cell.h b/widgets/table/e-cell.h index a76f7e37f4..40ffae96ae 100644 --- a/widgets/table/e-cell.h +++ b/widgets/table/e-cell.h @@ -30,6 +30,11 @@ typedef enum { E_CELL_EDITING = 1 << 4, } ECellFlags; +typedef enum { + E_CELL_GRAB = 1 << 0, + E_CELL_UNGRAB = 1 << 1, +} ECellActions; + typedef struct { GtkObject object; } ECell; @@ -57,7 +62,7 @@ typedef struct { void (*draw) (ECellView *ecell_view, GdkDrawable *drawable, int model_col, int view_col, int row, ECellFlags flags, int x1, int y1, int x2, int y2); - gint (*event) (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags); + gint (*event) (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions); void (*focus) (ECellView *ecell_view, int model_col, int view_col, int row, int x1, int y1, int x2, int y2); void (*unfocus) (ECellView *ecell_view); @@ -78,7 +83,7 @@ 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); -gint e_cell_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags); +gint e_cell_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions); void e_cell_realize (ECellView *ecell_view); void e_cell_unrealize (ECellView *ecell_view); -- cgit