File: ms-container.h

package info (click to toggle)
gnumeric 1.10.8-1squeeze5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 90,968 kB
  • ctags: 23,303
  • sloc: ansic: 248,235; xml: 51,894; sh: 10,491; makefile: 2,822; perl: 2,466; yacc: 1,272; python: 205
file content (72 lines) | stat: -rw-r--r-- 2,439 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* vim: set sw=8 ts=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#ifndef GNM_EXCEL_CONTAINER_H
#define GNM_EXCEL_CONTAINER_H

/**
 * ms-container.h: A meta container to handle object import for charts,
 *		workbooks and sheets.
 *
 * Author:
 *    Jody Goldberg (jody@gnome.org)
 *
 * (C) 2000-2005 Jody Goldberg
 **/

#include "excel.h"
#include "ms-biff.h"
#include <glib.h>
#include <pango/pango-attributes.h>

typedef struct _MSContainer	MSContainer;
typedef struct _GnmXLImporter	GnmXLImporter;
typedef struct _MSEscherBlip	MSEscherBlip;
typedef struct _MSObj		MSObj;

typedef struct {
	gboolean        (*realize_obj)	(MSContainer *c, MSObj *obj);
	SheetObject   * (*create_obj)	(MSContainer *c, MSObj *obj);
	GnmExprTop const* (*parse_expr) (MSContainer *c,
					 guint8 const *expr, int length);
	Sheet	      * (*sheet)	(MSContainer const *c);
	GOFormat     * (*get_fmt)	(MSContainer const *c, unsigned indx);
	PangoAttrList * (*get_markup)	(MSContainer const *c, unsigned indx);
} MSContainerClass;

struct _MSContainer {
	MSContainerClass const *vtbl;

	GnmXLImporter	*importer;
	gboolean	 free_blips;
	GPtrArray	*blips;
	GSList		*obj_queue;

	struct {
		GPtrArray	*externsheets;
		GPtrArray	*externnames;
	} v7;	/* biff7 does this at the container level */

	/* This is the container containing this container */
	MSContainer	*parent;
};

void ms_container_init (MSContainer *container, MSContainerClass const *vtbl,
			MSContainer *parent, GnmXLImporter *importer);
void ms_container_finalize (MSContainer *container);

void           ms_container_add_blip	 (MSContainer *c, MSEscherBlip *blip);
MSEscherBlip  *ms_container_get_blip	 (MSContainer *c, int blip_id);
void	       ms_container_set_blips    (MSContainer *c, GPtrArray *blips);
void	       ms_container_add_obj	 (MSContainer *c, MSObj *obj);
MSObj	      *ms_container_get_obj	 (MSContainer *c, int obj_id);
void	       ms_container_realize_objs (MSContainer *c);
GnmExprTop const *ms_container_parse_expr (MSContainer *c,
					  guint8 const *data, int length);

Sheet		*ms_container_sheet	  (MSContainer const *c);
GOFormat	*ms_container_get_fmt	  (MSContainer const *c, unsigned indx);
PangoAttrList	*ms_container_get_markup  (MSContainer const *c, unsigned indx);
PangoAttrList	*ms_container_read_markup (MSContainer const *c,
					   guint8 const *data, size_t txo_len,
					   char const *str);

#endif /* GNM_EXCEL_CONTAINER_H */