X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fgtksheet%2Fgtksheet.h;h=b228a1fbb517495644b19d2511085bfaa02b7556;hb=bda57108154cc05a58915933d9c24e609ee08710;hp=f6e420166af1a965c23747ed1c3004c91742e988;hpb=543b33d52255b74980108967e55422a77152a48f;p=pspp-builds.git diff --git a/lib/gtksheet/gtksheet.h b/lib/gtksheet/gtksheet.h index f6e42016..b228a1fb 100644 --- a/lib/gtksheet/gtksheet.h +++ b/lib/gtksheet/gtksheet.h @@ -74,7 +74,6 @@ enum #define GTK_SHEET_ROW_FROZEN(sheet) !gtk_sheet_rows_resizable (sheet) #define GTK_SHEET_COLUMN_FROZEN(sheet) !gtk_sheet_columns_resizable (sheet) #define GTK_SHEET_AUTORESIZE(sheet) gtk_sheet_autoresize (sheet) -#define GTK_SHEET_CLIP_TEXT(sheet) gtk_sheet_clip_text (sheet) #define GTK_SHEET_ROW_TITLES_VISIBLE(sheet) gtk_sheet_row_titles_visible (sheet) #define GTK_SHEET_COL_TITLES_VISIBLE(sheet) gtk_sheet_column_titles_visible (sheet) #define GTK_SHEET_AUTO_SCROLL(sheet) gtk_sheet_autoscroll (sheet) @@ -84,6 +83,7 @@ enum typedef struct _GtkSheetClass GtkSheetClass; typedef struct _GtkSheetCellAttr GtkSheetCellAttr; typedef struct _GtkSheetCell GtkSheetCell; +typedef struct _GtkSheetHoverTitle GtkSheetHoverTitle; struct _GtkSheetCellAttr @@ -103,6 +103,12 @@ struct _GtkSheetCell gint col; }; +struct _GtkSheetHoverTitle +{ + GtkWidget *window; + GtkWidget *label; + gint row, column; +}; struct _GtkSheet{ GtkContainer container; @@ -117,7 +123,6 @@ struct _GtkSheet{ GtkSelectionMode selection_mode; gboolean autoresize; gboolean autoscroll; - gboolean clip_text; gboolean justify_entry; guint freeze_count; @@ -142,9 +147,6 @@ struct _GtkSheet{ gboolean rows_resizable; gboolean columns_resizable; - /* Displayed range */ - GtkSheetRange view; - /* active cell */ GtkSheetCell active_cell; GtkWidget *sheet_entry; @@ -154,10 +156,6 @@ struct _GtkSheet{ /* expanding selection */ GtkSheetCell selection_cell; - /* timer for flashing clipped range */ - gint32 clip_timer; - gint interval; - /* global selection button */ GtkWidget *button; @@ -220,8 +218,9 @@ struct _GtkSheet{ /* current range being dragged */ GtkSheetRange drag_range; - /* clipped range */ - GtkSheetRange clip_range; + /* Used for the subtitle (popups) */ + gint motion_timer; + GtkSheetHoverTitle *hover_window; }; struct _GtkSheetClass @@ -238,8 +237,6 @@ struct _GtkSheetClass void (*select_range) (GtkSheet *sheet, GtkSheetRange *range); - void (*clip_range) (GtkSheet *sheet, GtkSheetRange *clip_range); - void (*resize_range) (GtkSheet *sheet, GtkSheetRange *old_range, GtkSheetRange *new_range); @@ -342,6 +339,11 @@ gtk_sheet_get_rows_count (GtkSheet *sheet); void gtk_sheet_get_visible_range (GtkSheet *sheet, GtkSheetRange *range); + +void +gtk_sheet_get_selected_range (GtkSheet *sheet, + GtkSheetRange *range); + void gtk_sheet_set_selection_mode (GtkSheet *sheet, gint mode); @@ -357,12 +359,6 @@ gtk_sheet_set_autoscroll (GtkSheet *sheet, gboolean autoscroll); gboolean gtk_sheet_autoscroll (GtkSheet *sheet); -void -gtk_sheet_set_clip_text (GtkSheet *sheet, gboolean clip_text); - -gboolean -gtk_sheet_clip_text (GtkSheet *sheet); - void gtk_sheet_set_justify_entry (GtkSheet *sheet, gboolean justify); @@ -492,16 +488,6 @@ void gtk_sheet_select_column (GtkSheet * sheet, gint column); -/* save selected range to "clipboard" */ -void -gtk_sheet_clip_range (GtkSheet *sheet, const GtkSheetRange *range); -/* free clipboard */ -void -gtk_sheet_unclip_range (GtkSheet *sheet); - -gboolean -gtk_sheet_in_clip (GtkSheet *sheet); - /* get scrollbars adjustment */ GtkAdjustment * gtk_sheet_get_vadjustment (GtkSheet * sheet); @@ -521,6 +507,10 @@ void gtk_sheet_unselect_range (GtkSheet *sheet); gboolean gtk_sheet_set_active_cell (GtkSheet *sheet, gint row, gint column); + +/* Sets *ROW and *COLUMN to be the coordinates of the active cell. + ROW and/or COLUMN may be null if the caller is not interested in their + values */ void gtk_sheet_get_active_cell (GtkSheet *sheet, gint *row, gint *column); @@ -542,18 +532,11 @@ gtk_sheet_cell_get_text (const GtkSheet *sheet, gint row, gint col); /* clear cell contents */ void gtk_sheet_cell_clear (GtkSheet *sheet, gint row, gint col); -/* clear cell contents and remove links */ -void -gtk_sheet_cell_delete (GtkSheet *sheet, gint row, gint col); /* clear range contents. If range==NULL the whole sheet will be cleared */ void gtk_sheet_range_clear (GtkSheet *sheet, const GtkSheetRange *range); -/* clear range contents and remove links */ -void -gtk_sheet_range_delete (GtkSheet *sheet, - const GtkSheetRange *range); /* get cell state: GTK_STATE_NORMAL, GTK_STATE_SELECTED */ GtkStateType