+ TABLE_HALIGN_RIGHT,
+ TABLE_HALIGN_LEFT,
+ TABLE_HALIGN_CENTER,
+ TABLE_HALIGN_MIXED,
+ TABLE_HALIGN_DECIMAL
+ };
+
+const char *table_halign_to_string (enum table_halign);
+
+enum table_valign
+ {
+ TABLE_VALIGN_TOP,
+ TABLE_VALIGN_CENTER,
+ TABLE_VALIGN_BOTTOM,
+ };
+
+const char *table_valign_to_string (enum table_valign);
+
+struct cell_style
+ {
+ enum table_halign halign;
+ enum table_valign valign;
+ double decimal_offset; /* In 1/96" units. */
+ char decimal_char; /* Either '.' or ','. */
+ int margin[TABLE_N_AXES][2]; /* In 1/96" units. */
+ };
+
+#define CELL_STYLE_INITIALIZER { CELL_STYLE_INITIALIZER__ }
+#define CELL_STYLE_INITIALIZER__ \
+ .margin = { [TABLE_HORZ][0] = 8, [TABLE_HORZ][1] = 11, \
+ [TABLE_VERT][0] = 1, [TABLE_VERT][1] = 1 }
+
+void cell_style_dump (const struct cell_style *);
+
+struct font_style
+ {
+ bool bold, italic, underline, markup;
+ struct cell_color fg[2], bg[2];
+ char *typeface;
+ int size; /* In 1/72" units. */
+ };
+
+#define FONT_STYLE_INITIALIZER { FONT_STYLE_INITIALIZER__ }
+#define FONT_STYLE_INITIALIZER__ \
+ .fg = { [0] = CELL_COLOR_BLACK, [1] = CELL_COLOR_BLACK}, \
+ .bg = { [0] = CELL_COLOR_WHITE, [1] = CELL_COLOR_WHITE},
+
+void font_style_copy (struct pool *,
+ struct font_style *, const struct font_style *);
+void font_style_uninit (struct font_style *);
+void font_style_dump (const struct font_style *);
+bool font_style_equal (const struct font_style *, const struct font_style *);
+
+struct table_area_style
+ {
+ struct cell_style cell_style;
+ struct font_style font_style;
+ };
+
+#define TABLE_AREA_STYLE_INITIALIZER { TABLE_AREA_STYLE_INITIALIZER__ }
+#define TABLE_AREA_STYLE_INITIALIZER__ \
+ .cell_style = CELL_STYLE_INITIALIZER, \
+ .font_style = FONT_STYLE_INITIALIZER
+
+struct table_area_style *table_area_style_clone (
+ struct pool *, const struct table_area_style *);
+void table_area_style_copy (struct pool *, struct table_area_style *,
+ const struct table_area_style *);
+void table_area_style_uninit (struct table_area_style *);
+void table_area_style_free (struct table_area_style *);
+
+/* Properties of a table cell. */
+enum
+ {
+ TAB_NONE = 0,
+ TAB_FIX = 1 << 1, /* Use fixed font. */
+ TAB_MARKUP = 1 << 2, /* Text contains Pango markup. */
+ TAB_NUMERIC = 1 << 3, /* Cell contents are numeric. */
+ TAB_ROTATE = 1 << 4, /* Rotate cell contents 90 degrees. */
+
+ TAB_STYLE_SHIFT = 5,
+ TAB_STYLE_MASK = 7 << TAB_STYLE_SHIFT,
+
+ /* Internal use by tab.c only. */
+ TAB_JOIN = 1 << 14,