1.12.42
[gnumeric.git] / src / gnm-pane-impl.h
blob48269f2e9b324f18258b3a0301a93c8d4cc95ed4
1 #ifndef _GNM_PANE_IMPL_H_
2 # define _GNM_PANE_IMPL_H_
4 #include <src/gnm-pane.h>
5 #include <src/gnumeric-simple-canvas.h>
6 #include <goffice/canvas/goc-structs.h>
8 G_BEGIN_DECLS
10 #define GNM_PANE_MAX_X 1600000
11 #define GNM_PANE_MAX_Y 1536000000
13 struct _GnmPane {
14 GnmSimpleCanvas simple;
16 GnmCellPos first, last_full, last_visible;
17 struct {
18 gint64 x, y;
19 } first_offset;
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 */
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;
34 /* IM */
35 guint im_preedit_started :1;
36 guint preedit_length;
37 GtkIMContext *im_context;
38 PangoAttrList *preedit_attrs;
40 gboolean insert_decimal;
42 int index;
43 struct {
44 GocCanvas *canvas;
45 GnmItemBar *item;
46 } col, row;
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;
55 GnmItemGrid *grid;
56 GnmItemEdit *editor;
58 struct {
59 GnmItemCursor *std, *rangesel, *special;
60 GSList *animated;
62 GSList *expr_range; /* highlight refs while editing */
63 } cursor;
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;
73 GdkCursor *mouse_cursor;
74 GtkWidget *size_tip;
75 SheetObject *cur_object;
78 G_END_DECLS
80 #endif /* _GNM_PANE_IMPL_H_ */