sheet-view.h 2.05 KB
Newer Older
1 2
#ifndef GNUMERIC_SHEET_VIEW_H
#define GNUMERIC_SHEET_VIEW_H
Arturo Espinosa's avatar
Arturo Espinosa committed
3

4
#include "sheet.h"
Arturo Espinosa's avatar
Arturo Espinosa committed
5 6 7 8 9 10 11 12 13 14
#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;

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

	/* Object group */
	GnomeCanvasGroup *object_group;

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

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

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

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

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

48 49 50 51 52 53
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
54

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

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

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

68
#endif /* GNUMERIC_SHEET_VIEW_H */