New function to get a GdkWindow to compare event->window to.

Thu Nov 15 16:24:55 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
	to get a GdkWindow to compare event->window to.

	* gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
	the signal for lateral motion too, #64361

	* gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
	arg as it is useless, #64137
This commit is contained in:
Jonathan Blandford 2001-11-15 22:20:18 +00:00 committed by Jonathan Blandford
parent 91a34f5d56
commit 2fdf30186c
17 changed files with 146 additions and 58 deletions

View File

@ -1,3 +1,14 @@
Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
to get a GdkWindow to compare event->window to.
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
the signal for lateral motion too, #64361
* gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
arg as it is useless, #64137
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.

View File

@ -1,3 +1,14 @@
Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
to get a GdkWindow to compare event->window to.
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
the signal for lateral motion too, #64361
* gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
arg as it is useless, #64137
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.

View File

@ -1,3 +1,14 @@
Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
to get a GdkWindow to compare event->window to.
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
the signal for lateral motion too, #64361
* gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
arg as it is useless, #64137
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.

View File

@ -1,3 +1,14 @@
Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
to get a GdkWindow to compare event->window to.
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
the signal for lateral motion too, #64361
* gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
arg as it is useless, #64137
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.

View File

@ -1,3 +1,14 @@
Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
to get a GdkWindow to compare event->window to.
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
the signal for lateral motion too, #64361
* gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
arg as it is useless, #64137
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.

View File

@ -1,3 +1,14 @@
Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
to get a GdkWindow to compare event->window to.
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
the signal for lateral motion too, #64361
* gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
arg as it is useless, #64137
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.

View File

@ -1,3 +1,14 @@
Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
to get a GdkWindow to compare event->window to.
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
the signal for lateral motion too, #64361
* gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
arg as it is useless, #64137
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.

View File

@ -1158,12 +1158,6 @@ produce superscript and subscript.
</para>
<!-- ##### STRUCT GtkTreeModelSort ##### -->
<para>
</para>
<!-- ##### STRUCT GtkTreeSelectionClass ##### -->
<para>
@ -1178,14 +1172,6 @@ produce superscript and subscript.
@GTK_TREE_SELECTION_SINGLE:
@GTK_TREE_SELECTION_MULTI:
<!-- ##### STRUCT GtkTreeView ##### -->
<para>
</para>
@parent:
@priv:
<!-- ##### USER_FUNCTION GtkTreeViewDraggableFunc ##### -->
<para>

View File

@ -23,6 +23,12 @@ types related to the text widget and how they work together.
#GtkTextView, #GtkTextIter, #GtkTextMark
</para>
<!-- ##### STRUCT GtkTextBuffer ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_text_buffer_new ##### -->
<para>

View File

@ -20,12 +20,6 @@ types related to the text widget and how they work together.
</para>
<!-- ##### STRUCT GtkTextBuffer ##### -->
<para>
</para>
<!-- ##### STRUCT GtkTextIter ##### -->
<para>

View File

@ -21,6 +21,12 @@ types related to the text widget and how they work together.
</para>
<!-- ##### STRUCT GtkTextTagTable ##### -->
<para>
</para>
<!-- ##### USER_FUNCTION GtkTextTagTableForeach ##### -->
<para>

View File

@ -14,6 +14,12 @@ The tree interface used by #GtkTreeView
#GtkTreeView, #GtkTreeStore, #GtkListStore
</para>
<!-- ##### STRUCT GtkTreeModel ##### -->
<para>
</para>
<!-- ##### STRUCT GtkTreeIter ##### -->
<para>
@ -36,12 +42,6 @@ The tree interface used by #GtkTreeView
</para>
<!-- ##### STRUCT GtkTreeModel ##### -->
<para>
</para>
<!-- ##### STRUCT GtkTreeModelIface ##### -->
<para>

View File

@ -14,6 +14,12 @@ GtkTreeModelSort
</para>
<!-- ##### STRUCT GtkTreeModelSort ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_tree_model_sort_new_with_model ##### -->
<para>

View File

@ -14,6 +14,12 @@ GtkTreeSelection
</para>
<!-- ##### STRUCT GtkTreeSelection ##### -->
<para>
</para>
<!-- ##### USER_FUNCTION GtkTreeSelectionFunc ##### -->
<para>

View File

@ -14,6 +14,12 @@ GtkTreeView
</para>
<!-- ##### STRUCT GtkTreeView ##### -->
<para>
</para>
<!-- ##### ENUM GtkTreeViewDropPosition ##### -->
<para>

View File

