Update Spanish translation
[gnumeric.git] / src / sheet-control-gui-priv.h
blob8fa7b6f6a525cd5785b3e824d315ea0c95379da3
1 #ifndef _GNM_SHEET_CONTROL_GUI_PRIV_H_
2 # define _GNM_SHEET_CONTROL_GUI_PRIV_H_
4 #include <sheet-control-gui.h>
5 #include <sheet-control-priv.h>
6 #include <sheet-object.h>
8 G_BEGIN_DECLS
10 #define SCG_NUM_PANES 4
11 struct _SheetControlGUI {
12 SheetControl sheet_control;
14 /* Cached SheetControl attribute to reduce casting. */
15 WBCGtk *wbcg;
17 GtkGrid *grid;
18 GtkWidget *select_all_btn;
19 GtkWidget *label;
20 struct {
21 GPtrArray *buttons;
22 GtkWidget *button_box;
23 } col_group, row_group;
25 GnmPane *pane [SCG_NUM_PANES];
26 int active_panes;
28 int grab_stack; /* utility to keep track of grabs in the various canvases */
30 /* Scrolling information */
31 GtkPaned *vpane, *hpane; /* drag panes for freezing */
32 GtkWidget *vs, *hs; /* Scrollbars */
33 GtkAdjustment *va, *ha; /* Adjustments */
34 int vpos, hpos; /* Handle positions */
35 guint pane_drag_handler;
36 int screen_width, screen_height;
37 guint scroll_bar_timer;
39 /* SheetObject support */
40 GHashTable *selected_objects;
42 /* Keep track of a rangeselector state */
43 struct {
44 gboolean active;
45 GnmCellPos base_corner; /* Corner remains static when rubber banding */
46 GnmCellPos move_corner; /* Corner to move when extending */
47 GnmRange displayed; /* The range to display */
48 } rangesel;
50 /* Comments */
51 struct {
52 GnmComment *selected;
53 GtkWidget *item; /* TODO : make this a canvas item with an arrow */
54 int timer;
55 int x, y;
56 } comment;
58 /* im */
59 struct {
60 GtkWidget *item;
61 int timer;
62 } im;
64 struct {
65 int timer, counter, n;
66 gboolean jump, horiz;
67 SCGUIMoveFunc handler;
68 } delayedMovement;
71 typedef struct {
72 SheetControlClass parent_class;
73 } SheetControlGUIClass;
75 /* SCG virtual methods called directly from the GUI layer*/
76 void scg_adjust_preferences (SheetControlGUI *scg);
77 void scg_mode_edit (SheetControlGUI *scg);
79 #define SCG_FOREACH_PANE(scg, pane, code) \
80 do { \
81 int i; \
82 for (i = scg->active_panes; i-- > 0 ; ) { \
83 GnmPane *pane = scg->pane[i]; \
84 if (pane) { \
85 code \
86 } \
87 } \
88 } while (0)
90 G_END_DECLS
92 #endif /* _GNM_SHEET_CONTROL_GUI_PRIV_H_ */