aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-group.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-02-24 07:00:09 +0800
committerChris Lahey <clahey@src.gnome.org>2001-02-24 07:00:09 +0800
commit40d58afa7ce854ae8154a7f0ce32997f57d99ea4 (patch)
tree70cac56e91a6a9c056218837dc14be298f8befd6 /widgets/table/e-table-group.c
parent669c08181079cc48352959b829f578ea922351a6 (diff)
downloadgsoc2013-evolution-40d58afa7ce854ae8154a7f0ce32997f57d99ea4.tar
gsoc2013-evolution-40d58afa7ce854ae8154a7f0ce32997f57d99ea4.tar.gz
gsoc2013-evolution-40d58afa7ce854ae8154a7f0ce32997f57d99ea4.tar.bz2
gsoc2013-evolution-40d58afa7ce854ae8154a7f0ce32997f57d99ea4.tar.lz
gsoc2013-evolution-40d58afa7ce854ae8154a7f0ce32997f57d99ea4.tar.xz
gsoc2013-evolution-40d58afa7ce854ae8154a7f0ce32997f57d99ea4.tar.zst
gsoc2013-evolution-40d58afa7ce854ae8154a7f0ce32997f57d99ea4.zip
Added e-table/e-table-sorting-utils.lo.
2001-02-23 Christopher James Lahey <clahey@ximian.com> * gal/Makefile.am (libgal_la_LIBADD): Added e-table/e-table-sorting-utils.lo. From gal/e-table/ChangeLog: 2001-02-23 Christopher James Lahey <clahey@ximian.com> * Makefile.am (libetable_la_SOURCES): Added e-table-sorting-utils.c. (libetableinclude_HEADERS): Added e-table-sorting-utils.h. * e-table-group-container.c: Implemented add_array method. Use add_array to implement add_all instead of using add. Did some general clean up. * e-table-group-leaf.c, e-table-group-leaf.h: Implemented add_array method. Changed everything to use an ETableSubset variable instead of an ETableSortedVariable. Implemented it as ETableSortedVariable if there's grouping involved and ETableSorted if there isn't. * e-table-group.c, e-table-group.h: Added add_array method. Added unused get_position code. * e-table-sorted-variable.c, e-table-sorted-variable.h: Moved a lot of the actual implementation of sorting to e-table-sorting-utils.c. Got rid of the signal handlers here since we weren't using them and ETableSubset has the proxy virtual methods. * e-table-sorted.c, e-table-sorted.h: Completely replaced these files with a variation on ETableSortedVariable that doesn't have the add methods and such but instead just mimics the source model's set of rows completely. * e-table-sorter.c, e-table-sorter.h: Added functions to get at the arrays here. * e-table-sorting-utils.c, e-table-sorting-utils.h: Utility functions for doing sorting. * e-table-subset-variable.c, e-table-subset-variable.h: Added add_array method. * e-table-subset.c, e-table-subset.h: Made it so that the signal hookups to the source model's signals are virtual methods. * e-table.c, e-table.h: Don't call add_all and add and remove type functions if not grouped. Don't rebuild for sort changes unless it was either grouped before or will be grouped now. svn path=/trunk/; revision=8374
Diffstat (limited to 'widgets/table/e-table-group.c')
-rw-r--r--widgets/table/e-table-group.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index d87546db0d..0b09b38351 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -135,6 +135,27 @@ e_table_group_add (ETableGroup *etg,
}
/**
+ * e_table_group_add_array
+ * @etg: The %ETableGroup to add to
+ * @array: The array to add.
+ * @count: The number of times to add
+ *
+ * This routine adds all the rows in the array to this set of rows.
+ * It assumes that the array is already sorted properly.
+ */
+void
+e_table_group_add_array (ETableGroup *etg,
+ const int *array,
+ int count)
+{
+ g_return_if_fail (etg != NULL);
+ g_return_if_fail (E_IS_TABLE_GROUP (etg));
+
+ if (ETG_CLASS (etg)->add_array)
+ ETG_CLASS (etg)->add_array (etg, array, count);
+}
+
+/**
* e_table_group_add_all
* @etg: The %ETableGroup to add to
*
@@ -346,6 +367,30 @@ e_table_group_compute_location (ETableGroup *etg, int *x, int *y, int *row, int
}
/**
+ * e_table_group_get_position
+ * @eti: %ETableGroup to look in.
+ * @x: A pointer to the location to store the found x location in.
+ * @y: A pointer to the location to store the found y location in.
+ * @row: A pointer to the row number to find.
+ * @col: A pointer to the col number to find.
+ *
+ * This routine finds the view cell (row, col) in the %ETableGroup.
+ * If that location is in the %ETableGroup *x and *y are set to the
+ * upper left hand corner of the cell found. If that location is not
+ * in the %ETableGroup, the number of rows in the %ETableGroup is
+ * removed from the value row points to.
+ */
+void
+e_table_group_get_position (ETableGroup *etg, int *x, int *y, int *row, int *col)
+{
+ g_return_if_fail (etg != NULL);
+ g_return_if_fail (E_IS_TABLE_GROUP (etg));
+
+ if (ETG_CLASS (etg)->get_position)
+ ETG_CLASS (etg)->get_position (etg, x, y, row, col);
+}
+
+/**
* e_table_group_cursor_change
* @eti: %ETableGroup to emit the signal on
* @row: The new cursor row (model row)
@@ -537,6 +582,7 @@ etg_class_init (GtkObjectClass *object_class)
klass->key_press = NULL;
klass->add = NULL;
+ klass->add_array = NULL;
klass->add_all = NULL;
klass->remove = NULL;
klass->row_count = NULL;
@@ -546,6 +592,7 @@ etg_class_init (GtkObjectClass *object_class)
klass->get_focus = etg_get_focus;
klass->get_printable = NULL;
klass->compute_location = NULL;
+ klass->get_position = NULL;
etg_parent_class = gtk_type_class (PARENT_TYPE);