1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 1997, 1998, 1999, 2000, 2009, 2011, 2014 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* Simple table class.
22 This is a type of table (see output/table.h) whose content is composed
23 manually by the code that generates it, by filling in cells one by one.
26 #include "libpspp/compiler.h"
27 #include "output/table.h"
28 #include "data/format.h"
31 #define TAB_RULE_TYPE_MASK 7
32 #define TAB_RULE_TYPE_SHIFT 0
33 #define TAB_RULE_STYLE_MASK (31 << TAB_RULE_STYLE_SHIFT)
34 #define TAB_RULE_STYLE_SHIFT 3
37 struct table *tab_create (int nc, int nr, int hl, int hr, int ht, int hb);
40 void tab_hline (struct table *, int style, int x1, int x2, int y);
41 void tab_vline (struct table *, int style, int x, int y1, int y2);
42 void tab_box (struct table *, int f_h, int f_v, int i_h, int i_v,
43 int x1, int y1, int x2, int y2);
46 void tab_text (struct table *, int c, int r, unsigned opt, const char *);
47 void tab_text_format (struct table *, int c, int r, unsigned opt,
51 void tab_joint_text (struct table *, int x1, int y1, int x2, int y2,
52 unsigned opt, const char *);
54 struct footnote *tab_create_footnote (struct table *, size_t idx,
55 const char *content, const char *marker,
57 void tab_add_footnote (struct table *, int x, int y,
58 const struct footnote *);
60 void tab_add_style (struct table *, int x, int y,
61 const struct area_style *);
63 bool tab_cell_is_empty (const struct table *, int c, int r);
66 void tab_output_text (int options, const char *string);
67 void tab_output_text_format (int options, const char *, ...)
70 /* For use by table-provider only. */
72 void tab_destroy (struct table *);
73 void tab_get_cell (const struct table *, int x, int y, struct table_cell *);
74 int tab_get_rule (const struct table *, enum table_axis, int x, int y,
77 #endif /* output/tab.h */