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
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/>.
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."
27 #ifndef E_SELECTION_MODEL_ARRAY_H
28 #define E_SELECTION_MODEL_ARRAY_H
30 #include <e-util/e-bit-array.h>
31 #include <e-util/e-selection-model.h>
33 /* Standard GObject macros */
34 #define E_TYPE_SELECTION_MODEL_ARRAY \
35 (e_selection_model_array_get_type ())
36 #define E_SELECTION_MODEL_ARRAY(obj) \
37 (G_TYPE_CHECK_INSTANCE_CAST \
38 ((obj), E_TYPE_SELECTION_MODEL_ARRAY, ESelectionModelArray))
39 #define E_SELECTION_MODEL_ARRAY_CLASS(cls) \
40 (G_TYPE_CHECK_CLASS_CAST \
41 ((cls), E_TYPE_SELECTION_MODEL_ARRAY, ESelectionModelArrayClass))
42 #define E_IS_SELECTION_MODEL_ARRAY(obj) \
43 (G_TYPE_CHECK_INSTANCE_TYPE \
44 ((obj), E_TYPE_SELECTION_MODEL_ARRAY))
45 #define E_IS_SELECTION_MODEL_ARRAY_CLASS(cls) \
46 (G_TYPE_CHECK_CLASS_TYPE \
47 ((cls), E_TYPE_SELECTION_MODEL_ARRAY))
48 #define E_SELECTION_MODEL_ARRAY_GET_CLASS(obj) \
49 (G_TYPE_INSTANCE_GET_CLASS \
50 ((obj), E_TYPE_SELECTION_MODEL_ARRAY, ESelectionModelArrayClass))
54 typedef struct _ESelectionModelArray ESelectionModelArray
;
55 typedef struct _ESelectionModelArrayClass ESelectionModelArrayClass
;
57 struct _ESelectionModelArray
{
58 ESelectionModel parent
;
64 gint selection_start_row
;
65 gint cursor_row_sorted
; /* cursor_row passed through base::sorter if necessary */
67 guint model_changed_id
;
68 guint model_row_inserted_id
, model_row_deleted_id
;
70 /* Anything other than -1 means that the selection is a single
71 * row. This being -1 does not impart any information. */
74 /* Anything other than -1 means that the selection is a all
75 * rows between selection_start_path and cursor_path where
76 * selected_range_end is the rwo number of cursor_path. This
77 * being -1 does not impart any information. */
78 gint selected_range_end
;
81 guint selection_model_changed
: 1;
82 guint group_info_changed
: 1;
85 struct _ESelectionModelArrayClass
{
86 ESelectionModelClass parent_class
;
89 (ESelectionModelArray
*selection
);
92 GType e_selection_model_array_get_type
94 void e_selection_model_array_insert_rows
95 (ESelectionModelArray
*selection
,
98 void e_selection_model_array_delete_rows
99 (ESelectionModelArray
*selection
,
102 void e_selection_model_array_move_row
103 (ESelectionModelArray
*selection
,
106 void e_selection_model_array_confirm_row_count
107 (ESelectionModelArray
*selection
);
108 gint e_selection_model_array_get_row_count
109 (ESelectionModelArray
*selection
);
113 #endif /* E_SELECTION_MODEL_ARRAY_H */