pivot-table: Initialize subtype, command_id for pivot tables.
[pspp] / src / output / pivot-table.h
index 657ec75ede8282bdbce7af2f7647fe93d92d81d5..c11874da2e3802efef4d291e0d352cfcea3b6186 100644 (file)
@@ -107,6 +107,7 @@ enum pivot_area
   };
 
 const char *pivot_area_to_string (enum pivot_area);
+void pivot_area_get_default_style (enum pivot_area, struct area_style *);
 
 /* Table borders for styling purposes. */
 enum pivot_border
@@ -145,6 +146,8 @@ enum pivot_border
   };
 
 const char *pivot_border_to_string (enum pivot_border);
+void pivot_border_get_default_style (enum pivot_border,
+                                     struct table_border_style *);
 
 /* Sizing for rows or columns of a rendered table.  The comments below talk
    about columns and their widths but they apply equally to rows and their
@@ -429,7 +432,7 @@ struct pivot_table
 
     /* Titles. */
     struct pivot_value *title;
-    struct pivot_value *subtype;  /* Same as pivot_item's subtype. */
+    struct pivot_value *subtype;  /* Same as spv_item's subtype. */
     struct pivot_value *corner_text;
     struct pivot_value *caption;
     char *notes;
@@ -450,7 +453,8 @@ struct pivot_table
 
 /* Creating and destroy pivot tables. */
 struct pivot_table *pivot_table_create (const char *title);
-struct pivot_table *pivot_table_create__ (struct pivot_value *title);
+struct pivot_table *pivot_table_create__ (struct pivot_value *title,
+                                          const char *subtype);
 struct pivot_table *pivot_table_create_for_text (struct pivot_value *title,
                                                  struct pivot_value *content);
 
@@ -648,7 +652,8 @@ struct pivot_value
         /* PIVOT_VALUE_TEMPLATE. */
         struct
           {
-            char *s;
+            char *local;              /* Localized. */
+            char *id;                 /* Identifier. */
             struct pivot_argument *args;
             size_t n_args;
           }
@@ -714,5 +719,13 @@ struct pivot_argument
   };
 
 void pivot_argument_uninit (struct pivot_argument *);
+\f
+/* One piece of data within a pivot table. */
+struct pivot_cell
+  {
+    struct hmap_node hmap_node; /* In struct pivot_table's 'cells' hmap. */
+    struct pivot_value *value;
+    unsigned int idx[];         /* One index per table dimension. */
+  };
 
 #endif /* output/pivot-table.h */