gtktreeprivate.h 8.06 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/* 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
Javier Jardón's avatar
Javier Jardón committed
15
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 17 18 19 20 21
 */

#ifndef __GTK_TREE_PRIVATE_H__
#define __GTK_TREE_PRIVATE_H__


22 23
G_BEGIN_DECLS

24 25 26 27

#include <gtk/gtktreeview.h>
#include <gtk/gtktreeselection.h>
#include <gtk/gtkrbtree.h>
28

29 30
#define TREE_VIEW_DRAG_WIDTH 6

Kristian Rietveld's avatar
Kristian Rietveld committed
31 32 33 34 35 36 37
typedef enum
{
  GTK_TREE_SELECT_MODE_TOGGLE = 1 << 0,
  GTK_TREE_SELECT_MODE_EXTEND = 1 << 1
}
GtkTreeSelectMode;

38 39 40 41 42
/* functions that shouldn't be exported */
void         _gtk_tree_selection_internal_select_node (GtkTreeSelection  *selection,
						       GtkRBNode         *node,
						       GtkRBTree         *tree,
						       GtkTreePath       *path,
Kristian Rietveld's avatar
Kristian Rietveld committed
43
                                                       GtkTreeSelectMode  mode,
Kristian Rietveld's avatar
Kristian Rietveld committed
44
						       gboolean           override_browse_mode);
45
void         _gtk_tree_selection_emit_changed         (GtkTreeSelection  *selection);
46 47 48 49
gboolean     _gtk_tree_view_find_node                 (GtkTreeView       *tree_view,
						       GtkTreePath       *path,
						       GtkRBTree        **tree,
						       GtkRBNode        **node);
50 51 52
gboolean     _gtk_tree_view_get_cursor_node           (GtkTreeView       *tree_view,
						       GtkRBTree        **tree,
						       GtkRBNode        **node);
53
GtkTreePath *_gtk_tree_path_new_from_rbtree           (GtkRBTree         *tree,
54
						       GtkRBNode         *node);
55 56 57 58 59 60
void         _gtk_tree_view_child_move_resize         (GtkTreeView       *tree_view,
						       GtkWidget         *widget,
						       gint               x,
						       gint               y,
						       gint               width,
						       gint               height);
61 62 63
void         _gtk_tree_view_queue_draw_node           (GtkTreeView       *tree_view,
						       GtkRBTree         *tree,
						       GtkRBNode         *node,
64
						       const GdkRectangle *clip_rect);
65

66 67 68 69 70 71 72 73 74
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);

75 76
void       _gtk_tree_view_install_mark_rows_col_dirty (GtkTreeView *tree_view,
						       gboolean     install_handler);
77 78 79
void         _gtk_tree_view_column_autosize           (GtkTreeView       *tree_view,
						       GtkTreeViewColumn *column);
gint         _gtk_tree_view_get_header_height         (GtkTreeView       *tree_view);
80

81 82 83 84 85 86 87 88
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);
GtkRBTree *  _gtk_tree_view_get_rbtree                (GtkTreeView                 *tree_view);

89
GtkTreeViewColumn *_gtk_tree_view_get_focus_column    (GtkTreeView                 *tree_view);
90 91 92 93 94
void               _gtk_tree_view_set_focus_column    (GtkTreeView                 *tree_view,
						       GtkTreeViewColumn           *column);
GdkWindow         *_gtk_tree_view_get_header_window   (GtkTreeView                 *tree_view);


95 96 97 98 99 100 101 102 103
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,
							  GtkRBNode        *node,
							  GtkTreePath      *path);


104 105
void _gtk_tree_view_column_realize_button   (GtkTreeViewColumn *column);
void _gtk_tree_view_column_unrealize_button (GtkTreeViewColumn *column);
106
 
107 108
void _gtk_tree_view_column_set_tree_view    (GtkTreeViewColumn *column,
					     GtkTreeView       *tree_view);
109 110 111
void _gtk_tree_view_column_request_width    (GtkTreeViewColumn *tree_column,
					     gint              *minimum,
					     gint              *natural);
112 113
void _gtk_tree_view_column_allocate         (GtkTreeViewColumn *tree_column,
					     int                x_offset,
114
					     int                width);
115 116
void _gtk_tree_view_column_unset_model      (GtkTreeViewColumn *column,
					     GtkTreeModel      *old_model);
117
void _gtk_tree_view_column_unset_tree_view  (GtkTreeViewColumn *column);
Jonathan Blandford's avatar
Jonathan Blandford committed
118
void _gtk_tree_view_column_start_drag       (GtkTreeView       *tree_view,
119 120
					     GtkTreeViewColumn *column,
                                             GdkDevice         *device);
121 122
gboolean _gtk_tree_view_column_cell_event   (GtkTreeViewColumn  *tree_column,
					     GdkEvent           *event,
123
					     const GdkRectangle *cell_area,
124
					     guint               flags);
125 126 127
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,
128
                                                          GdkRectangle       *cell_area,
129
                                                          GdkRectangle       *background_area,
130 131
                                                          gint                x,
                                                          gint                y);
132 133 134 135 136
gboolean          _gtk_tree_view_column_is_blank_at_pos  (GtkTreeViewColumn  *column,
                                                          GdkRectangle       *cell_area,
                                                          GdkRectangle       *background_area,
                                                          gint                x,
                                                          gint                y);
137

138
void		  _gtk_tree_view_column_cell_render      (GtkTreeViewColumn  *tree_column,
139
							  cairo_t            *cr,
140 141
							  const GdkRectangle *background_area,
							  const GdkRectangle *cell_area,
142 143
							  guint               flags,
                                                          gboolean            draw_focus);
144 145
void		  _gtk_tree_view_column_cell_set_dirty	 (GtkTreeViewColumn  *tree_column,
							  gboolean            install_handler);
146 147 148
gboolean          _gtk_tree_view_column_cell_get_dirty   (GtkTreeViewColumn  *tree_column);
GdkWindow        *_gtk_tree_view_column_get_window       (GtkTreeViewColumn  *column);

149 150
void              _gtk_tree_view_column_push_padding          (GtkTreeViewColumn  *column,
							       gint                padding);
151 152 153
gint              _gtk_tree_view_column_get_requested_width   (GtkTreeViewColumn  *column);
gint              _gtk_tree_view_column_get_drag_x            (GtkTreeViewColumn  *column);
GtkCellAreaContext *_gtk_tree_view_column_get_context         (GtkTreeViewColumn  *column);
154 155
void              _gtk_tree_view_reset_header_styles       (GtkTreeView        *tree_view);

156

157
G_END_DECLS
158 159 160 161


#endif /* __GTK_TREE_PRIVATE_H__ */