Update Spanish translation
[gnumeric.git] / src / expr-name.h
bloba64bb43e0f843176b3d5ae61c8ba9c56e833464e
1 #ifndef _GNM_EXPR_NAME_H_
2 # define _GNM_EXPR_NAME_H_
4 #include <gnumeric.h>
5 #include <position.h>
6 #include <goffice/goffice.h>
8 G_BEGIN_DECLS
10 struct _GnmNamedExpr {
11 int ref_count;
12 GOString *name;
13 GnmParsePos pos;
14 GHashTable *dependents;
15 GnmExprTop const *texpr;
16 gboolean is_placeholder;
17 gboolean is_hidden;
18 gboolean is_permanent;
19 gboolean is_editable;
20 GnmNamedExprCollection *scope;
23 gboolean expr_name_validate (const char *name);
25 GType gnm_named_expr_get_type (void);
26 GnmNamedExpr *expr_name_new (char const *name);
27 GnmNamedExpr *expr_name_lookup (GnmParsePos const *pos, char const *name);
28 GnmNamedExpr *expr_name_add (GnmParsePos const *pp, char const *name,
29 GnmExprTop const *texpr, char **error_msg,
30 gboolean link_to_container,
31 GnmNamedExpr *stub);
32 void expr_name_perm_add (Sheet *sheet,
33 char const *name,
34 GnmExprTop const *texpr,
35 gboolean is_editable);
36 GnmNamedExpr *expr_name_ref (GnmNamedExpr *nexpr);
37 void expr_name_unref (GnmNamedExpr *nexpr);
38 void expr_name_remove (GnmNamedExpr *nexpr);
39 GnmValue*expr_name_eval (GnmNamedExpr const *nexpr,
40 GnmEvalPos const *pos,
41 GnmExprEvalFlags flags);
43 const char *expr_name_name (GnmNamedExpr const *nexpr);
44 gboolean expr_name_set_name (GnmNamedExpr *nexpr, const char *new_name);
46 gboolean expr_name_is_placeholder (GnmNamedExpr const *ne);
47 void expr_name_set_is_placeholder (GnmNamedExpr *nexpr, gboolean is_placeholder);
49 char *expr_name_as_string (GnmNamedExpr const *nexpr, GnmParsePos const *pp,
50 GnmConventions const *fmt);
51 char *expr_name_set_pos (GnmNamedExpr *nexpr, GnmParsePos const *pp);
52 void expr_name_set_expr (GnmNamedExpr *nexpr, GnmExprTop const *texpr);
53 void expr_name_add_dep (GnmNamedExpr *nexpr, GnmDependent *dep);
54 void expr_name_remove_dep (GnmNamedExpr *nexpr, GnmDependent *dep);
55 gboolean expr_name_is_active (GnmNamedExpr const *nexpr);
56 void expr_name_downgrade_to_placeholder (GnmNamedExpr *nexpr);
57 gboolean expr_name_in_use (GnmNamedExpr *nexpr);
59 int expr_name_cmp_by_name (GnmNamedExpr const *a, GnmNamedExpr const *b);
60 gboolean expr_name_check_for_loop (char const *name, GnmExprTop const *texpr);
62 char const *sheet_names_check (Sheet const *sheet, GnmRange const *r);
64 GOUndo *expr_name_set_expr_undo_new (GnmNamedExpr *nexpr);
66 /******************************************************************************/
68 GType gnm_named_expr_collection_get_type (void);
69 GnmNamedExprCollection *gnm_named_expr_collection_new (void);
70 void gnm_named_expr_collection_free (GnmNamedExprCollection *names);
71 void gnm_named_expr_collection_unlink (GnmNamedExprCollection *names);
72 void gnm_named_expr_collection_relink (GnmNamedExprCollection *names);
73 void gnm_named_expr_collection_foreach (GnmNamedExprCollection *names,
74 GHFunc func,
75 gpointer data);
76 GSList *gnm_named_expr_collection_list (GnmNamedExprCollection const *scope);
78 GnmNamedExpr *gnm_named_expr_collection_lookup (GnmNamedExprCollection const *scope,
79 char const *name);
80 void gnm_named_expr_collection_dump (GnmNamedExprCollection *names,
81 const char *id);
82 gboolean gnm_named_expr_collection_sanity_check (GnmNamedExprCollection *names,
83 const char *id);
85 G_END_DECLS
87 #endif /* _GNM_EXPR_NAME_H_ */