Updated Spanish translation
[evolution.git] / filter / e-filter-option.h
blob45d426b76140bdb3e187f523e7e1a294a7cf19b0
1 /*
2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU Lesser General Public
4 * License as published by the Free Software Foundation; either
5 * version 2 of the License, or (at your option) version 3.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details.
12 * You should have received a copy of the GNU Lesser General Public
13 * License along with the program; if not, see <http://www.gnu.org/licenses/>
16 * Authors:
17 * Not Zed <notzed@lostzed.mmc.com.au>
18 * Jeffrey Stedfast <fejj@ximian.com>
20 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
24 #ifndef E_FILTER_OPTION_H
25 #define E_FILTER_OPTION_H
27 #include "e-filter-element.h"
29 /* Standard GObject macros */
30 #define E_TYPE_FILTER_OPTION \
31 (e_filter_option_get_type ())
32 #define E_FILTER_OPTION(obj) \
33 (G_TYPE_CHECK_INSTANCE_CAST \
34 ((obj), E_TYPE_FILTER_OPTION, EFilterOption))
35 #define E_FILTER_OPTION_CLASS(cls) \
36 (G_TYPE_CHECK_CLASS_CAST \
37 ((cls), E_TYPE_FILTER_OPTION, EFilterOptionClass))
38 #define E_IS_FILTER_OPTION(obj) \
39 (G_TYPE_CHECK_INSTANCE_TYPE \
40 ((obj), E_TYPE_FILTER_OPTION))
41 #define E_IS_FILTER_OPTION_CLASS(cls) \
42 (G_TYPE_CHECK_CLASS_TYPE \
43 ((cls), E_TYPE_FILTER_OPTION))
44 #define E_FILTER_OPTION_GET_CLASS(obj) \
45 (G_TYPE_INSTANCE_GET_CLASS \
46 ((obj), E_TYPE_FILTER_OPTION, EFilterOptionClass))
48 G_BEGIN_DECLS
50 typedef struct _EFilterOption EFilterOption;
51 typedef struct _EFilterOptionClass EFilterOptionClass;
52 typedef struct _EFilterOptionPrivate EFilterOptionPrivate;
54 struct _filter_option {
55 gchar *title; /* button title */
56 gchar *value; /* value, if it has one */
57 gchar *code; /* used to string code segments together */
59 gboolean is_dynamic; /* whether is the option dynamic, FALSE if static */
62 struct _EFilterOption {
63 EFilterElement parent;
64 EFilterOptionPrivate *priv;
66 const gchar *type; /* static memory, type name written to xml */
68 GList *options;
69 struct _filter_option *current;
70 gchar *dynamic_func; /* name of the dynamic fill func, called in get_widget */
73 struct _EFilterOptionClass {
74 EFilterElementClass parent_class;
77 GType e_filter_option_get_type (void);
78 EFilterElement *e_filter_option_new (void);
79 void e_filter_option_set_current (EFilterOption *option,
80 const gchar *name);
81 const gchar * e_filter_option_get_current (EFilterOption *option);
82 struct _filter_option *
83 e_filter_option_add (EFilterOption *option,
84 const gchar *name,
85 const gchar *title,
86 const gchar *code,
87 gboolean is_dynamic);
88 void e_filter_option_remove_all (EFilterOption *option);
90 G_END_DECLS
92 #endif /* E_FILTER_OPTION_H */