1 #ifndef _GNM_PANE_IMPL_H_
2 # define _GNM_PANE_IMPL_H_
3 
4 #include <src/gnm-pane.h>
5 #include <src/gnumeric-simple-canvas.h>
6 #include <goffice/canvas/goc-structs.h>
7 
8 G_BEGIN_DECLS
9 
10 #define GNM_PANE_MAX_X 1600000
11 #define GNM_PANE_MAX_Y 1536000000
12 
13 struct _GnmPane {
14 	GnmSimpleCanvas simple;
15 
16 	GnmCellPos first, last_full, last_visible;
17 	struct {
18 		gint64 x, y;
19 	} first_offset;
20 
21 	/* In stacking order from lowest to highest */
22 	GocGroup *grid_items;	/* grid & cursors */
23 	GocGroup *object_views;	/* object views */
24 	GocGroup *action_items;	/* drag cursors, and object ctrl pts */
25 
26 	/* Sliding scroll */
27 	GnmPaneSlideHandler slide_handler;
28 	gpointer   slide_data;
29 	guint      sliding_timer;	/* a gtk_timeout tag, 0 means not set */
30 	int        sliding_x, sliding_y;
31 	int        sliding_dx, sliding_dy;
32 	gboolean   sliding_adjacent_h, sliding_adjacent_v;
33 
34 	/*  IM */
35 	guint im_preedit_started :1;
36 	guint preedit_length;
37 	GtkIMContext  *im_context;
38 	PangoAttrList *preedit_attrs;
39 
40 	gboolean insert_decimal;
41 
42 	int		 index;
43 	struct {
44 		GocCanvas *canvas;
45 		GnmItemBar *item;
46 	} col, row;
47 
48 	/* Lines across the grid.  Used for col/row resize and the creation of
49 	 * frozen panes */
50 	struct {
51 		GocItem   *guide, *start;
52 		GocPoint  *points;
53 	} size_guide;
54 
55 	GnmItemGrid *grid;
56 	GnmItemEdit *editor;
57 
58 	struct {
59 		GnmItemCursor *std, *rangesel, *special;
60 		GSList *animated;
61 
62 		GSList *expr_range;	/* highlight refs while editing */
63 	} cursor;
64 
65 	struct {
66 		int		 button;	  /* the button that intiated the object drag */
67 		gboolean	 created_objects;
68 		gboolean	 had_motion;	  /* while dragging did we actually move */
69 		GHashTable	*ctrl_pts;	  /* arrays of GocItems hashed by sheet object */
70 		double		 last_x, last_y, origin_x, origin_y;
71 	} drag;
72 
73 	GdkCursor	*mouse_cursor;
74 	GtkWidget       *size_tip;
75 	SheetObject     *cur_object;
76 };
77 
78 G_END_DECLS
79 
80 #endif /* _GNM_PANE_IMPL_H_ */
81