X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpspp-sheet-selection.h;h=ec96dd117bf620811818bbe991fdb18a0f1e36d7;hb=fd42aabc26013ace3f87acc4108c3d8a3b238232;hp=9c0bcbe4f3c75a2efac748dddb238caa98ba2ddf;hpb=d64431ef201b3031adaca5643e35274c0cee2fa5;p=pspp diff --git a/src/ui/gui/pspp-sheet-selection.h b/src/ui/gui/pspp-sheet-selection.h index 9c0bcbe4f3..ec96dd117b 100644 --- a/src/ui/gui/pspp-sheet-selection.h +++ b/src/ui/gui/pspp-sheet-selection.h @@ -48,6 +48,19 @@ G_BEGIN_DECLS #define PSPP_IS_SHEET_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPP_TYPE_SHEET_SELECTION)) #define PSPP_SHEET_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PSPP_TYPE_SHEET_SELECTION, PsppSheetSelectionClass)) +typedef enum + { + /* Same as GtkSelectionMode. */ + PSPP_SHEET_SELECTION_NONE = GTK_SELECTION_NONE, + PSPP_SHEET_SELECTION_SINGLE = GTK_SELECTION_SINGLE, + PSPP_SHEET_SELECTION_BROWSE = GTK_SELECTION_BROWSE, + PSPP_SHEET_SELECTION_MULTIPLE = GTK_SELECTION_MULTIPLE, + + /* PsppSheetView extension. */ + PSPP_SHEET_SELECTION_RECTANGLE = 10 + } +PsppSheetSelectionMode; + typedef gboolean (* PsppSheetSelectionFunc) (PsppSheetSelection *selection, GtkTreeModel *model, GtkTreePath *path, @@ -64,11 +77,8 @@ struct _PsppSheetSelection /*< private >*/ - PsppSheetView *GSEAL (tree_view); - GtkSelectionMode GSEAL (type); - PsppSheetSelectionFunc GSEAL (user_func); - gpointer GSEAL (user_data); - GDestroyNotify GSEAL (destroy); + PsppSheetView *tree_view; + PsppSheetSelectionMode type; }; struct _PsppSheetSelectionClass @@ -88,8 +98,8 @@ struct _PsppSheetSelectionClass GType pspp_sheet_selection_get_type (void) G_GNUC_CONST; void pspp_sheet_selection_set_mode (PsppSheetSelection *selection, - GtkSelectionMode type); -GtkSelectionMode pspp_sheet_selection_get_mode (PsppSheetSelection *selection); + PsppSheetSelectionMode type); +PsppSheetSelectionMode pspp_sheet_selection_get_mode (PsppSheetSelection *selection); void pspp_sheet_selection_set_select_function (PsppSheetSelection *selection, PsppSheetSelectionFunc func, gpointer data, @@ -99,8 +109,9 @@ PsppSheetView* pspp_sheet_selection_get_tree_view (PsppSheetSelection PsppSheetSelectionFunc pspp_sheet_selection_get_select_function (PsppSheetSelection *selection); -/* Only meaningful if GTK_SELECTION_SINGLE or GTK_SELECTION_BROWSE is set */ -/* Use selected_foreach or get_selected_rows for GTK_SELECTION_MULTIPLE */ +/* Only meaningful if PSPP_SHEET_SELECTION_SINGLE or PSPP_SHEET_SELECTION_BROWSE is set */ +/* Use selected_foreach or get_selected_rows for + PSPP_SHEET_SELECTION_MULTIPLE */ gboolean pspp_sheet_selection_get_selected (PsppSheetSelection *selection, GtkTreeModel **model, GtkTreeIter *iter); @@ -130,7 +141,18 @@ void pspp_sheet_selection_select_range (PsppSheetSelection void pspp_sheet_selection_unselect_range (PsppSheetSelection *selection, GtkTreePath *start_path, GtkTreePath *end_path); - +struct range_set *pspp_sheet_selection_get_range_set (PsppSheetSelection *selection); + + +GList * pspp_sheet_selection_get_selected_columns (PsppSheetSelection *selection); +gint pspp_sheet_selection_count_selected_columns (PsppSheetSelection *selection); +void pspp_sheet_selection_select_all_columns (PsppSheetSelection *selection); +void pspp_sheet_selection_unselect_all_columns (PsppSheetSelection *selection); +void pspp_sheet_selection_select_column (PsppSheetSelection *selection, + PsppSheetViewColumn *column); +void pspp_sheet_selection_select_column_range (PsppSheetSelection *selection, + PsppSheetViewColumn *first, + PsppSheetViewColumn *last); G_END_DECLS