2000-10-05 01:04:57 +00:00
|
|
|
/* gtktreeprivate.h
|
|
|
|
* Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
2012-02-27 13:01:10 +00:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2000-10-05 01:04:57 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GTK_TREE_PRIVATE_H__
|
|
|
|
#define __GTK_TREE_PRIVATE_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include <gtk/gtktreeview.h>
|
|
|
|
#include <gtk/gtktreeselection.h>
|
2019-01-07 03:28:09 +00:00
|
|
|
#include <gtk/gtktreerbtreeprivate.h>
|
2004-04-11 19:15:24 +00:00
|
|
|
|
2014-04-05 06:04:12 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2001-03-02 00:49:32 +00:00
|
|
|
#define TREE_VIEW_DRAG_WIDTH 6
|
|
|
|
|
Merge from stable.
Mon Aug 25 23:21:43 2003 Kristian Rietveld <kris@gtk.org>
Merge from stable.
Fixes #115871, reported by Michael Natterer.
* gtk/gtktreeprivate.h: added GtkTreeSelectMode enum,
added ctrl_pressed and shift_pressed bitfields,
(_gtk_tree_selection_internal_select_node): replace GdkModifierType
arg with GtkTreeSelectMode.
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode),
(gtk_tree_selection_select_path), (gtk_tree_selection_unselect_path),
(_gtk_tree_selection_internal_select_node): all updated for
GdkModifierType -> GtkTreeSelectMode move.
* gtk/gtktreeview.c (gtk_tree_view_button_press): set ctrl_pressed
and shift_pressed around selection handling block,
(gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row),
(gtk_tree_view_real_selection_cursor_parent),
(gtk_tree_view_real_set_cursor): use ctrl_pressed and shift_pressed,
instead of checking the event state. And also updates for the
GdkModifierType -> GtkTreeSelectMode move.
2003-08-25 21:33:00 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GTK_TREE_SELECT_MODE_TOGGLE = 1 << 0,
|
|
|
|
GTK_TREE_SELECT_MODE_EXTEND = 1 << 1
|
|
|
|
}
|
|
|
|
GtkTreeSelectMode;
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
/* functions that shouldn't be exported */
|
|
|
|
void _gtk_tree_selection_internal_select_node (GtkTreeSelection *selection,
|
2019-01-07 03:28:09 +00:00
|
|
|
GtkTreeRBNode *node,
|
|
|
|
GtkTreeRBTree *tree,
|
2000-10-05 01:04:57 +00:00
|
|
|
GtkTreePath *path,
|
Merge from stable.
Mon Aug 25 23:21:43 2003 Kristian Rietveld <kris@gtk.org>
Merge from stable.
Fixes #115871, reported by Michael Natterer.
* gtk/gtktreeprivate.h: added GtkTreeSelectMode enum,
added ctrl_pressed and shift_pressed bitfields,
(_gtk_tree_selection_internal_select_node): replace GdkModifierType
arg with GtkTreeSelectMode.
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode),
(gtk_tree_selection_select_path), (gtk_tree_selection_unselect_path),
(_gtk_tree_selection_internal_select_node): all updated for
GdkModifierType -> GtkTreeSelectMode move.
* gtk/gtktreeview.c (gtk_tree_view_button_press): set ctrl_pressed
and shift_pressed around selection handling block,
(gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row),
(gtk_tree_view_real_selection_cursor_parent),
(gtk_tree_view_real_set_cursor): use ctrl_pressed and shift_pressed,
instead of checking the event state. And also updates for the
GdkModifierType -> GtkTreeSelectMode move.
2003-08-25 21:33:00 +00:00
|
|
|
GtkTreeSelectMode mode,
|
2002-04-09 19:48:32 +00:00
|
|
|
gboolean override_browse_mode);
|
2005-11-29 19:34:15 +00:00
|
|
|
void _gtk_tree_selection_emit_changed (GtkTreeSelection *selection);
|
2000-10-05 01:04:57 +00:00
|
|
|
gboolean _gtk_tree_view_find_node (GtkTreeView *tree_view,
|
|
|
|
GtkTreePath *path,
|
2019-01-07 03:28:09 +00:00
|
|
|
GtkTreeRBTree **tree,
|
|
|
|
GtkTreeRBNode **node);
|
2012-02-11 01:54:11 +00:00
|
|
|
gboolean _gtk_tree_view_get_cursor_node (GtkTreeView *tree_view,
|
2019-01-07 03:28:09 +00:00
|
|
|
GtkTreeRBTree **tree,
|
|
|
|
GtkTreeRBNode **node);
|
|
|
|
GtkTreePath *_gtk_tree_path_new_from_rbtree (GtkTreeRBTree *tree,
|
|
|
|
GtkTreeRBNode *node);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
2010-11-28 18:01:49 +00:00
|
|
|
void _gtk_tree_view_add_editable (GtkTreeView *tree_view,
|
|
|
|
GtkTreeViewColumn *column,
|
|
|
|
GtkTreePath *path,
|
|
|
|
GtkCellEditable *cell_editable,
|
|
|
|
GdkRectangle *cell_area);
|
|
|
|
void _gtk_tree_view_remove_editable (GtkTreeView *tree_view,
|
|
|
|
GtkTreeViewColumn *column,
|
|
|
|
GtkCellEditable *cell_editable);
|
|
|
|
|
2010-11-30 07:36:07 +00:00
|
|
|
void _gtk_tree_view_install_mark_rows_col_dirty (GtkTreeView *tree_view,
|
|
|
|
gboolean install_handler);
|
2010-11-30 06:28:14 +00:00
|
|
|
void _gtk_tree_view_column_autosize (GtkTreeView *tree_view,
|
|
|
|
GtkTreeViewColumn *column);
|
2010-11-30 05:29:45 +00:00
|
|
|
|
2010-11-30 07:36:07 +00:00
|
|
|
void _gtk_tree_view_get_row_separator_func (GtkTreeView *tree_view,
|
|
|
|
GtkTreeViewRowSeparatorFunc *func,
|
|
|
|
gpointer *data);
|
|
|
|
GtkTreePath *_gtk_tree_view_get_anchor_path (GtkTreeView *tree_view);
|
|
|
|
void _gtk_tree_view_set_anchor_path (GtkTreeView *tree_view,
|
|
|
|
GtkTreePath *anchor_path);
|
2019-01-07 03:28:09 +00:00
|
|
|
GtkTreeRBTree * _gtk_tree_view_get_rbtree (GtkTreeView *tree_view);
|
2010-11-30 07:36:07 +00:00
|
|
|
|
2012-02-11 01:49:12 +00:00
|
|
|
GtkTreeViewColumn *_gtk_tree_view_get_focus_column (GtkTreeView *tree_view);
|
2010-11-30 07:36:07 +00:00
|
|
|
void _gtk_tree_view_set_focus_column (GtkTreeView *tree_view,
|
|
|
|
GtkTreeViewColumn *column);
|
|
|
|
|
2010-11-30 05:29:45 +00:00
|
|
|
GtkTreeSelection* _gtk_tree_selection_new (void);
|
|
|
|
GtkTreeSelection* _gtk_tree_selection_new_with_tree_view (GtkTreeView *tree_view);
|
|
|
|
void _gtk_tree_selection_set_tree_view (GtkTreeSelection *selection,
|
|
|
|
GtkTreeView *tree_view);
|
|
|
|
gboolean _gtk_tree_selection_row_is_selectable (GtkTreeSelection *selection,
|
2019-01-07 03:28:09 +00:00
|
|
|
GtkTreeRBNode *node,
|
2010-11-30 05:29:45 +00:00
|
|
|
GtkTreePath *path);
|
|
|
|
|
|
|
|
|
2001-03-02 00:49:32 +00:00
|
|
|
void _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column);
|
2017-07-15 18:43:52 +00:00
|
|
|
|
2001-03-02 00:49:32 +00:00
|
|
|
void _gtk_tree_view_column_set_tree_view (GtkTreeViewColumn *column,
|
|
|
|
GtkTreeView *tree_view);
|
2020-07-24 13:54:49 +00:00
|
|
|
int _gtk_tree_view_column_request_width (GtkTreeViewColumn *tree_column);
|
2010-12-01 03:23:02 +00:00
|
|
|
void _gtk_tree_view_column_allocate (GtkTreeViewColumn *tree_column,
|
|
|
|
int x_offset,
|
2017-11-13 00:23:16 +00:00
|
|
|
int width,
|
|
|
|
int height);
|
API additions: _move, _reorder and _swap for stores, path constructor.
Fri Jul 26 22:53:37 2002 Kristian Rietveld <kris@gtk.org>
API additions: _move, _reorder and _swap for stores, path
constructor.
* gtk/gtktreemodel.[ch] (gtk_tree_path_new_from_indices): new function.
* gtk/gtkliststore.[ch]: added gtk_list_store_reorder_func (private),
gtk_list_store_reorder, gtk_list_store_swap, gtk_list_store_move.
* gtk/gtktreestore.[ch]: added gtk_tree_store_reorder_func (private),
gtk_tree_store_reorder, gtk_tree_store_swap, gtk_tree_store_move.
Fri Jul 26 22:32:57 2002 Kristian Rietveld <kris@gtk.org>
Merge from stable:
* gtk/gtktreestore.c (node_free): return FALSE,
(gtk_tree_store_finalize): use g_node_traverse instead of
g_node_children_foreach, so the whole tree will be freed (#88854,
patch from Emmanuel Briot).
Fri Jul 26 22:32:24 2002 Kristian Rietveld <kris@gtk.org>
Merge from stable:
* gtk/gtktreeview.c (gtk_tree_view_button_press): fix some memleaks,
(#84426, patch from Matthias Clasen).
Fri Jul 26 22:31:25 2002 Kristian Rietveld <kris@gtk.org>
Merge from stable:
* gtk/gtktreeview.c (gtk_tree_view_unref_tree_helper): _iter_children
check shouldn't be in g_return_return_val_if_fail (pointed out by
Josh Green, #88997),
(gtk_tree_view_set_model): call _gtk_tree_view_column_unset_model
for each column when we unset the model (part of #82484),
(gtk_tree_view_get_cell_area): return if we ran out of tree or
if we got an invalid path (#82376).
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_unset_model.
* gtk/gtktreeviewcolumn.c: implement _gtk_tree_view_column_unset_model
which disconnects the sort_column_changed_signal (part of #82484).
* gtk/gtkliststore.c (gtk_list_store_insert): append row if the
given postion is off the end of the tree (#85813).
* gtk/gtkentry.c (gtk_cell_editable_key_press_event): let's use
2-space indent, commit changes if up/down keys has been pressed,
this overrides the focus key foo so the user won't be surprised
(#84665).
2002-07-26 20:51:13 +00:00
|
|
|
void _gtk_tree_view_column_unset_model (GtkTreeViewColumn *column,
|
|
|
|
GtkTreeModel *old_model);
|
2001-03-02 00:49:32 +00:00
|
|
|
void _gtk_tree_view_column_unset_tree_view (GtkTreeViewColumn *column);
|
2001-04-12 16:11:54 +00:00
|
|
|
void _gtk_tree_view_column_start_drag (GtkTreeView *tree_view,
|
2010-05-25 22:38:44 +00:00
|
|
|
GtkTreeViewColumn *column,
|
|
|
|
GdkDevice *device);
|
2001-09-18 16:15:10 +00:00
|
|
|
gboolean _gtk_tree_view_column_cell_event (GtkTreeViewColumn *tree_column,
|
|
|
|
GdkEvent *event,
|
2008-01-25 09:30:40 +00:00
|
|
|
const GdkRectangle *cell_area,
|
2001-09-18 16:15:10 +00:00
|
|
|
guint flags);
|
2010-11-30 05:29:45 +00:00
|
|
|
gboolean _gtk_tree_view_column_has_editable_cell(GtkTreeViewColumn *column);
|
|
|
|
GtkCellRenderer *_gtk_tree_view_column_get_edited_cell (GtkTreeViewColumn *column);
|
|
|
|
GtkCellRenderer *_gtk_tree_view_column_get_cell_at_pos (GtkTreeViewColumn *column,
|
2010-12-12 14:22:49 +00:00
|
|
|
GdkRectangle *cell_area,
|
2010-12-15 22:45:04 +00:00
|
|
|
GdkRectangle *background_area,
|
2020-07-24 13:54:49 +00:00
|
|
|
int x,
|
|
|
|
int y);
|
2011-01-07 14:35:35 +00:00
|
|
|
gboolean _gtk_tree_view_column_is_blank_at_pos (GtkTreeViewColumn *column,
|
|
|
|
GdkRectangle *cell_area,
|
|
|
|
GdkRectangle *background_area,
|
2020-07-24 13:54:49 +00:00
|
|
|
int x,
|
|
|
|
int y);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
2016-12-22 02:35:24 +00:00
|
|
|
void gtk_tree_view_column_cell_snapshot (GtkTreeViewColumn *tree_column,
|
|
|
|
GtkSnapshot *snapshot,
|
2008-01-25 09:30:40 +00:00
|
|
|
const GdkRectangle *background_area,
|
|
|
|
const GdkRectangle *cell_area,
|
2010-11-28 18:01:49 +00:00
|
|
|
guint flags,
|
|
|
|
gboolean draw_focus);
|
2008-01-25 09:30:40 +00:00
|
|
|
void _gtk_tree_view_column_cell_set_dirty (GtkTreeViewColumn *tree_column,
|
|
|
|
gboolean install_handler);
|
2010-11-30 05:29:45 +00:00
|
|
|
gboolean _gtk_tree_view_column_cell_get_dirty (GtkTreeViewColumn *tree_column);
|
|
|
|
|
2010-12-06 07:31:07 +00:00
|
|
|
void _gtk_tree_view_column_push_padding (GtkTreeViewColumn *column,
|
2020-07-24 13:54:49 +00:00
|
|
|
int padding);
|
|
|
|
int _gtk_tree_view_column_get_requested_width (GtkTreeViewColumn *column);
|
|
|
|
int _gtk_tree_view_column_get_drag_x (GtkTreeViewColumn *column);
|
2010-11-30 05:29:45 +00:00
|
|
|
GtkCellAreaContext *_gtk_tree_view_column_get_context (GtkTreeViewColumn *column);
|
2017-07-15 18:43:52 +00:00
|
|
|
gboolean _gtk_tree_view_column_coords_in_resize_rect (GtkTreeViewColumn *column,
|
|
|
|
double x,
|
|
|
|
double y);
|
2011-01-12 20:18:07 +00:00
|
|
|
|
2001-02-28 21:37:50 +00:00
|
|
|
|
2005-06-21 05:35:43 +00:00
|
|
|
G_END_DECLS
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* __GTK_TREE_PRIVATE_H__ */
|
|
|
|
|