output: Add support for vertical alignment of cells.
[pspp] / src / output / table.h
index 919777db53ff3b90feaecc2c781e04ebae72a5b6..0a7c4b61b568e5275ac764cf4c0e1c2ad7534758 100644 (file)
@@ -48,27 +48,32 @@ enum
   {
     TAB_NONE = 0,
 
-    /* Alignment of cell contents. */
-    TAB_RIGHT      = 0 << 0,    /* Right justify. */
-    TAB_LEFT       = 1 << 0,    /* Left justify. */
-    TAB_CENTER     = 2 << 0,    /* Centered. */
-    TAB_ALIGNMENT  = 3 << 0,   /* Alignment mask. */
+    /* Horizontal alignment of cell contents. */
+    TAB_RIGHT      = 0 << 0,
+    TAB_LEFT       = 1 << 0,
+    TAB_CENTER     = 2 << 0,
+    TAB_HALIGN     = 3 << 0,   /* Alignment mask. */
+
+    /* Vertical alignment of cell contents. */
+    TAB_TOP        = 0 << 2,
+    TAB_MIDDLE     = 1 << 2,
+    TAB_BOTTOM     = 2 << 2,
+    TAB_VALIGN     = 3 << 2,   /* Alignment mask. */
 
     /* These flags may be combined with any alignment. */
-    TAB_EMPH       = 1 << 2,    /* Emphasize cell contents. */
-    TAB_FIX        = 1 << 3,    /* Use fixed font. */
+    TAB_EMPH       = 1 << 4,    /* Emphasize cell contents. */
+    TAB_FIX        = 1 << 5,    /* Use fixed font. */
 
     /* Bits with values (1 << TAB_FIRST_AVAILABLE) and higher are
        not used, so they are available for subclasses to use as
        they wish. */
-    TAB_FIRST_AVAILABLE = 4
+    TAB_FIRST_AVAILABLE = 6
   };
 
 /* Styles for the rules around table cells. */
 enum
   {
     TAL_0,                     /* No line. */
-    TAL_GAP,                    /* Spacing but no line. */
     TAL_1,                     /* Single line. */
     TAL_2,                     /* Double line. */
     N_LINES
@@ -171,8 +176,6 @@ struct table *table_from_casereader (const struct casereader *,
                                      size_t column,
                                      const char *heading,
                                      const struct fmt_spec *);
-struct table *table_create_nested (struct table *);
-struct table *table_create_nested_item (struct table_item *);
 
 /* Combining tables. */
 struct table *table_paste (struct table *, struct table *,