sheet-view.h 2.07 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
#include <gtk/gtktable.h>
Morten Welinder's avatar
Morten Welinder committed
6
#include <gnome.h>
Arturo Espinosa's avatar
Arturo Espinosa committed
7 8 9 10 11 12 13 14 15

#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;

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

	/* Object group */
	GnomeCanvasGroup *object_group;

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

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

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

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

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

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

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

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

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

69
#endif /* GNUMERIC_SHEET_VIEW_H */