diff options
author | Lars Hamann <lars@gtk.org> | 1998-07-31 20:48:06 +0000 |
---|---|---|
committer | Lars Hamann <lars@src.gnome.org> | 1998-07-31 20:48:06 +0000 |
commit | 8ad52d10249a4ee97fb6b84a8c798f03fa45c7bd (patch) | |
tree | 6f1edea6def97d695832410cd5179cf947cebef8 /gtk/gtklist.h | |
parent | cf7b958af57a768e075bb3961771eb11248453d2 (diff) | |
download | gtk+-8ad52d10249a4ee97fb6b84a8c798f03fa45c7bd.tar.gz |
Few fixes for column resize. Store resize column in clist->drag_pos.
Fri Jul 31 20:45:07 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_button_press) (gtk_clist_motion)
(gtk_clist_button_release) (new_column_width): Few fixes for
column resize. Store resize column in clist->drag_pos.
Thu Jul 31 15:18:36 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h
* gtk/gtkctree.c
* gtk/testgtk.c : New typedef GtkCTreeNode, changed all GList *node
to GtkCTreeNode *node.
* gtk/gtklist.h : added extended selection mode and auto scrolling.
(struct _GtkList): removed unneeded variables timer, button,
selection_start_pos, selection_end_pos, scroll_direction, have_grab.
Added new variables undo_selection, undo_unselection, last_focus_child,
undo_focus_child, htimer, vtimer, anchor, drag_pos, anchor_state,
drag_selection, add_mode.
New functions :
(gtk_list_extend_selection), (gtk_list_start_selection),
(gtk_list_end_selection), (gtk_list_select_all),
(gtk_list_unselect_all), (gtk_list_scroll_horizontal),
(gtk_list_scroll_vertical), (gtk_list_toggle_add_mode),
(gtk_list_toggle_focus_row), (gtk_list_toggle_row),
(gtk_list_undo_selection), (gtk_list_end_drag_selection)
* gtk/gtklist.c :
(gtk_list_enter_notify): removed, because auto scrolling now works
with gtk_list_motion_notify
New functions, needed for auto scrolling :
(gtk_list_motion_notify) (gtk_list_move_focus_child)
New functions for extended selection support :
(gtk_list_set_anchor), (gtk_list_fake_unselect_all),
(gtk_list_fake_toggle_row), (gtk_list_update_extended_selection),
(gtk_list_focus_lost)
(gtk_list_set_focus_child): modified gtk_container_set_focus_child
function to support auto scrolling, and avoid out-of-sync errors in
case auf GTK_SELECTION_BROWSE
(gtk_list_focus): modified gtk_container_focus function to avoid out
off sync errors in case auf GTK_SELECTION_EXTENDED
* gtk/gtklistitem.h
* gtk/gtklistitem.c :
New signal functions for key binding support :
(toggle_focus_row), (select_all), (list_item), (unselect_all)
(list_item), (undo_selection), (start_selection), (end_selection)
(extend_selection), (scroll_horizontal), (scroll_vertical),
(toggle_add_mode)
(gtk_list_item_realize): added GDK_KEY_PRESS_MASK |
GDK_KEY_RELEASE_MASK
(gtk_list_item_draw_focus): modify gc if parent has add_mode set.
* gtk/gtkcombo.c :
(gtk_combo_popup_button_press): grab pointer for combo->list
(gtk_combo_button_release): ungrab only if combo->popwin HAS_GRAB
(gtk_combo_list_key_press): take care of which child HAS_GRAB
(gtk_comb_init): don't connect combo->button with button_release_event
Diffstat (limited to 'gtk/gtklist.h')
-rw-r--r-- | gtk/gtklist.h | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/gtk/gtklist.h b/gtk/gtklist.h index ef6a3d5e69..368e9fcfdd 100644 --- a/gtk/gtklist.h +++ b/gtk/gtklist.h @@ -23,7 +23,7 @@ #include <gdk/gdk.h> #include <gtk/gtkenums.h> #include <gtk/gtkcontainer.h> - +#include <gtk/gtklistitem.h> #ifdef __cplusplus extern "C" { @@ -48,13 +48,22 @@ struct _GtkList GList *children; GList *selection; - guint32 timer; - guint16 selection_start_pos; - guint16 selection_end_pos; + GList *undo_selection; + GList *undo_unselection; + + GtkWidget *last_focus_child; + GtkWidget *undo_focus_child; + + guint htimer; + guint vtimer; + + gint anchor; + gint drag_pos; + GtkStateType anchor_state; + guint selection_mode : 2; - guint scroll_direction : 1; - guint have_grab : 1; /* unused */ - guint16 button; /* read by GtkCombo */ + guint drag_selection:1; + guint add_mode:1; }; struct _GtkListClass @@ -98,6 +107,26 @@ gint gtk_list_child_position (GtkList *list, void gtk_list_set_selection_mode (GtkList *list, GtkSelectionMode mode); +void gtk_list_extend_selection (GtkList *list, + GtkScrollType scroll_type, + gfloat position, + gboolean auto_start_selection); +void gtk_list_start_selection (GtkList *list); +void gtk_list_end_selection (GtkList *list); +void gtk_list_select_all (GtkList *list); +void gtk_list_unselect_all (GtkList *list); +void gtk_list_scroll_horizontal (GtkList *list, + GtkScrollType scroll_type, + gfloat position); +void gtk_list_scroll_vertical (GtkList *list, + GtkScrollType scroll_type, + gfloat position); +void gtk_list_toggle_add_mode (GtkList *list); +void gtk_list_toggle_focus_row (GtkList *list); +void gtk_list_toggle_row (GtkList *list, + GtkWidget *item); +void gtk_list_undo_selection (GtkList *list); +void gtk_list_end_drag_selection (GtkList *list); #ifdef __cplusplus } |