sheet.h 915 Bytes
Newer Older
Arturo Espinosa's avatar
Arturo Espinosa committed
1
2
#ifndef SHEET_H
#define SHEET_H
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

typedef GList ColStyleList;

struct Workbook;

typedef struct {
	RowType    row;
	int        height;
	Style      *style;		/* if existant, this row style */
} RowInfo;

typedef struct {
	ColType    col;
	int        width;
	Style      style;		/* if existant, this column style */
} ColInfo;

typedef struct {
Arturo Espinosa's avatar
Arturo Espinosa committed
21
22
23
24
25
26
27
28
29
30
	GtkWidget  *toplevel;
	GtkWidget  *notebook;
	
	Style      style;
	GHashTable *sheets;	/* keeps a list of the Sheets on this workbook */
} Workbook;

typedef struct {
	Workbook   *parent_workbook;
	GtkWidget  *sheet_view;
31
32
33
34
35
36
37
38
	char       *name;
		   
	Style      style;
	GList      *cols_info;
	GList      *rows_info;
	void       *contents;
} Sheet;

Arturo Espinosa's avatar
Arturo Espinosa committed
39
40
41
42
43
44
Sheet    *sheet_new                (Workbook *wb, char *name);

Workbook *workbook_new             (void);
Workbook *workbook_new_with_sheets (int sheet_count);
void      workbook_attach_sheet    (Workbook *, Sheet *);

45
#endif