Updated Spanish translation
[evolution.git] / e-util / e-table-group-container.h
blobc09cd26118ff2936f0941b60be08e1ae9b225403
1 /*
3 * This program is free software; you can redistribute it and/or modify it
4 * under the terms of the GNU Lesser General Public License as published by
5 * the Free Software Foundation.
7 * This program is distributed in the hope that it will be useful, but
8 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
9 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
10 * for more details.
12 * You should have received a copy of the GNU Lesser General Public License
13 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 * Authors:
17 * Chris Lahey <clahey@ximian.com>
19 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
23 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
24 #error "Only <e-util/e-util.h> should be included directly."
25 #endif
27 #ifndef _E_TABLE_GROUP_CONTAINER_H_
28 #define _E_TABLE_GROUP_CONTAINER_H_
30 #include <libgnomecanvas/libgnomecanvas.h>
32 #include <e-util/e-table-group.h>
33 #include <e-util/e-table-header.h>
34 #include <e-util/e-table-item.h>
35 #include <e-util/e-table-model.h>
37 /* Standard GObject macros */
38 #define E_TYPE_TABLE_GROUP_CONTAINER \
39 (e_table_group_container_get_type ())
40 #define E_TABLE_GROUP_CONTAINER(obj) \
41 (G_TYPE_CHECK_INSTANCE_CAST \
42 ((obj), E_TYPE_TABLE_GROUP_CONTAINER, ETableGroupContainer))
43 #define E_TABLE_GROUP_CONTAINER_CLASS(cls) \
44 (G_TYPE_CHECK_CLASS_CAST \
45 ((cls), E_TYPE_TABLE_GROUP_CONTAINER, ETableGroupContainerClass))
46 #define E_IS_TABLE_GROUP_CONTAINER(obj) \
47 (G_TYPE_CHECK_INSTANCE_TYPE \
48 ((obj), E_TYPE_TABLE_GROUP_CONTAINER))
49 #define E_IS_TABLE_GROUP_CONTAINER_CLASS(cls) \
50 (G_TYPE_CHECK_CLASS_TYPE \
51 ((cls), E_TYPE_TABLE_GROUP_CONTAINER))
52 #define E_TABLE_GROUP_CONTAINER_GET_CLASS(obj) \
53 (G_TYPE_INSTANCE_GET_CLASS \
54 ((obj), E_TYPE_TABLE_GROUP_CONTAINER, ETableGroupContainerClass))
56 G_BEGIN_DECLS
58 typedef struct _ETableGroupContainer ETableGroupContainer;
59 typedef struct _ETableGroupContainerClass ETableGroupContainerClass;
61 typedef struct _ETableGroupContainerChildNode ETableGroupContainerChildNode;
63 struct _ETableGroupContainer {
64 ETableGroup group;
67 * The ETableCol used to group this set
69 ETableCol *ecol;
70 gint ascending;
73 * List of ETableGroups we stack
75 GList *children;
78 * The canvas rectangle that contains the children
80 GnomeCanvasItem *rect;
82 PangoFontDescription *font_desc;
84 gdouble width, height, minimum_width;
86 ETableSortInfo *sort_info;
87 gint n;
88 gint length_threshold;
90 ESelectionModel *selection_model;
92 guint alternating_row_colors : 1;
93 guint horizontal_draw_grid : 1;
94 guint vertical_draw_grid : 1;
95 guint draw_focus : 1;
96 guint uniform_row_height : 1;
97 ECursorMode cursor_mode;
100 * State: the ETableGroup is open or closed
102 guint open : 1;
105 struct _ETableGroupContainerClass {
106 ETableGroupClass parent_class;
109 struct _ETableGroupContainerChildNode {
110 ETableGroup *child;
111 gpointer key;
112 gchar *string;
113 GnomeCanvasItem *text;
114 GnomeCanvasItem *rect;
115 gint count;
118 GType e_table_group_container_get_type
119 (void) G_GNUC_CONST;
120 ETableGroup * e_table_group_container_new (GnomeCanvasGroup *parent,
121 ETableHeader *full_header,
122 ETableHeader *header,
123 ETableModel *model,
124 ETableSortInfo *sort_info,
125 gint n);
126 void e_table_group_container_construct
127 (GnomeCanvasGroup *parent,
128 ETableGroupContainer *etgc,
129 ETableHeader *full_header,
130 ETableHeader *header,
131 ETableModel *model,
132 ETableSortInfo *sort_info,
133 gint n);
134 gboolean e_table_group_container_is_editing
135 (ETableGroupContainer *etgc);
137 G_END_DECLS
139 #endif /* _E_TABLE_GROUP_CONTAINER_H_ */