Add row_draggable() vfunc, and wrapper function.
Mon Nov 5 22:34:29 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtktreednd.[ch] (struct _GtkTreeDragSourceIface): Add row_draggable() vfunc, and wrapper function. * gtk/gtktreednd.[ch] (struct _GtkTreeDragDestIface): Make row_drop_possible take a GtkSelectionData, rather than model/row pair. * gtk/gtktreestore.c gtk/gtkliststore.c: Update for new DND interfaces. * gtk/gtktreeview.[ch]: Remove the row_draggable_func location_dropable_func from gtk_tree_view_set_rows_drag_source/dest. and rename them to enable_model_drag_source/dest. * gtk/treeviewcolumn.c: Add DND of columns between rows. Still can't drop _to_ the left tree, but other places work. * gtk/gtktreeview.c (unset_reorderable): Unset the reorderable property if unset/enable_model_drag_source/dest are called manually. * gtk/gtktreestore.c (gtk_tree_store_row_drop_possible): Correct for change in depth count handling. * gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon): Pass in a expose area to gtk_tree_view_column_cell_render()
This commit is contained in:
@ -41,6 +41,9 @@ struct _GtkTreeDragSourceIface
|
||||
|
||||
/* VTable - not signals */
|
||||
|
||||
gboolean (* row_draggable) (GtkTreeDragSource *drag_source,
|
||||
GtkTreePath *path);
|
||||
|
||||
gboolean (* drag_data_get) (GtkTreeDragSource *drag_source,
|
||||
GtkTreePath *path,
|
||||
GtkSelectionData *selection_data);
|
||||
@ -51,6 +54,10 @@ struct _GtkTreeDragSourceIface
|
||||
|
||||
GType gtk_tree_drag_source_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/* Returns whether the given row can be dragged */
|
||||
gboolean gtk_tree_drag_source_row_draggable (GtkTreeDragSource *drag_source,
|
||||
GtkTreePath *path);
|
||||
|
||||
/* Deletes the given row, or returns FALSE if it can't */
|
||||
gboolean gtk_tree_drag_source_drag_data_delete (GtkTreeDragSource *drag_source,
|
||||
GtkTreePath *path);
|
||||
@ -81,9 +88,8 @@ struct _GtkTreeDragDestIface
|
||||
GtkSelectionData *selection_data);
|
||||
|
||||
gboolean (* row_drop_possible) (GtkTreeDragDest *drag_dest,
|
||||
GtkTreeModel *src_model,
|
||||
GtkTreePath *src_path,
|
||||
GtkTreePath *dest_path);
|
||||
GtkTreePath *dest_path,
|
||||
GtkSelectionData *selection_data);
|
||||
};
|
||||
|
||||
GType gtk_tree_drag_dest_get_type (void) G_GNUC_CONST;
|
||||
@ -98,9 +104,8 @@ gboolean gtk_tree_drag_dest_drag_data_received (GtkTreeDragDest *drag_dest,
|
||||
|
||||
/* Returns TRUE if we can drop before path; path may not exist. */
|
||||
gboolean gtk_tree_drag_dest_row_drop_possible (GtkTreeDragDest *drag_dest,
|
||||
GtkTreeModel *src_model,
|
||||
GtkTreePath *src_path,
|
||||
GtkTreePath *dest_path);
|
||||
GtkTreePath *dest_path,
|
||||
GtkSelectionData *selection_data);
|
||||
|
||||
|
||||
/* The selection data would normally have target type GTK_TREE_MODEL_ROW in this
|
||||
|
||||
Reference in New Issue
Block a user