1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 #ifndef _GNM_STYLE_CONDITIONS_H_
3 # define _GNM_STYLE_CONDITIONS_H_
10 /* This is persisted directly in .gnumeric files, DO NOT REMOVE OR REORDER */
13 GNM_STYLE_COND_BETWEEN
,
14 GNM_STYLE_COND_NOT_BETWEEN
,
16 GNM_STYLE_COND_NOT_EQUAL
,
22 /* Arbitrary expr evaluated at EvalPos */
23 GNM_STYLE_COND_CUSTOM
,
25 /* New in Gnumeric 1.8 */
26 GNM_STYLE_COND_CONTAINS_STR
= 0x10,
27 GNM_STYLE_COND_NOT_CONTAINS_STR
,
28 GNM_STYLE_COND_BEGINS_WITH_STR
,
29 GNM_STYLE_COND_NOT_BEGINS_WITH_STR
,
30 GNM_STYLE_COND_ENDS_WITH_STR
,
31 GNM_STYLE_COND_NOT_ENDS_WITH_STR
,
33 GNM_STYLE_COND_CONTAINS_ERR
,
34 GNM_STYLE_COND_NOT_CONTAINS_ERR
,
36 GNM_STYLE_COND_CONTAINS_BLANKS
,
37 GNM_STYLE_COND_NOT_CONTAINS_BLANKS
46 GType
gnm_style_cond_get_type (void);
47 GnmStyleCond
*gnm_style_cond_new (GnmStyleCondOp op
, Sheet
*sheet
);
48 void gnm_style_cond_free (GnmStyleCond
*cond
);
49 GnmStyleCond
*gnm_style_cond_dup (GnmStyleCond
const *src
);
50 gboolean
gnm_style_cond_is_valid (GnmStyleCond
const *cond
);
52 void gnm_style_cond_set_overlay (GnmStyleCond
*cond
,
55 GnmExprTop
const *gnm_style_cond_get_expr (GnmStyleCond
const *cond
,
57 void gnm_style_cond_set_expr (GnmStyleCond
*cond
,
58 GnmExprTop
const *texpr
,
61 GnmExprTop
const *gnm_style_cond_get_alternate_expr (GnmStyleCond
const *cond
);
62 void gnm_style_cond_canonicalize (GnmStyleCond
*cond
);
64 Sheet
*gnm_style_cond_get_sheet (GnmStyleCond
const *cond
);
65 void gnm_style_cond_set_sheet (GnmStyleCond
*cond
, Sheet
*sheet
);
67 GType
gnm_style_conditions_get_type (void);
68 GnmStyleConditions
*gnm_style_conditions_new (Sheet
*sheet
);
69 GnmStyleConditions
*gnm_style_conditions_dup (GnmStyleConditions
const *sc
);
70 GPtrArray
const *gnm_style_conditions_details (GnmStyleConditions
const *sc
);
71 void gnm_style_conditions_insert (GnmStyleConditions
*sc
,
72 GnmStyleCond
const *cond
,
74 void gnm_style_conditions_delete (GnmStyleConditions
*sc
,
76 GPtrArray
*gnm_style_conditions_overlay (GnmStyleConditions
const *sc
,
77 GnmStyle
const *base
);
78 int gnm_style_conditions_eval (GnmStyleConditions
const *sc
,
79 GnmEvalPos
const *pos
);
81 Sheet
*gnm_style_conditions_get_sheet (GnmStyleConditions
const *sc
);
82 void gnm_style_conditions_set_sheet (GnmStyleConditions
*sc
,
85 guint32
gnm_style_conditions_hash (GnmStyleConditions
const *sc
);
87 gboolean
gnm_style_conditions_equal (GnmStyleConditions
const *sca
,
88 GnmStyleConditions
const *scb
,
89 gboolean relax_sheet
);
93 #endif /* _GNM_STYLE_CONDITIONS_H_ */