X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Ftable-item.h;h=e4c40ab228c5ce959a90c828053cb70f24150528;hb=2720633be76a46488e05bb9a0d45f24a89375065;hp=1cc92eaf5dc27c2f7e4587cc4a3bf8160f194f7c;hpb=37a14e6b8ab908b2c23d77e0cb6a9085fe2d73e1;p=pspp diff --git a/src/output/table-item.h b/src/output/table-item.h index 1cc92eaf5d..e4c40ab228 100644 --- a/src/output/table-item.h +++ b/src/output/table-item.h @@ -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,27 +35,52 @@ struct table_item_text char *content; const struct footnote **footnotes; size_t n_footnotes; - struct cell_style *style; + 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 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 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. */ + char *notes; /* Shown as tooltip. */ + struct pivot_table *pt; }; struct table_item *table_item_create (struct table *, const char *title, - const char *caption); + const char *caption, const char *notes); const struct table *table_item_get_table (const struct table_item *); @@ -62,10 +88,18 @@ 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 *, const struct table_item_text *); + +const char *table_item_get_notes (const struct table_item *); +void table_item_set_notes (struct table_item *, const char *notes); /* This boilerplate for table_item, a subclass of output_item, was autogenerated by mk-class-boilerplate. */