enum table_axis
{
TABLE_HORZ,
- TABLE_VERT,
- TABLE_N_AXES
+ TABLE_VERT
+#define TABLE_N_AXES 2
};
struct cell_color
uint8_t alpha, r, g, b;
};
-#define CELL_COLOR(r, g, b) (struct cell_color) { 255, r, g, b }
+#define CELL_COLOR(r, g, b) { 255, r, g, b }
#define CELL_COLOR_BLACK CELL_COLOR (0, 0, 0)
#define CELL_COLOR_WHITE CELL_COLOR (255, 255, 255)
enum
{
TAB_NONE = 0,
- TAB_EMPH = 1 << 0, /* Emphasize cell contents. */
TAB_FIX = 1 << 1, /* Use fixed font. */
TAB_MARKUP = 1 << 2, /* Text contains Pango markup. */
TAB_NUMERIC = 1 << 3, /* Cell contents are numeric. */
/* Given line styles A and B (each one of the TAL_* enumeration constants
above), returns a line style that "combines" them, that is, that gives a
reasonable line style choice for a rule for different reasons should have
- both styles A and B.
-
- Used especially for pasting tables together (see table_paste()). */
+ both styles A and B. */
static inline int table_rule_combine (int a, int b)
{
return a > b ? a : b;
struct table *table_ref (const struct table *);
void table_unref (struct table *);
bool table_is_shared (const struct table *);
-struct table *table_unshare (struct table *);
/* Returns the number of columns or rows, respectively, in T. */
static inline int table_nc (const struct table *t)
/* Simple kinds of tables. */
struct table *table_from_string (enum table_halign, const char *);
-struct table *table_from_variables (unsigned int options,
- struct variable **, size_t);
-struct table *table_from_casereader (const struct casereader *,
- size_t column,
- const char *heading,
- const struct fmt_spec *);
-
-/* Combining tables. */
-struct table *table_paste (struct table *, struct table *,
- enum table_axis orientation);
-struct table *table_hpaste (struct table *left, struct table *right);
-struct table *table_vpaste (struct table *top, struct table *bottom);
-
-/* Taking subsets of tables. */
-struct table *table_select (struct table *, int rect[TABLE_N_AXES][2]);
-struct table *table_select_slice (struct table *, enum table_axis,
- int z0, int z1, bool add_headers);
-struct table *table_select_columns (struct table *,
- int x0, int x1, bool add_headers);
-struct table *table_select_rows (struct table *,
- int y0, int y1, bool add_headers);
-
-/* Miscellaneous table operations. */
-struct table *table_transpose (struct table *);
#endif /* output/table.h */