X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpspp-sheet-view.h;h=743404d793fa2210c8cd808d6e20926ef5385984;hb=41a54fcf6e287896ca4d8d2a565b4ccea5bc6a5b;hp=09a89e2d523802ff8ca2b85ea923783ae2abd965;hpb=7ecdf4e88e39024da846a25c98caa2887f0dac59;p=pspp diff --git a/src/ui/gui/pspp-sheet-view.h b/src/ui/gui/pspp-sheet-view.h index 09a89e2d52..743404d793 100644 --- a/src/ui/gui/pspp-sheet-view.h +++ b/src/ui/gui/pspp-sheet-view.h @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -53,6 +53,25 @@ typedef enum GType pspp_sheet_view_grid_lines_get_type (void) G_GNUC_CONST; #define PSPP_TYPE_SHEET_VIEW_GRID_LINES (pspp_sheet_view_grid_lines_get_type ()) +/* A "special cell" is a cell that is editable or activatable. When a row that + * contains a special cell is selected, the cursor is drawn around a single + * cell; when other rows are selected, the cursor is drawn around the entire + * row. + * + * With the default of "detect", whether a given row contains a special cell is + * detected automatically. This is the best choice most of the time. For + * sheet views that contain more than 100 columns, an explicit "yes" or "no" + * improves performance. */ +typedef enum +{ + PSPP_SHEET_VIEW_SPECIAL_CELLS_DETECT, + PSPP_SHEET_VIEW_SPECIAL_CELLS_YES, + PSPP_SHEET_VIEW_SPECIAL_CELLS_NO, +} PsppSheetViewSpecialCells; + +GType pspp_sheet_view_special_cells_get_type (void) G_GNUC_CONST; +#define PSPP_TYPE_SHEET_VIEW_SPECIAL_CELLS (pspp_sheet_view_special_cells_get_type ()) + typedef enum { /* drop before/after this row */ @@ -65,6 +84,13 @@ typedef enum PSPP_SHEET_VIEW_DROP_INTO_OR_AFTER } PsppSheetViewDropPosition; +typedef enum +{ + PSPP_SHEET_SELECT_MODE_TOGGLE = 1 << 0, + PSPP_SHEET_SELECT_MODE_EXTEND = 1 << 1 +} +PsppSheetSelectMode; + #define PSPP_TYPE_SHEET_VIEW (pspp_sheet_view_get_type ()) #define PSPP_SHEET_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPP_TYPE_SHEET_VIEW, PsppSheetView)) #define PSPP_SHEET_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PSPP_TYPE_SHEET_VIEW, PsppSheetViewClass)) @@ -82,7 +108,9 @@ struct _PsppSheetView { GtkContainer parent; - PsppSheetViewPrivate *GSEAL (priv); + PsppSheetViewPrivate *PSEAL (priv); + + gboolean dispose_has_run ; }; struct _PsppSheetViewClass @@ -105,7 +133,8 @@ struct _PsppSheetViewClass gboolean (* select_all) (PsppSheetView *tree_view); gboolean (* unselect_all) (PsppSheetView *tree_view); gboolean (* select_cursor_row) (PsppSheetView *tree_view, - gboolean start_editing); + gboolean start_editing, + PsppSheetSelectMode mode); gboolean (* toggle_cursor_row) (PsppSheetView *tree_view); gboolean (* select_cursor_parent) (PsppSheetView *tree_view); gboolean (* start_interactive_search) (PsppSheetView *tree_view); @@ -287,8 +316,11 @@ gboolean pspp_sheet_view_get_dest_row_at_pos (PsppSheetV gint drag_y, GtkTreePath **path, PsppSheetViewDropPosition *pos); + +#if GTK3_TRANSITION GdkPixmap *pspp_sheet_view_create_row_drag_icon (PsppSheetView *tree_view, GtkTreePath *path); +#endif /* Interactive search */ void pspp_sheet_view_set_enable_search (PsppSheetView *tree_view, @@ -367,12 +399,14 @@ gboolean pspp_sheet_view_is_rubber_banding_active (PsppSheetView *tree_vie PsppSheetViewGridLines pspp_sheet_view_get_grid_lines (PsppSheetView *tree_view); void pspp_sheet_view_set_grid_lines (PsppSheetView *tree_view, PsppSheetViewGridLines grid_lines); -gboolean pspp_sheet_view_get_enable_tree_lines (PsppSheetView *tree_view); -void pspp_sheet_view_set_enable_tree_lines (PsppSheetView *tree_view, - gboolean enabled); -void pspp_sheet_view_set_level_indentation (PsppSheetView *tree_view, - gint indentation); -gint pspp_sheet_view_get_level_indentation (PsppSheetView *tree_view); + +PsppSheetViewSpecialCells pspp_sheet_view_get_special_cells (PsppSheetView *tree_view); +void pspp_sheet_view_set_special_cells (PsppSheetView *tree_view, + PsppSheetViewSpecialCells); + +int pspp_sheet_view_get_fixed_height (const PsppSheetView *); +void pspp_sheet_view_set_fixed_height (PsppSheetView *, + int fixed_height); /* Convenience functions for setting tooltips */ void pspp_sheet_view_set_tooltip_row (PsppSheetView *tree_view, @@ -394,6 +428,9 @@ void pspp_sheet_view_set_tooltip_column (PsppSheetView *tree_view gint column); gint pspp_sheet_view_get_tooltip_column (PsppSheetView *tree_view); +void pspp_sheet_view_stop_editing (PsppSheetView *tree_view, + gboolean cancel_editing); + G_END_DECLS