GETENV: check for proper UTF-8.
[gnumeric.git] / src / consolidate.h
blobb8469dda22c6dbcdb6cc0c7e8f64060db4158c58
1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 #ifndef _GNM_CONSOLIDATE_H_
3 # define _GNM_CONSOLIDATE_H_
5 #include "gnumeric.h"
6 #include <tools/dao.h>
7 #include <tools/tools.h>
9 G_BEGIN_DECLS
11 typedef enum {
13 * These can be both set, both unset or
14 * one of them can be set. Indicates
15 * what sort of consolidation we will
16 * execute
18 CONSOLIDATE_ROW_LABELS = 1 << 0,
19 CONSOLIDATE_COL_LABELS = 1 << 1,
22 * If set the row and/or column labels
23 * will be copied to the destination area
25 CONSOLIDATE_COPY_LABELS = 1 << 2,
27 /* If this is set we put the outcome
28 * of our formulas into the destination
29 * otherwise we put formulas
31 CONSOLIDATE_PUT_VALUES = 1 << 3
32 } GnmConsolidateMode;
34 struct _GnmConsolidate {
35 GnmFunc *fd;
37 GSList *src;
39 GnmConsolidateMode mode;
41 /* <private> */
42 unsigned ref_count; /* boxed type */
45 GType gnm_consolidate_get_type (void);
46 GnmConsolidate *gnm_consolidate_new (void);
47 void gnm_consolidate_free (GnmConsolidate *cs, gboolean content_only);
49 void gnm_consolidate_set_function (GnmConsolidate *cs, GnmFunc *fd);
50 void gnm_consolidate_set_mode (GnmConsolidate *cs,
51 GnmConsolidateMode mode);
53 gboolean gnm_consolidate_add_source (GnmConsolidate *cs, GnmValue *range);
54 gboolean gnm_consolidate_check_destination (GnmConsolidate *cs,
55 data_analysis_output_t *dao);
57 gboolean gnm_tool_consolidate_engine (GOCmdContext *gcc, data_analysis_output_t *dao, gpointer specs,
58 analysis_tool_engine_t selector, gpointer result);
60 G_END_DECLS
62 #endif /* _GNM_CONSOLIDATE_H_ */