sheet-view.h 2.03 KB
Newer Older
1 2
#ifndef GNUMERIC_SHEET_VIEW_H
#define GNUMERIC_SHEET_VIEW_H
Arturo Espinosa's avatar
Arturo Espinosa committed
3 4 5 6 7 8 9 10 11 12 13

#include <gtk/gtktable.h>

#define SHEET_VIEW_TYPE        (sheet_view_get_type ())
#define SHEET_VIEW(obj)        (GTK_CHECK_CAST((obj), SHEET_VIEW_TYPE, SheetView))
#define SHEET_VIEW_CLASS(k)    (GTK_CHECK_CLASS_CAST((k), SHEET_VIEW_TYPE))
#define IS_SHEET_VIEW(o)       (GTK_CHECK_TYPE((o), SHEET_VIEW_TYPE))

typedef struct {
	GtkTable  table;

14 15 16 17 18 19 20 21
	Sheet            *sheet;
	GtkWidget        *sheet_view;
	GnomeCanvas      *col_canvas, *row_canvas;
	GnomeCanvasItem  *col_item, *row_item;

	/* Object group */
	GnomeCanvasGroup *object_group;

22 23
	/*
	 * Temporary object used during the creation of objects
24 25 26
	 * in the canvas
	 */
	void             *temp_item;
27 28 29 30

	/*
	 * Control points for the current item
	 */
31
	GnomeCanvasItem  *control_points [8];
Arturo Espinosa's avatar
Arturo Espinosa committed
32 33 34 35 36 37
	
	/* Scrolling information */
	GtkWidget  *vs, *hs;	/* The scrollbars */
	GtkObject  *va, *ha;    /* The adjustments */

	/* Tip for scrolling */
38
	GtkWidget        *tip;
Arturo Espinosa's avatar
Arturo Espinosa committed
39 40
} SheetView;

41 42
GtkType          sheet_view_get_type              (void);
GtkWidget       *sheet_view_new                   (Sheet *sheet);
Arturo Espinosa's avatar
Arturo Espinosa committed
43

44 45
void             sheet_view_set_zoom_factor       (SheetView *sheet_view,
						   double factor);
Arturo Espinosa's avatar
Arturo Espinosa committed
46

47 48 49 50 51 52
void             sheet_view_redraw_all            (SheetView *sheet_view);
void             sheet_view_redraw_cell_region    (SheetView *sheet_view,
						   int start_col, int start_row,
						   int end_col, int end_row);
void             sheet_view_redraw_rows           (SheetView *sheet_view);
void             sheet_view_redraw_columns        (SheetView *sheet_view);
Arturo Espinosa's avatar
Arturo Espinosa committed
53

54 55 56
void             sheet_view_hide_cursor           (SheetView *sheet_view);
void             sheet_view_show_cursor           (SheetView *sheet_view);

57
GnomeCanvasItem *sheet_view_comment_create_marker (SheetView *sheet_view,
58
						   int col, int row);
59 60 61
void             sheet_view_comment_relocate      (SheetView *sheet_view,
						   int col, int row,
						   GnomeCanvasItem *o);
Miguel de Icaza's avatar
New:  
Miguel de Icaza committed
62

Arturo Espinosa's avatar
Arturo Espinosa committed
63 64 65 66
typedef struct {
	GtkTableClass parent_class;
} SheetViewClass;

67
#endif /* GNUMERIC_SHEET_VIEW_H */
68