aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table-item.h
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnu.org>1999-11-28 11:12:22 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-11-28 11:12:22 +0800
commit8d75b6689bdf5dc7c1efad65867cba2a656f2dcc (patch)
treeb023c7f3a14daa812fd46882017f307cef2cb36f /widgets/e-table-item.h
parentbe9d0c05dbf3a8f10333ee6dc839673afb5befa5 (diff)
downloadgsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.tar
gsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.tar.gz
gsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.tar.bz2
gsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.tar.lz
gsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.tar.xz
gsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.tar.zst
gsoc2013-evolution-8d75b6689bdf5dc7c1efad65867cba2a656f2dcc.zip
beginning of the keyboard navigation.
1999-11-27 Miguel de Icaza <miguel@gnu.org> * e-table-item.c (eti_event): beginning of the keyboard navigation. * e-table-model.c (e_table_model_row_changed): new function. (e_table_model_cell_changed): new function. (e_table_model_class_init): New signals. * e-table-item.c (eti_request_region_redraw): x2, y2 offsets were wrong. (eti_select): Repaint selected region. (eti_request_region_redraw): Fix range. (eti_draw): Correct offset computation here. (e_table_item_class_init): New method: row_selection, handles the selection. Now it implement GTK_SELECTION_SINGLE and GTK_SELECTION_MULTIPLE. Focusing and selection should be correct now. svn path=/trunk/; revision=1441
Diffstat (limited to 'widgets/e-table-item.h')
-rw-r--r--widgets/e-table-item.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/widgets/e-table-item.h b/widgets/e-table-item.h
index fc36363413..17d422ddf5 100644
--- a/widgets/e-table-item.h
+++ b/widgets/e-table-item.h
@@ -32,6 +32,7 @@ typedef struct {
GdkGC *fill_gc;
GdkGC *grid_gc;
+ GdkGC *focus_gc;
unsigned int draw_grid:1;
@@ -49,15 +50,39 @@ typedef struct {
*/
int length_threshold;
- int selected_col, selected_row;
+ GSList *selection;
+ GtkSelectionMode selection_mode;
} ETableItem;
typedef struct {
GnomeCanvasItemClass parent_class;
+
+ void (*row_selection) (ETableItem *eti, int row, gboolean selected);
} ETableItemClass;
GtkType e_table_item_get_type (void);
+
+/*
+ * Focus
+ */
void e_table_item_focus (ETableItem *eti, int col, int row);
void e_table_item_unfocus (ETableItem *eti);
+/*
+ * Selection
+ */
+void e_table_item_select_row (ETableItem *e_table_Item, int row);
+void e_table_item_unselect_row (ETableItem *e_table_Item, int row);
+
+/*
+ * Handling the selection
+ */
+const GSList*e_table_item_get_selection (ETableItem *e_table_Item);
+
+GtkSelectionMode e_table_item_get_selection_mode (ETableItem *e_table_Item);
+void e_table_item_set_selection_mode (ETableItem *e_table_Item,
+ GtkSelectionMode selection_mode);
+gboolean e_table_item_is_row_selected (ETableItem *e_table_Item,
+ int row);
+
#endif /* _E_TABLE_ITEM_H_ */