summaryrefslogtreecommitdiff
path: root/gtk/gtktreeprivate.h
diff options
context:
space:
mode:
authorKristian Rietveld <kris@imendio.com>2006-06-02 20:40:33 +0000
committerKristian Rietveld <kristian@src.gnome.org>2006-06-02 20:40:33 +0000
commitf6c583f74e7065b478e5b23d7e244e7e8b133d9c (patch)
treef42cfa4d4832152ed4affcf2fdad29c7daa623f4 /gtk/gtktreeprivate.h
parent29018576b7d6431d6175da9f8ba395a50b089bc9 (diff)
downloadgtk+-f6c583f74e7065b478e5b23d7e244e7e8b133d9c.tar.gz
Rubber banding for GtkTreeView, #80127. Uses same method as GtkIconView.
2006-06-02 Kristian Rietveld <kris@imendio.com> Rubber banding for GtkTreeView, #80127. Uses same method as GtkIconView. * gtk/gtktreeview.c (gtk_tree_view_class_init), (gtk_tree_view_init), (gtk_tree_view_get_property), (gtk_tree_view_set_property), (gtk_tree_view_set_rubber_banding), (gtk_tree_view_get_rubber_banding): add property, (gtk_tree_view_button_press): start rubber banding if enabled and press is on a non-selected node, (gtk_tree_view_button_release): stop rubber banding, (gtk_tree_view_motion_bin_window), (scrool_row_timeout): enable/update the rubber band, (gtk_tree_view_bin_expose): draw rubber band if active, (gtk_tree_view_stop_rubberband), (gtk_tree_view_update_rubber_band_selection_range), (gtk_tree_view_update_rubber_band_selection), (gtk_tree_view_update_rubber_band), (gtk_tree_view_paint_rubber_band): new functions. * gtk/gtktreeview.h: add new set/get function for rubber banding property. * gtk/gtktreeprivate.h: add a bunch of new private fields.
Diffstat (limited to 'gtk/gtktreeprivate.h')
-rw-r--r--gtk/gtktreeprivate.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/gtk/gtktreeprivate.h b/gtk/gtktreeprivate.h
index 4861762fa0..d50b3afa26 100644
--- a/gtk/gtktreeprivate.h
+++ b/gtk/gtktreeprivate.h
@@ -58,6 +58,13 @@ enum
DRAG_COLUMN_WINDOW_STATE_ARROW_RIGHT = 4
};
+enum
+{
+ RUBBER_BAND_OFF = 0,
+ RUBBER_BAND_MAYBE_START = 1,
+ RUBBER_BAND_ACTIVE = 2
+};
+
#define GTK_TREE_VIEW_SET_FLAG(tree_view, flag) G_STMT_START{ (tree_view->priv->flags|=flag); }G_STMT_END
#define GTK_TREE_VIEW_UNSET_FLAG(tree_view, flag) G_STMT_START{ (tree_view->priv->flags&=~(flag)); }G_STMT_END
#define GTK_TREE_VIEW_FLAG_SET(tree_view, flag) ((tree_view->priv->flags&flag)==flag)
@@ -172,6 +179,18 @@ struct _GtkTreeViewPrivate
gint press_start_x;
gint press_start_y;
+ gint rubber_band_status;
+ gint rubber_band_x;
+ gint rubber_band_y;
+ gint rubber_band_shift;
+ gint rubber_band_ctrl;
+
+ GtkRBNode *rubber_band_start_node;
+ GtkRBTree *rubber_band_start_tree;
+
+ GtkRBNode *rubber_band_end_node;
+ GtkRBTree *rubber_band_end_tree;
+
/* fixed height */
gint fixed_height;
@@ -210,6 +229,8 @@ struct _GtkTreeViewPrivate
guint hover_expand : 1;
guint imcontext_changed : 1;
+ guint rubber_banding_enable : 1;
+
/* Auto expand/collapse timeout in hover mode */
guint auto_expand_timeout;