GtkCList row operations
- From: Evan Martin <eeyem u washington edu>
- To: gtk-devel-list redhat com
- Subject: GtkCList row operations
- Date: Wed, 24 Nov 1999 12:42:05 -0800 (PST)
Wouldn't it make more sense for the gtk_clist_* functions to operate on
GtkCListRow*'s instead of row numbers?
If I want to do an operation on each row of a clist, I currently must
write something like:
int i;
for (i = 0; i < GTK_CLIST(clist)->rows; i++)
gtk_clist_<some_operation>(GTK_CLIST(clist), i);
The clist operations all internally call g_list_nth(clist->row_list, row),
which means that this for loop iterates through (rowcount*(rowcount-1))/2
list items. I believe that translates to O(n**2) time. It would be O(n)
time with GtkCListRow*'s.
Or is there another reason to use row indicies?
Evan.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]