output-item: Make command name part of every output_item.
[pspp] / src / output / table-item.h
index 1cc92eaf5dc27c2f7e4587cc4a3bf8160f194f7c..be0987659684ef68fdeba2f23e9d80d9e0506074 100644 (file)
 
 #include "libpspp/compiler.h"
 #include "output/output-item.h"
-
-/* Title or caption in a table item. */
-struct table_item_text
-  {
-    char *content;
-    const struct footnote **footnotes;
-    size_t n_footnotes;
-    struct cell_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 *);
+#include "output/table.h"
 
 /* A table item.
 
@@ -47,25 +35,13 @@ void table_item_text_destroy (struct table_item_text *);
    of the accessor functions defined below. */
 struct table_item
   {
-    struct output_item output_item;  /* Superclass. */
-    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 output_item output_item;   /* Superclass. */
+    struct pivot_table *pt;           /* The table to be rendered. */
 
-struct table_item *table_item_create (struct table *, const char *title,
-                                      const char *caption);
-
-const struct table *table_item_get_table (const struct table_item *);
-
-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 *);
+    char *cached_label;
+  };
 
-const struct table_item_text *table_item_get_caption (
-  const struct table_item *);
-void table_item_set_caption (struct table_item *,
-                             const struct table_item_text *);
+struct table_item *table_item_create (struct pivot_table *);
 \f
 /* This boilerplate for table_item, a subclass of output_item, was
    autogenerated by mk-class-boilerplate. */
@@ -122,5 +98,5 @@ table_item_is_shared (const struct table_item *instance)
 }
 
 void table_item_submit (struct table_item *);
-\f
+
 #endif /* output/table-item.h */