GUI: Move .ui files from goffice resources to glib resources
[gnumeric.git] / src / gnumeric.h
blobe8bcbbbddd6c3702f1a4f37b09420b6d504877f5
1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 #ifndef _GNM_GNUMERIC_H_
3 # define _GNM_GNUMERIC_H_
5 #include <glib.h>
6 #include <goffice/goffice.h>
7 #include <gnumeric-fwd.h>
9 G_BEGIN_DECLS
11 /* Individual maxima for the dimensions. See also gnm_sheet_valid_size. */
12 #define GNM_MAX_ROWS 0x1000000
13 #define GNM_MAX_COLS 0x4000
15 /* Standard size */
16 #define GNM_DEFAULT_COLS 0x100
17 #define GNM_DEFAULT_ROWS 0x10000
19 /* Minimum size. dependent.c sets row constraint. */
20 #define GNM_MIN_ROWS 0x80
21 #define GNM_MIN_COLS 0x80
24 * Note: more than 364238 columns will introduce a column named TRUE.
27 typedef enum {
28 GNM_SHEET_VISIBILITY_VISIBLE,
29 GNM_SHEET_VISIBILITY_HIDDEN,
30 GNM_SHEET_VISIBILITY_VERY_HIDDEN
31 } GnmSheetVisibility;
32 typedef enum {
33 GNM_SHEET_DATA,
34 GNM_SHEET_OBJECT,
35 GNM_SHEET_XLM
36 } GnmSheetType;
38 typedef enum {
39 GNM_ERROR_NULL,
40 GNM_ERROR_DIV0,
41 GNM_ERROR_VALUE,
42 GNM_ERROR_REF,
43 GNM_ERROR_NAME,
44 GNM_ERROR_NUM,
45 GNM_ERROR_NA,
46 GNM_ERROR_UNKNOWN
47 } GnmStdError;
49 typedef struct {
50 int col, row; /* these must be int not unsigned in some places (eg SUMIF ) */
51 } GnmCellPos;
52 typedef struct {
53 GnmCellPos start, end;
54 } GnmRange;
55 typedef struct {
56 Sheet *sheet;
57 GnmRange range;
58 } GnmSheetRange;
60 typedef enum {
61 CELL_ITER_ALL = 0,
62 CELL_ITER_IGNORE_NONEXISTENT = 1 << 0,
63 CELL_ITER_IGNORE_EMPTY = 1 << 1,
64 CELL_ITER_IGNORE_BLANK = (CELL_ITER_IGNORE_NONEXISTENT | CELL_ITER_IGNORE_EMPTY),
65 CELL_ITER_IGNORE_HIDDEN = 1 << 2, /* hidden manually */
67 /* contains SUBTOTAL */
68 CELL_ITER_IGNORE_SUBTOTAL = 1 << 3,
69 /* hidden row in a filter */
70 CELL_ITER_IGNORE_FILTERED = 1 << 4
71 } CellIterFlags;
72 typedef struct _GnmCellIter GnmCellIter;
73 typedef GnmValue *(*CellIterFunc) (GnmCellIter const *iter, gpointer user);
75 typedef enum {
76 GNM_SPANCALC_SIMPLE = 0x0, /* Just calc spans */
77 GNM_SPANCALC_RESIZE = 0x1, /* Calculate sizes of all cells */
78 GNM_SPANCALC_RE_RENDER = 0x2, /* Render and Size all cells */
79 GNM_SPANCALC_RENDER = 0x4, /* Render and Size any unrendered cells */
80 GNM_SPANCALC_ROW_HEIGHT = 0x8 /* Resize the row height */
81 } GnmSpanCalcFlags;
83 typedef enum {
84 GNM_EXPR_EVAL_SCALAR_NON_EMPTY = 0,
85 GNM_EXPR_EVAL_PERMIT_NON_SCALAR = 0x1,
86 GNM_EXPR_EVAL_PERMIT_EMPTY = 0x2,
87 GNM_EXPR_EVAL_WANT_REF = 0x4,
88 GNM_EXPR_EVAL_ARRAY_CONTEXT = 0x8
89 } GnmExprEvalFlags;
91 G_END_DECLS
93 #endif /* _GNM_GNUMERIC_H_ */