diff options
author | Stefan Jeske <stefan@gtk.org> | 1998-08-05 20:02:32 +0000 |
---|---|---|
committer | Stefan Jeske <stefan@src.gnome.org> | 1998-08-05 20:02:32 +0000 |
commit | c8df83a2fee148d871b36ca5ac742dc566c64612 (patch) | |
tree | 37dcd8897135303e9db3ca6e858f53c6b095455b /gtk/gtkenums.h | |
parent | e48d4e715947f7b976e14dcdb8bb431c60c485cc (diff) | |
download | gtk+-c8df83a2fee148d871b36ca5ac742dc566c64612.tar.gz |
new enum GtkSortType.
Wed Aug 5 21:12:37 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkenums.h: new enum GtkSortType.
* gtk/gtkclist.h:
* gtk/gtkclist.c:
Added sorting capabilities to GtkCList. New APIs :
gtk_clist_set_compare_func, gtk_clist_set_sort_column,
gtk_clist_set_sort_type, gtk_clist_sort, gtk_clist_set_auto_sort.
New internal functions : default_compare, merge, mergesort.
(gtk_clist_append): This is just a wrapper for gtk_clist_insert now.
(gtk_clist_insert): Modified to handle gtk_clist_append and the
auto sort flag. Changed the return value from void to gint to
return the row number where the element was actually inserted.
(gtk_clist_swap_rows): Return immediately if auto sort flag is set.
* gtk/gtkctree.h:
* gtk/gtkctree.c:
Removed the auto_sort flag, replaced ctree->node_compare with
clist->compare all over the place, modified default_compare to
match clist's needs. Removed API´s : gtk_ctree_set_auto_sort,
gtk_ctree_set_compare_func. Removed GtkCTreeCompareFunc typedef.
* gtk/testgtk.c: Modified clist/ctree samples to demonstrate
sorting. The lists can be sorted by a column by clicking the
corresponding title button.
Diffstat (limited to 'gtk/gtkenums.h')
-rw-r--r-- | gtk/gtkenums.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h index ecfe5ca95a..86504ea756 100644 --- a/gtk/gtkenums.h +++ b/gtk/gtkenums.h @@ -305,6 +305,13 @@ typedef enum GTK_WINDOW_POPUP } GtkWindowType; +/* How to sort */ +typedef enum +{ + GTK_SORT_ASCENDING, + GTK_SORT_DESCENDING +} GtkSortType; + #ifdef __cplusplus } #endif /* __cplusplus */ |