Compilation: clean up dialog including.
[gnumeric.git] / src / sheet-control-gui-priv.h
blobd2290dcde69c1e87026ca2b494100d6943f3dcd3
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"
8 #include <gtk/gtk.h>
10 G_BEGIN_DECLS
12 #define SCG_NUM_PANES 4
13 struct _SheetControlGUI {
14 SheetControl sheet_control;
16 /* Cached SheetControl attribute to reduce casting. */
17 WBCGtk *wbcg;
19 GtkGrid *grid;
20 GtkWidget *select_all_btn;
21 GtkWidget *label;
22 struct {
23 GPtrArray *buttons;
24 GtkWidget *button_box;
25 } col_group, row_group;
27 GnmPane *pane [SCG_NUM_PANES];
28 int active_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 */
45 struct {
46 gboolean active;
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 */
50 } rangesel;
52 /* Comments */
53 struct {
54 GnmComment *selected;
55 GtkWidget *item; /* TODO : make this a canvas item with an arrow */
56 int timer;
57 int x, y;
58 } comment;
60 /* im */
61 struct {
62 GtkWidget *item;
63 int timer;
64 } im;
66 struct {
67 int timer, counter, n;
68 gboolean jump, horiz;
69 SCGUIMoveFunc handler;
70 } delayedMovement;
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) \
79 do { \
80 int i; \
81 for (i = scg->active_panes; i-- > 0 ; ) { \
82 GnmPane *pane = scg->pane[i]; \
83 if (pane) { \
84 code \
85 } \
86 } \
87 } while (0)
89 G_END_DECLS
91 #endif /* _GNM_SHEET_CONTROL_GUI_PRIV_H_ */