projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
output view: make items selectable and use system colours
[pspp]
/
src
/
output
/
pivot-table.h
diff --git
a/src/output/pivot-table.h
b/src/output/pivot-table.h
index 657ec75ede8282bdbce7af2f7647fe93d92d81d5..377579a013d356b3f5feb4cea5959381be201ae8 100644
(file)
--- a/
src/output/pivot-table.h
+++ b/
src/output/pivot-table.h
@@
-107,6
+107,7
@@
enum pivot_area
};
const char *pivot_area_to_string (enum pivot_area);
};
const char *pivot_area_to_string (enum pivot_area);
+const struct area_style *pivot_area_get_default_style (enum pivot_area);
/* Table borders for styling purposes. */
enum pivot_border
/* Table borders for styling purposes. */
enum pivot_border
@@
-145,6
+146,8
@@
enum pivot_border
};
const char *pivot_border_to_string (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
/* 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
@@
-218,7
+221,7
@@
struct pivot_axis
breaks out of the loop prematurely, it needs to free it with free(). */
#define PIVOT_AXIS_FOR_EACH(INDEXES, AXIS) \
for ((INDEXES) = NULL; \
breaks out of the loop prematurely, it needs to free it with free(). */
#define PIVOT_AXIS_FOR_EACH(INDEXES, AXIS) \
for ((INDEXES) = NULL; \
- ((INDEXES) = pivot_axis_iterator_next (INDEXES, AXIS)) != NULL;
)
+ ((INDEXES) = pivot_axis_iterator_next (INDEXES, AXIS)) != NULL;)
size_t *pivot_axis_iterator_next (size_t *indexes, const struct pivot_axis *);
\f
/* Dimensions.
size_t *pivot_axis_iterator_next (size_t *indexes, const struct pivot_axis *);
\f
/* Dimensions.
@@
-382,6
+385,7
@@
struct pivot_table
bool rotate_outer_row_labels;
bool row_labels_in_corner;
bool show_grid_lines;
bool rotate_outer_row_labels;
bool row_labels_in_corner;
bool show_grid_lines;
+ bool show_caption;
bool omit_empty; /* Omit empty rows and columns? */
size_t *current_layer; /* axis[PIVOT_AXIS_LAYER].n_dimensions elements. */
char *table_look;
bool omit_empty; /* Omit empty rows and columns? */
size_t *current_layer; /* axis[PIVOT_AXIS_LAYER].n_dimensions elements. */
char *table_look;
@@
-429,7
+433,7
@@
struct pivot_table
/* Titles. */
struct pivot_value *title;
/* 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;
struct pivot_value *corner_text;
struct pivot_value *caption;
char *notes;
@@
-450,7
+454,8
@@
struct pivot_table
/* Creating and destroy pivot tables. */
struct pivot_table *pivot_table_create (const char *title);
/* 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);
struct pivot_table *pivot_table_create_for_text (struct pivot_value *title,
struct pivot_value *content);
@@
-497,6
+502,7
@@
struct pivot_footnote
size_t idx;
struct pivot_value *content;
struct pivot_value *marker;
size_t idx;
struct pivot_value *content;
struct pivot_value *marker;
+ bool show;
};
struct pivot_footnote *pivot_table_create_footnote (
};
struct pivot_footnote *pivot_table_create_footnote (
@@
-595,7
+601,10
@@
struct pivot_value
{
struct font_style *font_style;
struct cell_style *cell_style;
{
struct font_style *font_style;
struct cell_style *cell_style;
- char *subscript;
+
+ char **subscripts;
+ size_t n_subscripts;
+
char *superscript;
const struct pivot_footnote **footnotes;
char *superscript;
const struct pivot_footnote **footnotes;
@@
-648,7
+657,8
@@
struct pivot_value
/* PIVOT_VALUE_TEMPLATE. */
struct
{
/* PIVOT_VALUE_TEMPLATE. */
struct
{
- char *s;
+ char *local; /* Localized. */
+ char *id; /* Identifier. */
struct pivot_argument *args;
size_t n_args;
}
struct pivot_argument *args;
size_t n_args;
}
@@
-702,7
+712,8
@@
void pivot_value_destroy (struct pivot_value *);
/* Styling. */
void pivot_value_get_style (struct pivot_value *,
/* Styling. */
void pivot_value_get_style (struct pivot_value *,
- const struct area_style *default_style,
+ const struct font_style *base_font_style,
+ const struct cell_style *base_cell_style,
struct area_style *);
void pivot_value_set_style (struct pivot_value *, const struct area_style *);
struct area_style *);
void pivot_value_set_style (struct pivot_value *, const struct area_style *);
@@
-714,5
+725,13
@@
struct pivot_argument
};
void pivot_argument_uninit (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 */
#endif /* output/pivot-table.h */