Details
enum GtkTreeViewDropPosition
typedef enum
{
/* drop before/after this row */
GTK_TREE_VIEW_DROP_BEFORE,
GTK_TREE_VIEW_DROP_AFTER,
/* drop as a child of this row (with fallback to before or after
* if into is not possible)
*/
GTK_TREE_VIEW_DROP_INTO_OR_BEFORE,
GTK_TREE_VIEW_DROP_INTO_OR_AFTER
} GtkTreeViewDropPosition; |
struct GtkTreeViewPrivate
struct GtkTreeViewPrivate; |
GtkTreeViewColumnDropFunc ()
GtkTreeViewMappingFunc ()
GtkTreeViewSearchEqualFunc ()
gboolean (*GtkTreeViewSearchEqualFunc) (GtkTreeModel *model,
gint column,
const gchar *key,
GtkTreeIter *iter,
gpointer search_data); |
gtk_tree_view_new_with_model ()
Creates a new GtkTreeView widget with the model initialized to model.
gtk_tree_view_get_model ()
Returns the model the the GtkTreeView is based on. Returns NULL if the
model is unset.
gtk_tree_view_set_model ()
Sets the model for a GtkTreeView. If the tree_view already has a model
set, it will remove it before setting the new model. If model is NULL, then
it will unset the old model.
gtk_tree_view_get_selection ()
Gets the GtkTreeSelection associated with tree_view.
gtk_tree_view_get_hadjustment ()
Gets the GtkAdjustment currently being used for the horizontal aspect.
gtk_tree_view_set_hadjustment ()
Sets the GtkAdjustment for the current horizontal aspect.
gtk_tree_view_get_vadjustment ()
Gets the GtkAdjustment currently being used for the vertical aspect.
gtk_tree_view_set_vadjustment ()
Sets the GtkAdjustment for the current vertical aspect.
gtk_tree_view_get_headers_visible ()
gboolean gtk_tree_view_get_headers_visible
(GtkTreeView *tree_view); |
Returns TRUE if the headers on the tree_view are visible.
gtk_tree_view_set_headers_visible ()
void gtk_tree_view_set_headers_visible
(GtkTreeView *tree_view,
gboolean headers_visible); |
Sets the the visibility state of the headers.
gtk_tree_view_columns_autosize ()
void gtk_tree_view_columns_autosize (GtkTreeView *tree_view); |
Resizes all columns to their optimal width.
gtk_tree_view_set_headers_clickable ()
void gtk_tree_view_set_headers_clickable
(GtkTreeView *tree_view,
gboolean setting); |
Allow the column title buttons to be clicked.
gtk_tree_view_set_rules_hint ()
void gtk_tree_view_set_rules_hint (GtkTreeView *tree_view,
gboolean setting); |
This function tells GTK+ that the user interface for your
application requires users to read across tree rows and associate
cells with one another. By default, GTK+ will then render the tree
with alternating row colors. Do not use it
just because you prefer the appearance of the ruled tree; that's a
question for the theme. Some themes will draw tree rows in
alternating colors even when rules are turned off, and users who
prefer that appearance all the time can choose those themes. You
should call this function only as a semantic
hint to the theme engine that your tree makes alternating colors
useful from a functional standpoint (since it has lots of columns,
generally).
gtk_tree_view_append_column ()
Appends column to the list of columns.
gtk_tree_view_remove_column ()
Removes column from tree_view.
gtk_tree_view_insert_column ()
This inserts the column into the tree_view at position. If position is
-1, then the column is inserted at the end.
gtk_tree_view_insert_column_with_attributes ()
gint gtk_tree_view_insert_column_with_attributes
(GtkTreeView *tree_view,
gint position,
gchar *title,
GtkCellRenderer *cell,
...); |
Creates a new GtkTreeViewColumn and inserts it into the tree_view at
position. If position is -1, then the newly created column is inserted at
the end. The column is initialized with the attributes given.
gtk_tree_view_get_column ()
Gets the GtkTreeViewColumn at the given position in the tree_view.
gtk_tree_view_get_columns ()
GList* gtk_tree_view_get_columns (GtkTreeView *tree_view); |
Returns a GList of all the GtkTreeViewColumn s currently in tree_view.
The returned list must be freed with g_list_free().
gtk_tree_view_move_column_after ()
Moves column to be after to base_column. If base_column is NULL, then
column is placed in the first position.
gtk_tree_view_set_expander_column ()
Sets the column to draw the expander arrow at. It must be in tree_view. If
column is NULL, then the expander arrow is always at the first visible
column.
gtk_tree_view_get_expander_column ()
Returns the column that is the current expander column. This
column has the expander arrow drawn next to it.
gtk_tree_view_set_column_drag_function ()
Sets a user function for determining where a column may be dropped when
dragged. This function is called on every column pair in turn at the
beginning of a column drag to determine where a drop can take place. The
arguments passed to func are: the tree_view, the GtkTreeViewColumn being
dragged, the two GtkTreeViewColumn s determining the drop spot, and
user_data. If either of the GtkTreeViewColumn arguments for the drop spot
are NULL, then they indicate an edge. If func is set to be NULL, then
tree_view reverts to the default behavior of allowing all columns to be
dropped everywhere.
gtk_tree_view_scroll_to_point ()
void gtk_tree_view_scroll_to_point (GtkTreeView *tree_view,
gint tree_x,
gint tree_y); |
Scrolls the tree view such that the top-left corner of the visible
area is tree_x, tree_y, where tree_x and tree_y are specified
in tree window coordinates. The tree_view must be realized before
this function is called. If it isn't, you probably want to be
using gtk_tree_view_scroll_to_cell().
gtk_tree_view_scroll_to_cell ()
Moves the alignments of tree_view to the position specified by column and
path. If column is NULL, then no horizontal scrolling occurs. Likewise,
if path is NULL no vertical scrolling occurs. row_align determines where
the row is placed, and col_align determines where column is placed. Both
are expected to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0
means right/bottom alignment, 0.5 means center. If use_align is FALSE,
then the alignment arguments are ignored, and the tree does the minimum
amount of work to scroll the cell onto the screen.
gtk_tree_view_set_cursor ()
Sets the current keyboard focus to be at path, and selects it. This is
useful when you want to focus the user's attention on a particular row. If
column is not NULL, then focus is given to the column specified by it.
Additionally, if column is specified, and start_editing is TRUE, then
editing should be started in the specified cell. This function is often
followed by gtk_widget_grab_focus (tree_view) in order to give keyboard
focus to the widget. Please note that editing can only happen when the
widget is realized.
gtk_tree_view_get_cursor ()
Fills in path and focus_column with the current path and focus column. If
the cursor isn't currently set, then *path will be NULL. If no column
currently has focus, then *focus_column will be NULL.
gtk_tree_view_row_activated ()
Activates the cell determined by path and column.
gtk_tree_view_expand_all ()
void gtk_tree_view_expand_all (GtkTreeView *tree_view); |
Recursively expands all nodes in the tree_view.
gtk_tree_view_collapse_all ()
void gtk_tree_view_collapse_all (GtkTreeView *tree_view); |
Recursively collapses all visible, expanded nodes in tree_view.
gtk_tree_view_expand_row ()
Opens the row so its children are visible.
gtk_tree_view_collapse_row ()
Collapses a row (hides its child rows, if they exist).
gtk_tree_view_map_expanded_rows ()
Calls func on all expanded rows.
gtk_tree_view_row_expanded ()
Returns TRUE if the node pointed to by path is expanded in tree_view.
gtk_tree_view_set_reorderable ()
void gtk_tree_view_set_reorderable (GtkTreeView *tree_view,
gboolean reorderable); |
This function is a convenience function to allow you to reorder models that
support the GtkDragSourceIface and the GtkDragDestIface. Both
GtkTreeStore and GtkListStore support these. If reorderable is TRUE, then
the user can reorder the model by dragging and dropping columns. The
developer can listen to these changes by connecting to the model's
signals.
This function does not give you any degree of control over the order -- any
reorderering is allowed. If more control is needed, you should probably
handle drag and drop manually.
gtk_tree_view_get_path_at_pos ()
Finds the path at the point (x, y), relative to widget coordinates. That
is, x and y are relative to an events coordinates. x and y must come
from an event on the tree_view only where event->window ==
gtk_tree_view_get_bin(). 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.
gtk_tree_view_get_cell_area ()
Fills the bounding rectangle in tree window coordinates for the cell at the
row specified by path and the column specified by column. If path is
NULL, or points to a path not currently displayed, the y and height fields
of the rectangle will be filled with 0. If column is NULL, the x and width
fields will be filled with 0. The sum of all cell rects does not cover the
entire tree; there are extra pixels in between rows, for example. The
returned rectangle is equivalent to the cell_area passed to
gtk_cell_renderer_render(). This function is only valid if tree_view is
realized.
gtk_tree_view_get_background_area ()
Fills the bounding rectangle in tree window coordinates for the cell at the
row specified by path and the column specified by column. If path is
NULL, or points to a node not found in the tree, the y and height fields of
the rectangle will be filled with 0. If column is NULL, the x and width
fields will be filled with 0. The returned rectangle is equivalent to the
background_area passed to gtk_cell_renderer_render(). These background
areas tile to cover the entire tree window (except for the area used for
header buttons). Contrast with the cell_area, returned by
gtk_tree_view_get_cell_area(), which returns only the cell itself, excluding
surrounding borders and the tree expander area.
gtk_tree_view_get_visible_rect ()
Fills visible_rect with the currently-visible region of the
buffer, in tree coordinates. Convert to widget coordinates with
gtk_tree_view_tree_to_widget_coords(). Tree coordinates start at
0,0 for row 0 of the tree, and cover the entire scrollable area of
the tree.
gtk_tree_view_get_bin_window ()
Returns the window that tree_view renders to. This is used primarily to
compare to event->window to confirm that the event on
tree_view is on the right window.
gtk_tree_view_widget_to_tree_coords ()
void gtk_tree_view_widget_to_tree_coords
(GtkTreeView *tree_view,
gint wx,
gint wy,
gint *tx,
gint *ty); |
Converts widget coordinates to coordinates for the
tree window (the full scrollable area of the tree).
gtk_tree_view_tree_to_widget_coords ()
void gtk_tree_view_tree_to_widget_coords
(GtkTreeView *tree_view,
gint tx,
gint ty,
gint *wx,
gint *wy); |
Converts tree coordinates (coordinates in full scrollable area of the tree)
to widget coordinates.
gtk_tree_view_enable_model_drag_dest ()
gtk_tree_view_enable_model_drag_source ()
gtk_tree_view_unset_rows_drag_source ()
void gtk_tree_view_unset_rows_drag_source
(GtkTreeView *tree_view); |
gtk_tree_view_unset_rows_drag_dest ()
void gtk_tree_view_unset_rows_drag_dest
(GtkTreeView *tree_view); |
gtk_tree_view_set_drag_dest_row ()
gtk_tree_view_get_drag_dest_row ()
gtk_tree_view_get_dest_row_at_pos ()
gtk_tree_view_create_row_drag_icon ()
Creates a GdkPixmap representation of the row at path. This image is used
for a drag icon.
gtk_tree_view_set_enable_search ()
void gtk_tree_view_set_enable_search (GtkTreeView *tree_view,
gboolean enable_search); |
If enable_search is set, then the user can type in text to search through
the tree interactively.
gtk_tree_view_get_enable_search ()
gboolean gtk_tree_view_get_enable_search (GtkTreeView *tree_view); |
Returns whether or not the tree allows interactive searching.
gtk_tree_view_get_search_column ()
gint gtk_tree_view_get_search_column (GtkTreeView *tree_view); |
Gets the column searched on by the interactive search code.
gtk_tree_view_set_search_column ()
void gtk_tree_view_set_search_column (GtkTreeView *tree_view,
gint column); |
Sets column as the column where the interactive search code should search
in. Additionally, turns on interactive searching.
gtk_tree_view_get_search_equal_func ()
gtk_tree_view_set_search_equal_func ()
Sets the compare function for the interactive search capabilities.
GtkTreeDestroyCountFunc ()
void (*GtkTreeDestroyCountFunc) (GtkTreeView *tree_view,
GtkTreePath *path,
gint children,
gpointer user_data); |
gtk_tree_view_set_destroy_count_func ()
This function should almost never be used. It is meant for private use by
ATK for determining the number of visible children that are removed when the
user collapses a row, or a row is deleted.