@ -3497,7 +3497,6 @@ gtk_tree_view_maybe_begin_dragging_row (GtkTreeView *tree_view,
tree_view->priv->pressed_button = -1;
gtk_tree_view_get_path_at_pos (tree_view,
tree_view->priv->bin_window,
tree_view->priv->press_start_x,
tree_view->priv->press_start_y,
&path,
@ -6000,6 +5999,7 @@ gtk_tree_view_move_cursor_left_right (GtkTreeView *tree_view,
cursor_tree,
cursor_node,
NULL);
g_signal_emit (G_OBJECT (tree_view), tree_view_signals[CURSOR_CHANGED], 0);
}
gtk_tree_view_clamp_column_visible (tree_view, tree_view->priv->focus_column);
}
@ -8140,10 +8140,27 @@ gtk_tree_view_set_cursor (GtkTreeView *tree_view,
}
/**
* gtk_tree_view_get_bin_window:
* @tree_view: A #GtkTreeView
*
* Returns the window that @tree_view renders to. This is used primarily to
* compare to <literal>event->window</literal> to confirm that the event on
* @tree_view is on the right window.
*
* Return value: A #GdkWindow, or %NULL when @tree_view hasn't been realized yet
**/
GdkWindow *
gtk_tree_view_get_bin_window (GtkTreeView *tree_view)
{
g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), NULL);
return tree_view->priv->bin_window;
}
/**
* gtk_tree_view_get_path_at_pos:
* @tree_view: A #GtkTreeView.
* @window: The #GdkWindow to check against.
* @x: The x position to be identified.
* @y: The y position to be identified.
* @path: A pointer to a #GtkTreePath pointer to be filled in, or %NULL
@ -8151,22 +8168,20 @@ gtk_tree_view_set_cursor (GtkTreeView *tree_view,
* @cell_x: A pointer where the X coordinate relative to the cell can be placed, or %NULL
* @cell_y: A pointer where the Y coordinate relative to the cell can be placed, or %NULL
*
* Finds the path at the point (@x, @y) relative to @window. If @window is
* %NULL, then the point is found relative to the widget coordinates. This
* function is expected to be called after an event, with <literal>event->window</literal> being
* passed in as @window. It is primarily for things like popup menus. If @path
* is non-%NULL, then it will be filled with the #GtkTreePath at that point.
* This path should be freed with gtk_tree_path_free(). If @column is non-%NULL,
* then it will be filled with the column at that point. @cell_x and @cell_y
* return the coordinates relative to the cell background (i.e. the
* @background_area passed to gtk_cell_renderer_render()). This function only
* works if @tree_view is realized.
* Finds the path at the point (@x, @y), relative to widget coordinates. That
* is, @x and @y are relative to an events coordinates. It is primarily for
* things like popup menus. If @path is non-%NULL, then it will be filled with
* the #GtkTreePath at that point. This path should be freed with
* gtk_tree_path_free(). If @column is non-%NULL, then it will be filled with
* the column at that point. @cell_x and @cell_y return the coordinates relative
* to the cell background (i.e. the @background_area passed to
* gtk_cell_renderer_render()). This function is only meaningful if @tree_view
* is realized.
*
* Return value: %TRUE if a row exists at that coordinate.
**/
gboolean
gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view,
GdkWindow *window,
gint x,
gint y,
GtkTreePath **path,
@ -8181,9 +8196,6 @@ gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view,
g_return_val_if_fail (tree_view != NULL, FALSE);
g_return_val_if_fail (tree_view->priv->bin_window != NULL, FALSE);
if (window)
g_return_val_if_fail (window == tree_view->priv->bin_window, FALSE);
if (path)
*path = NULL;
if (column)
@ -8239,21 +8251,12 @@ gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view,
}
}
if (window)
{
y_offset = _gtk_rbtree_find_offset (tree_view->priv->tree,
TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, y),
&tree, &node);
}
else
{
if (y < TREE_VIEW_HEADER_HEIGHT (tree_view))
return FALSE;
if (y < TREE_VIEW_HEADER_HEIGHT (tree_view))
return FALSE;
y_offset = _gtk_rbtree_find_offset (tree_view->priv->tree,
TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, y + tree_view->priv->vadjustment->value),
&tree, &node);
}
y_offset = _gtk_rbtree_find_offset (tree_view->priv->tree,
TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, y + tree_view->priv->vadjustment->value),
&tree, &node);
if (tree == NULL)
return FALSE;
@ -8690,7 +8693,6 @@ gtk_tree_view_get_dest_row_at_pos (GtkTreeView *tree_view,
*/
if (!gtk_tree_view_get_path_at_pos (tree_view,
tree_view->priv->bin_window,
x, y,
&tmp_path,
&column,

View File

@ -217,7 +217,6 @@ void gtk_tree_view_get_cursor (GtkTreeView
/* Layout information */
gboolean gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view,
GdkWindow *window,
gint x,
gint y,
GtkTreePath **path,