Fix parsing of some more .tlo files.
[pspp] / src / output / table-item.h
index 4e070ddabf778ef001eadb22b412971842efd044..eb3dcb16ea440ba9db1da0eb15c44836941eaef3 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "libpspp/compiler.h"
 #include "output/output-item.h"
+#include "output/table.h"
 
 /* Title or caption in a table item. */
 struct table_item_text
@@ -34,12 +35,35 @@ struct table_item_text
     char *content;
     const struct footnote **footnotes;
     size_t n_footnotes;
+    struct table_area_style *style;
   };
 
 struct table_item_text *table_item_text_create (const char *);
 struct table_item_text *table_item_text_clone (const struct table_item_text *);
 void table_item_text_destroy (struct table_item_text *);
 
+struct table_item_layer
+  {
+    char *content;
+    const struct footnote **footnotes;
+    size_t n_footnotes;
+  };
+
+void table_item_layer_copy (struct table_item_layer *,
+                            const struct table_item_layer *);
+void table_item_layer_uninit (struct table_item_layer *);
+
+struct table_item_layers
+  {
+    struct table_item_layer *layers;
+    size_t n_layers;
+    struct table_area_style *style;
+  };
+
+struct table_item_layers *table_item_layers_clone (
+  const struct table_item_layers *);
+void table_item_layers_destroy (struct table_item_layers *);
+
 /* A table item.
 
    The members of struct table_item should not be accessed directly.  Use one
@@ -50,6 +74,8 @@ struct table_item
     struct table *table;             /* The table to be rendered. */
     struct table_item_text *title;   /* Null if there is no title. */
     struct table_item_text *caption; /* Null if there is no caption. */
+    struct table_item_layers *layers; /* Null if there is no layer info. */
+    struct pivot_table *pt;
   };
 
 struct table_item *table_item_create (struct table *, const char *title,
@@ -61,6 +87,11 @@ const struct table_item_text *table_item_get_title (const struct table_item *);
 void table_item_set_title (struct table_item *,
                            const struct table_item_text *);
 
+const struct table_item_layers *table_item_get_layers (
+  const struct table_item *);
+void table_item_set_layers (struct table_item *,
+                           const struct table_item_layers *);
+
 const struct table_item_text *table_item_get_caption (
   const struct table_item *);
 void table_item_set_caption (struct table_item *,