1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 #ifndef _GNM_SHEET_CONTROL_GUI_PRIV_H_
3 # define _GNM_SHEET_CONTROL_GUI_PRIV_H_
5 #include "sheet-control-gui.h"
6 #include "sheet-control-priv.h"
7 #include "sheet-object.h"
12 #define SCG_NUM_PANES 4
13 struct _SheetControlGUI
{
14 SheetControl sheet_control
;
16 /* Cached SheetControl attribute to reduce casting. */
20 GtkWidget
*select_all_btn
;
24 GtkWidget
*button_box
;
25 } col_group
, row_group
;
27 GnmPane
*pane
[SCG_NUM_PANES
];
30 int grab_stack
; /* utility to keep track of grabs in the various canvases */
32 /* Scrolling information */
33 GtkPaned
*vpane
, *hpane
; /* drag panes for freezing */
34 GtkWidget
*vs
, *hs
; /* Scrollbars */
35 GtkAdjustment
*va
, *ha
; /* Adjustments */
36 int vpos
, hpos
; /* Handle positions */
37 guint pane_drag_handler
;
38 int screen_width
, screen_height
;
39 guint scroll_bar_timer
;
41 /* SheetObject support */
42 GHashTable
*selected_objects
;
44 /* Keep track of a rangeselector state */
47 GnmCellPos base_corner
; /* Corner remains static when rubber banding */
48 GnmCellPos move_corner
; /* Corner to move when extending */
49 GnmRange displayed
; /* The range to display */
55 GtkWidget
*item
; /* TODO : make this a canvas item with an arrow */
67 int timer
, counter
, n
;
69 SCGUIMoveFunc handler
;
72 typedef SheetControlClass SheetControlGUIClass
;
74 /* SCG virtual methods called directly from the GUI layer*/
75 void scg_adjust_preferences (SheetControlGUI
*scg
);
76 void scg_mode_edit (SheetControlGUI
*scg
);
78 #define SCG_FOREACH_PANE(scg, pane, code) \
81 for (i = scg->active_panes; i-- > 0 ; ) { \
82 GnmPane *pane = scg->pane[i]; \
91 #endif /* _GNM_SHEET_CONTROL_GUI_PRIV_H_ */