gnm-pane-impl.h 2.05 KB
Newer Older
1
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 3
#ifndef _GNM_PANE_IMPL_H_
# define _GNM_PANE_IMPL_H_
4 5 6

#include <src/gnm-pane.h>
#include <src/gnumeric-simple-canvas.h>
7
#include <goffice/canvas/goc-structs.h>
Morten Welinder's avatar
Morten Welinder committed
8
#include <gtk/gtk.h>
9

10 11
G_BEGIN_DECLS

12 13
#define GNM_PANE_MAX_X 1600000
#define GNM_PANE_MAX_Y 1536000000
14 15 16 17

struct _GnmPane {
	GnmSimpleCanvas simple;

18 19 20 21
	GnmCellPos first, last_full, last_visible;
	struct {
		gint64 x, y;
	} first_offset;
22 23

	/* In stacking order from lowest to highest */
24 25 26
	GocGroup *grid_items;	/* grid & cursors */
	GocGroup *object_views;	/* object views */
	GocGroup *action_items;	/* drag cursors, and object ctrl pts */
27 28 29 30 31 32 33 34 35 36

	/* Sliding scroll */
	GnmPaneSlideHandler slide_handler;
	gpointer   slide_data;
	int        sliding;	/* a gtk_timeout tag, -1 means not set */
	int        sliding_x, sliding_y;
	int        sliding_dx, sliding_dy;
	gboolean   sliding_adjacent_h, sliding_adjacent_v;

	/*  IM */
37 38 39
	guint im_block_edit_start :1; /* see gnm_pane_key_press for details */
	guint im_first_focus	  :1; /* see gnm_pane_init for details */
	guint preedit_length;
40 41 42
	GtkIMContext  *im_context;
	PangoAttrList *preedit_attrs;

43
	gboolean insert_decimal;
44 45 46

	int		 index;
	struct {
Jody Goldberg's avatar
Jody Goldberg committed
47
		GtkWidget *alignment;
48
		GocCanvas *canvas;
49 50 51 52 53 54
		ItemBar   *item;
	} col, row;

	/* Lines across the grid.  Used for col/row resize and the creation of
	 * frozen panes */
	struct {
55 56
		GocItem   *guide, *start;
		GocPoint  *points;
57 58 59 60 61 62
	} size_guide;

	ItemGrid      *grid;
	ItemEdit      *editor;

	struct {
Jody Goldberg's avatar
Jody Goldberg committed
63
		ItemCursor *std, *rangesel, *special;
64
		GSList *animated;
65

66
		GSList *expr_range;	/* highlight refs while editing */
67 68 69 70 71 72
	} cursor;

	struct {
		int		 button;	  /* the button that intiated the object drag */
		gboolean	 created_objects;
		gboolean	 had_motion;	  /* while dragging did we actually move */
73
		GHashTable	*ctrl_pts;	  /* arrays of GocItems hashed by sheet object */
Jody Goldberg's avatar
Jody Goldberg committed
74
		double		 last_x, last_y, origin_x, origin_y;
75 76 77 78
	} drag;

	GdkCursor	*mouse_cursor;
	GtkWidget       *size_tip;
79
	SheetObject     *cur_object;
80 81
};

82 83 84
G_END_DECLS

#endif /* _GNM_PANE_IMPL_H_ */