Class: Gtk::TreeView
- Inherits:
-
Object
- Object
- Gtk::TreeView
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#activate_on_single_click ⇒ TrueClass
Gets the setting set by gtk_tree_view_set_activate_on_single_click().
-
#activate_on_single_click=(activate_on_single_click) ⇒ TrueClass
The activate-on-single-click property specifies whether the “row-activated” signal will be emitted after a single click.
-
#activate_on_single_click? ⇒ TrueClass
The activate-on-single-click property specifies whether the “row-activated” signal will be emitted after a single click.
-
#append_column(column) ⇒ Integer
Appends column to the list of columns.
-
#bin_window ⇒ Gdk::Window
Returns the window that tree_view renders to.
-
#collapse_all ⇒ nil
Recursively collapses all visible, expanded nodes in tree_view.
-
#collapse_row(path) ⇒ TrueClass
Collapses a row (hides its child rows, if they exist).
-
#columns ⇒ GLib::List
Returns a #GList of all the Gtk::TreeViewColumn s currently in tree_view.
-
#columns_autosize ⇒ nil
Resizes all columns to their optimal width.
-
#convert_bin_window_to_tree_coords(bx, by, tx, ty) ⇒ nil
Converts bin_window coordinates to coordinates for the tree (the full scrollable area of the tree).
-
#convert_bin_window_to_widget_coords(bx, by, wx, wy) ⇒ nil
Converts bin_window coordinates (see gtk_tree_view_get_bin_window()) to widget relative coordinates.
-
#convert_tree_to_bin_window_coords(tx, ty, bx, by) ⇒ nil
Converts tree coordinates (coordinates in full scrollable area of the tree) to bin_window coordinates.
-
#convert_tree_to_widget_coords(tx, ty, wx, wy) ⇒ nil
Converts tree coordinates (coordinates in full scrollable area of the tree) to widget coordinates.
-
#convert_widget_to_bin_window_coords(wx, wy, bx, by) ⇒ nil
Converts widget coordinates to coordinates for the bin_window (see gtk_tree_view_get_bin_window()).
-
#convert_widget_to_tree_coords(wx, wy, tx, ty) ⇒ nil
Converts widget coordinates to coordinates for the tree (the full scrollable area of the tree).
-
#create_row_drag_icon(path) ⇒ cairo::Surface
Creates a #cairo_surface_t representation of the row at path.
-
#enable_grid_lines ⇒ Gtk::TreeViewGridLines
Enable-grid-lines.
- #enable_grid_lines=(enable_grid_lines) ⇒ Gtk::TreeViewGridLines
-
#enable_model_drag_dest(targets, n_targets, actions) ⇒ nil
Turns tree_view into a drop destination for automatic DND.
-
#enable_model_drag_source(start_button_mask, targets, n_targets, actions) ⇒ nil
Turns tree_view into a drag source for automatic DND.
-
#enable_search ⇒ TrueClass
Returns whether or not the tree allows to start interactive searching by typing in text.
- #enable_search=(enable_search) ⇒ TrueClass
-
#enable_search? ⇒ TrueClass
Enable-search.
-
#enable_tree_lines ⇒ TrueClass
Returns whether or not tree lines are drawn in tree_view.
- #enable_tree_lines=(enable_tree_lines) ⇒ TrueClass
-
#enable_tree_lines? ⇒ TrueClass
Enable-tree-lines.
-
#expand_all ⇒ nil
Recursively expands all nodes in the tree_view.
-
#expand_row(path, open_all) ⇒ TrueClass
Opens the row so its children are visible.
-
#expand_to_path(path) ⇒ nil
Expands the row at path.
-
#expander_column ⇒ Gtk::TreeViewColumn
Expander-column.
- #expander_column=(expander_column) ⇒ Gtk::TreeViewColumn
-
#fixed_height_mode ⇒ TrueClass
Returns whether fixed height mode is turned on for tree_view.
-
#fixed_height_mode=(fixed_height_mode) ⇒ TrueClass
Setting the ::fixed-height-mode property to true speeds up Gtk::TreeView by assuming that all rows have the same height.
-
#fixed_height_mode? ⇒ TrueClass
Setting the ::fixed-height-mode property to true speeds up Gtk::TreeView by assuming that all rows have the same height.
-
#get_background_area(path, column, rect) ⇒ nil
Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by path and the column specified by column.
-
#get_cell_area(path, column, rect) ⇒ nil
Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by path and the column specified by column.
-
#get_column(n) ⇒ Gtk::TreeViewColumn
Gets the Gtk::TreeViewColumn at the given position in the #tree_view.
-
#get_cursor(path, focus_column) ⇒ nil
Fills in path and focus_column with the current path and focus column.
-
#get_dest_row_at_pos(drag_x, drag_y, path, pos) ⇒ TrueClass
Determines the destination row for a given position.
-
#get_drag_dest_row(path, pos) ⇒ nil
Gets information about the row that is highlighted for feedback.
-
#get_path_at_pos(x, y, path, column, cell_x, cell_y) ⇒ TrueClass
Finds the path at the point (x, y), relative to bin_window coordinates (please see gtk_tree_view_get_bin_window()).
-
#get_tooltip_context(x, y, keyboard_tip, model, path, iter) ⇒ TrueClass
This function is supposed to be used in a Gtk::Widget::query-tooltip signal handler for Gtk::TreeView.
-
#get_visible_range(start_path, end_path) ⇒ TrueClass
Sets start_path and end_path to be the first and last visible path.
-
#get_visible_rect(visible_rect) ⇒ nil
Fills visible_rect with the currently-visible region of the buffer, in tree coordinates.
-
#grid_lines ⇒ Gtk::TreeViewGridLines
Returns which grid lines are enabled in tree_view.
-
#grid_lines=(grid_lines) ⇒ nil
Sets which grid lines to draw in tree_view.
-
#hadjustment ⇒ Gtk::Adjustment
Gets the Gtk::Adjustment currently being used for the horizontal aspect.
-
#hadjustment=(adjustment) ⇒ nil
Sets the Gtk::Adjustment for the current horizontal aspect.
-
#headers_clickable ⇒ TrueClass
Returns whether all header columns are clickable.
- #headers_clickable=(headers_clickable) ⇒ TrueClass
-
#headers_clickable? ⇒ TrueClass
Headers-clickable.
-
#headers_visible ⇒ TrueClass
Returns true if the headers on the tree_view are visible.
- #headers_visible=(headers_visible) ⇒ TrueClass
-
#headers_visible? ⇒ TrueClass
Headers-visible.
-
#hover_expand ⇒ TrueClass
Returns whether hover expansion mode is turned on for tree_view.
-
#hover_expand=(hover_expand) ⇒ TrueClass
Enables or disables the hover expansion mode of tree_view.
-
#hover_expand? ⇒ TrueClass
Enables or disables the hover expansion mode of tree_view.
-
#hover_selection ⇒ TrueClass
Returns whether hover selection mode is turned on for tree_view.
-
#hover_selection=(hover_selection) ⇒ TrueClass
Enables or disables the hover selection mode of tree_view.
-
#hover_selection? ⇒ TrueClass
Enables or disables the hover selection mode of tree_view.
-
#insert_column(column, position) ⇒ Integer
This inserts the column into the tree_view at position.
-
#insert_column_with_attributes(position, title, cell, array) ⇒ Integer
Creates a new Gtk::TreeViewColumn and inserts it into the tree_view at position.
-
#insert_column_with_data_func(position, title, cell, func, data, dnotify) ⇒ Integer
Convenience function that inserts a new column into the Gtk::TreeView with the given cell renderer and a Gtk::TreeCellDataFunc to set cell renderer attributes (normally using data from the model).
-
#is_blank_at_pos(x, y, path, column, cell_x, cell_y) ⇒ TrueClass
Determine whether the point (x, y) in tree_view is blank, that is no cell content nor an expander arrow is drawn at the location.
-
#is_rubber_banding_active ⇒ TrueClass
Returns whether a rubber banding operation is currently being done in tree_view.
-
#level_indentation ⇒ Integer
Extra indentation for each level.
-
#level_indentation=(level_indentation) ⇒ Integer
Extra indentation for each level.
-
#map_expanded_rows(func, data) ⇒ nil
Calls func on all expanded rows.
-
#model ⇒ Gtk::TreeModel
Model.
- #model=(model) ⇒ Gtk::TreeModel
-
#move_column_after(column, base_column) ⇒ nil
Moves column to be after to base_column.
-
#n_columns ⇒ Integer
Queries the number of columns in the given tree_view.
-
#new ⇒ Gtk::Widget
Creates a new Gtk::TreeView widget.
-
#new_with_model(model) ⇒ Gtk::Widget
Creates a new Gtk::TreeView widget with the model initialized to model.
-
#remove_column(column) ⇒ Integer
Removes column from tree_view.
-
#reorderable ⇒ TrueClass
Retrieves whether the user can reorder the tree via drag-and-drop.
- #reorderable=(reorderable) ⇒ TrueClass
-
#reorderable? ⇒ TrueClass
Reorderable.
-
#row_activated(path, column) ⇒ nil
Activates the cell determined by path and column.
-
#row_expanded(path) ⇒ TrueClass
Returns true if the node pointed to by path is expanded in tree_view.
-
#row_separator_func ⇒ Gtk::TreeViewRowSeparatorFunc
Returns the current row separator function.
-
#rubber_banding ⇒ TrueClass
Returns whether rubber banding is turned on for tree_view.
- #rubber_banding=(rubber_banding) ⇒ TrueClass
-
#rubber_banding? ⇒ TrueClass
Rubber-banding.
-
#rules_hint ⇒ TrueClass
Gets the setting set by gtk_tree_view_set_rules_hint().
-
#rules_hint=(rules_hint) ⇒ TrueClass
Sets a hint to the theme to draw rows in alternating colors.
-
#rules_hint? ⇒ TrueClass
Sets a hint to the theme to draw rows in alternating colors.
-
#scroll_to_cell(path, column, use_align, row_align, col_align) ⇒ nil
Moves the alignments of tree_view to the position specified by column and path.
-
#scroll_to_point(tree_x, tree_y) ⇒ nil
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 coordinates.
-
#search_column ⇒ Integer
Search-column.
- #search_column=(search_column) ⇒ Integer
-
#search_entry ⇒ Gtk::Entry
Returns the Gtk::Entry which is currently in use as interactive search entry for tree_view.
-
#search_entry=(entry) ⇒ nil
Sets the entry which the interactive search code will use for this tree_view.
-
#search_equal_func ⇒ Gtk::TreeViewSearchEqualFunc
Returns the compare function currently in use.
-
#search_position_func ⇒ Gtk::TreeViewSearchPositionFunc
Returns the positioning function currently in use.
-
#selection ⇒ Gtk::TreeSelection
Gets the Gtk::TreeSelection associated with tree_view.
-
#set_column_drag_function(func, user_data, destroy) ⇒ nil
Sets a user function for determining where a column may be dropped when dragged.
-
#set_cursor(path, focus_column, start_editing) ⇒ nil
Sets the current keyboard focus to be at path, and selects it.
-
#set_cursor_on_cell(path, focus_column, focus_cell, start_editing) ⇒ nil
Sets the current keyboard focus to be at path, and selects it.
-
#set_destroy_count_func(func, data, destroy) ⇒ nil
This function should almost never be used.
-
#set_drag_dest_row(path, pos) ⇒ nil
Sets the row that is highlighted for feedback.
-
#set_row_separator_func(func, data, destroy) ⇒ nil
Sets the row separator function, which is used to determine whether a row should be drawn as a separator.
-
#set_search_equal_func(search_equal_func, search_user_data, search_destroy) ⇒ nil
Sets the compare function for the interactive search capabilities; note that somewhat like strcmp() returning 0 for equality Gtk::TreeViewSearchEqualFunc returns false on matches.
-
#set_search_position_func(func, data, destroy) ⇒ nil
Sets the function to use when positioning the search dialog.
-
#set_tooltip_cell(tooltip, path, column, cell) ⇒ nil
Sets the tip area of tooltip to the area path, column and cell have in common.
-
#set_tooltip_row(tooltip, path) ⇒ nil
Sets the tip area of tooltip to be the area covered by the row at path.
-
#show_expanders ⇒ TrueClass
Returns whether or not expanders are drawn in tree_view.
-
#show_expanders=(show_expanders) ⇒ TrueClass
true if the view has expanders.
-
#show_expanders? ⇒ TrueClass
true if the view has expanders.
-
#tooltip_column ⇒ Integer
Tooltip-column.
- #tooltip_column=(tooltip_column) ⇒ Integer
-
#ubuntu_almost_fixed_height_mode=(ubuntu_almost_fixed_height_mode) ⇒ TrueClass
Ubuntu-almost-fixed-height-mode.
-
#unset_rows_drag_dest ⇒ nil
Undoes the effect of gtk_tree_view_enable_model_drag_dest().
-
#unset_rows_drag_source ⇒ nil
Undoes the effect of gtk_tree_view_enable_model_drag_source().
-
#vadjustment ⇒ Gtk::Adjustment
Gets the Gtk::Adjustment currently being used for the vertical aspect.
-
#vadjustment=(adjustment) ⇒ nil
Sets the Gtk::Adjustment for the current vertical aspect.
Instance Method Details
#activate_on_single_click ⇒ TrueClass
Gets the setting set by gtk_tree_view_set_activate_on_single_click().
#activate_on_single_click=(activate_on_single_click) ⇒ TrueClass
The activate-on-single-click property specifies whether the “row-activated” signal will be emitted after a single click.
#activate_on_single_click? ⇒ TrueClass
The activate-on-single-click property specifies whether the “row-activated” signal will be emitted after a single click.
#append_column(column) ⇒ Integer
Appends column to the list of columns. If tree_view has “fixed_height” mode enabled, then column must have its “sizing” property set to be GTK_TREE_VIEW_COLUMN_FIXED.
#bin_window ⇒ Gdk::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. hasn’t been realized yet.
#collapse_all ⇒ nil
Recursively collapses all visible, expanded nodes in tree_view.
#collapse_row(path) ⇒ TrueClass
Collapses a row (hides its child rows, if they exist).
#columns ⇒ GLib::List
Returns a #GList of all the Gtk::TreeViewColumn s currently in tree_view. The returned list must be freed with g_list_free ().
#columns_autosize ⇒ nil
Resizes all columns to their optimal width. Only works after the treeview has been realized.
#convert_bin_window_to_tree_coords(bx, by, tx, ty) ⇒ nil
Converts bin_window coordinates to coordinates for the tree (the full scrollable area of the tree).
#convert_bin_window_to_widget_coords(bx, by, wx, wy) ⇒ nil
Converts bin_window coordinates (see gtk_tree_view_get_bin_window()) to widget relative coordinates.
#convert_tree_to_bin_window_coords(tx, ty, bx, by) ⇒ nil
Converts tree coordinates (coordinates in full scrollable area of the tree) to bin_window coordinates.
#convert_tree_to_widget_coords(tx, ty, wx, wy) ⇒ nil
Converts tree coordinates (coordinates in full scrollable area of the tree) to widget coordinates.
#convert_widget_to_bin_window_coords(wx, wy, bx, by) ⇒ nil
Converts widget coordinates to coordinates for the bin_window (see gtk_tree_view_get_bin_window()).
#convert_widget_to_tree_coords(wx, wy, tx, ty) ⇒ nil
Converts widget coordinates to coordinates for the tree (the full scrollable area of the tree).
#create_row_drag_icon(path) ⇒ cairo::Surface
Creates a #cairo_surface_t representation of the row at path. This image is used for a drag icon.
#enable_grid_lines ⇒ Gtk::TreeViewGridLines
Returns enable-grid-lines.
#enable_grid_lines=(enable_grid_lines) ⇒ Gtk::TreeViewGridLines
#enable_model_drag_dest(targets, n_targets, actions) ⇒ nil
Turns tree_view into a drop destination for automatic DND. Calling this method sets Gtk::TreeView:reorderable to false.
#enable_model_drag_source(start_button_mask, targets, n_targets, actions) ⇒ nil
Turns tree_view into a drag source for automatic DND. Calling this method sets Gtk::TreeView:reorderable to false.
#enable_search ⇒ TrueClass
Returns whether or not the tree allows to start interactive searching by typing in text.
#enable_search=(enable_search) ⇒ TrueClass
#enable_search? ⇒ TrueClass
Returns enable-search.
#enable_tree_lines ⇒ TrueClass
Returns whether or not tree lines are drawn in tree_view. otherwise.
#enable_tree_lines=(enable_tree_lines) ⇒ TrueClass
#enable_tree_lines? ⇒ TrueClass
Returns enable-tree-lines.
#expand_all ⇒ nil
Recursively expands all nodes in the tree_view.
#expand_row(path, open_all) ⇒ TrueClass
Opens the row so its children are visible.
#expand_to_path(path) ⇒ nil
Expands the row at path. This will also expand all parent rows of path as necessary.
#expander_column ⇒ Gtk::TreeViewColumn
Returns expander-column.
#expander_column=(expander_column) ⇒ Gtk::TreeViewColumn
#fixed_height_mode ⇒ TrueClass
Returns whether fixed height mode is turned on for tree_view.
#fixed_height_mode=(fixed_height_mode) ⇒ TrueClass
Setting the ::fixed-height-mode property to true speeds up Gtk::TreeView by assuming that all rows have the same height. Only enable this option if all rows are the same height. Please see gtk_tree_view_set_fixed_height_mode() for more information on this option.
#fixed_height_mode? ⇒ TrueClass
Setting the ::fixed-height-mode property to true speeds up Gtk::TreeView by assuming that all rows have the same height. Only enable this option if all rows are the same height. Please see gtk_tree_view_set_fixed_height_mode() for more information on this option.
#get_background_area(path, column, rect) ⇒ nil
Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by path and the column specified by column. If path is nil, 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 nil, 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 bin window. 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.
#get_cell_area(path, column, rect) ⇒ nil
Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by path and the column specified by column. If path is nil, or points to a path not currently displayed, the y and height fields of the rectangle will be filled with 0. If column is nil, 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.
#get_column(n) ⇒ Gtk::TreeViewColumn
Gets the Gtk::TreeViewColumn at the given position in the #tree_view. position is outside the range of columns.
#get_cursor(path, focus_column) ⇒ nil
Fills in path and focus_column with the current path and focus column. If the cursor isn’t currently set, then *path will be nil. If no column currently has focus, then *focus_column will be nil.
The returned Gtk::TreePath must be freed with gtk_tree_path_free() when you are done with it.
#get_dest_row_at_pos(drag_x, drag_y, path, pos) ⇒ TrueClass
Determines the destination row for a given position. drag_x and drag_y are expected to be in widget coordinates. This function is only meaningful if tree_view is realized. Therefore this function will always return false if tree_view is not realized or does not have a model. is indeed the case.
#get_drag_dest_row(path, pos) ⇒ nil
Gets information about the row that is highlighted for feedback.
#get_path_at_pos(x, y, path, column, cell_x, cell_y) ⇒ TrueClass
Finds the path at the point (x, y), relative to bin_window coordinates (please see gtk_tree_view_get_bin_window()). 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_window ()`. It is primarily for things like popup menus. If path is non-nil, then it will be filled with the Gtk::TreePath at that point. This path should be freed with gtk_tree_path_free(). If column is non-nil, 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. Therefore this function will always return false if tree_view is not realized or does not have a model.
For converting widget coordinates (eg. the ones you get from GtkWidget::query-tooltip), please see gtk_tree_view_convert_widget_to_bin_window_coords().
#get_tooltip_context(x, y, keyboard_tip, model, path, iter) ⇒ TrueClass
This function is supposed to be used in a Gtk::Widget::query-tooltip signal handler for Gtk::TreeView. The x, y and keyboard_tip values which are received in the signal handler, should be passed to this function without modification.
The return value indicates whether there is a tree view row at the given coordinates (true) or not (false) for mouse tooltips. For keyboard tooltips the row returned will be the cursor row. When true, then any of model, path and iter which have been provided will be set to point to that row and the corresponding model. x and y will always be converted to be relative to tree_view’s bin_window if keyboard_tooltip is false.
#get_visible_range(start_path, end_path) ⇒ TrueClass
Sets start_path and end_path to be the first and last visible path. Note that there may be invisible paths in between.
The paths should be freed with gtk_tree_path_free() after use.
#get_visible_rect(visible_rect) ⇒ nil
Fills visible_rect with the currently-visible region of the buffer, in tree coordinates. Convert to bin_window coordinates with gtk_tree_view_convert_tree_to_bin_window_coords(). Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire scrollable area of the tree.
#grid_lines ⇒ Gtk::TreeViewGridLines
Returns which grid lines are enabled in tree_view. are enabled.
#grid_lines=(grid_lines) ⇒ nil
Sets which grid lines to draw in tree_view. enable.
#hadjustment ⇒ Gtk::Adjustment
Gets the Gtk::Adjustment currently being used for the horizontal aspect.
#hadjustment=(adjustment) ⇒ nil
Sets the Gtk::Adjustment for the current horizontal aspect.
#headers_clickable ⇒ TrueClass
Returns whether all header columns are clickable.
#headers_clickable=(headers_clickable) ⇒ TrueClass
#headers_clickable? ⇒ TrueClass
Returns headers-clickable.
#headers_visible ⇒ TrueClass
Returns true if the headers on the tree_view are visible.
#headers_visible=(headers_visible) ⇒ TrueClass
#headers_visible? ⇒ TrueClass
Returns headers-visible.
#hover_expand ⇒ TrueClass
Returns whether hover expansion mode is turned on for tree_view.
#hover_expand=(hover_expand) ⇒ TrueClass
Enables or disables the hover expansion mode of tree_view. Hover expansion makes rows expand or collapse if the pointer moves over them.
This mode is primarily intended for treeviews in popups, e.g. in Gtk::ComboBox or #GtkEntryCompletion.
#hover_expand? ⇒ TrueClass
Enables or disables the hover expansion mode of tree_view. Hover expansion makes rows expand or collapse if the pointer moves over them.
This mode is primarily intended for treeviews in popups, e.g. in Gtk::ComboBox or #GtkEntryCompletion.
#hover_selection ⇒ TrueClass
Returns whether hover selection mode is turned on for tree_view.
#hover_selection=(hover_selection) ⇒ TrueClass
Enables or disables the hover selection mode of tree_view. Hover selection makes the selected row follow the pointer. Currently, this works only for the selection modes %GTK_SELECTION_SINGLE and %GTK_SELECTION_BROWSE.
This mode is primarily intended for treeviews in popups, e.g. in Gtk::ComboBox or #GtkEntryCompletion.
#hover_selection? ⇒ TrueClass
Enables or disables the hover selection mode of tree_view. Hover selection makes the selected row follow the pointer. Currently, this works only for the selection modes %GTK_SELECTION_SINGLE and %GTK_SELECTION_BROWSE.
This mode is primarily intended for treeviews in popups, e.g. in Gtk::ComboBox or #GtkEntryCompletion.
#insert_column(column, position) ⇒ Integer
This inserts the column into the tree_view at position. If position is -1, then the column is inserted at the end. If tree_view has “fixed_height” mode enabled, then column must have its “sizing” property set to be GTK_TREE_VIEW_COLUMN_FIXED.
#insert_column_with_attributes(position, title, cell, array) ⇒ Integer
Creates a new Gtk::TreeViewColumn 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. If tree_view has “fixed_height” mode enabled, then the new column will have its sizing property set to be GTK_TREE_VIEW_COLUMN_FIXED.
#insert_column_with_data_func(position, title, cell, func, data, dnotify) ⇒ Integer
Convenience function that inserts a new column into the Gtk::TreeView with the given cell renderer and a Gtk::TreeCellDataFunc to set cell renderer attributes (normally using data from the model). See also gtk_tree_view_column_set_cell_data_func(), gtk_tree_view_column_pack_start(). If tree_view has “fixed_height” mode enabled, then the new column will have its “sizing” property set to be GTK_TREE_VIEW_COLUMN_FIXED.
#is_blank_at_pos(x, y, path, column, cell_x, cell_y) ⇒ TrueClass
Determine whether the point (x, y) in tree_view is blank, that is no cell content nor an expander arrow is drawn at the location. If so, the location can be considered as the background. You might wish to take special action on clicks on the background, such as clearing a current selection, having a custom context menu or starting rubber banding.
The x and y coordinate that are provided must be relative to bin_window coordinates. That is, x and y must come from an event on tree_view where ‘event->window == gtk_tree_view_get_bin_window ()`.
For converting widget coordinates (eg. the ones you get from GtkWidget::query-tooltip), please see gtk_tree_view_convert_widget_to_bin_window_coords().
The path, column, cell_x and cell_y arguments will be filled in likewise as for gtk_tree_view_get_path_at_pos(). Please see gtk_tree_view_get_path_at_pos() for more information. false otherwise.
#is_rubber_banding_active ⇒ TrueClass
Returns whether a rubber banding operation is currently being done in tree_view. done in tree_view.
#level_indentation ⇒ Integer
Extra indentation for each level.
#level_indentation=(level_indentation) ⇒ Integer
Extra indentation for each level.
#map_expanded_rows(func, data) ⇒ nil
Calls func on all expanded rows.
#model ⇒ Gtk::TreeModel
Returns model.
#model=(model) ⇒ Gtk::TreeModel
#move_column_after(column, base_column) ⇒ nil
Moves column to be after to base_column. If base_column is nil, then column is placed in the first position.
#n_columns ⇒ Integer
Queries the number of columns in the given tree_view.
#new ⇒ Gtk::Widget
Creates a new Gtk::TreeView widget.
#new_with_model(model) ⇒ Gtk::Widget
Creates a new Gtk::TreeView widget with the model initialized to model.
#remove_column(column) ⇒ Integer
Removes column from tree_view.
#reorderable ⇒ TrueClass
Retrieves whether the user can reorder the tree via drag-and-drop. See gtk_tree_view_set_reorderable().
#reorderable=(reorderable) ⇒ TrueClass
#reorderable? ⇒ TrueClass
Returns reorderable.
#row_activated(path, column) ⇒ nil
Activates the cell determined by path and column.
#row_expanded(path) ⇒ TrueClass
Returns true if the node pointed to by path is expanded in tree_view.
#row_separator_func ⇒ Gtk::TreeViewRowSeparatorFunc
Returns the current row separator function.
#rubber_banding ⇒ TrueClass
Returns whether rubber banding is turned on for tree_view. If the selection mode is #GTK_SELECTION_MULTIPLE, rubber banding will allow the user to select multiple rows by dragging the mouse.
#rubber_banding=(rubber_banding) ⇒ TrueClass
#rubber_banding? ⇒ TrueClass
Returns rubber-banding.
#rules_hint ⇒ TrueClass
Gets the setting set by gtk_tree_view_set_rules_hint().
#rules_hint=(rules_hint) ⇒ TrueClass
Sets a hint to the theme to draw rows in alternating colors.
#rules_hint? ⇒ TrueClass
Sets a hint to the theme to draw rows in alternating colors.
#scroll_to_cell(path, column, use_align, row_align, col_align) ⇒ nil
Moves the alignments of tree_view to the position specified by column and path. If column is nil, then no horizontal scrolling occurs. Likewise, if path is nil no vertical scrolling occurs. At a minimum, one of column or path need to be non-nil. 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. This means that the cell will be scrolled to the edge closest to its current position. If the cell is currently visible on the screen, nothing is done.
This function only works if the model is set, and path is a valid row on the model. If the model changes before the tree_view is realized, the centered path will be modified to reflect this change.
#scroll_to_point(tree_x, tree_y) ⇒ nil
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 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().
If either tree_x or tree_y are -1, then that direction isn’t scrolled.
#search_column ⇒ Integer
Returns search-column.
#search_column=(search_column) ⇒ Integer
#search_entry ⇒ Gtk::Entry
Returns the Gtk::Entry which is currently in use as interactive search entry for tree_view. In case the built-in entry is being used, nil will be returned.
#search_entry=(entry) ⇒ nil
Sets the entry which the interactive search code will use for this tree_view. This is useful when you want to provide a search entry in our interface at all time at a fixed position. Passing nil for entry will make the interactive search code use the built-in popup entry again.
#search_equal_func ⇒ Gtk::TreeViewSearchEqualFunc
Returns the compare function currently in use.
#search_position_func ⇒ Gtk::TreeViewSearchPositionFunc
Returns the positioning function currently in use.
#selection ⇒ Gtk::TreeSelection
Gets the Gtk::TreeSelection associated with tree_view.
#set_column_drag_function(func, user_data, destroy) ⇒ nil
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 Gtk::TreeViewColumn being dragged, the two Gtk::TreeViewColumn s determining the drop spot, and user_data. If either of the Gtk::TreeViewColumn arguments for the drop spot are nil, then they indicate an edge. If func is set to be nil, then tree_view reverts to the default behavior of allowing all columns to be dropped everywhere.
#set_cursor(path, focus_column, start_editing) ⇒ nil
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 focus_column is not nil, then focus is given to the column specified by it. Additionally, if focus_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.
If path is invalid for model, the current cursor (if any) will be unset and the function will return without failing.
#set_cursor_on_cell(path, focus_column, focus_cell, start_editing) ⇒ nil
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 focus_column is not nil, then focus is given to the column specified by it. If focus_column and focus_cell are not nil, and focus_column contains 2 or more editable or activatable cells, then focus is given to the cell specified by focus_cell. Additionally, if focus_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.
If path is invalid for model, the current cursor (if any) will be unset and the function will return without failing.
#set_destroy_count_func(func, data, destroy) ⇒ nil
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.
#set_drag_dest_row(path, pos) ⇒ nil
Sets the row that is highlighted for feedback. If path is nil, an existing highlight is removed.
#set_row_separator_func(func, data, destroy) ⇒ nil
Sets the row separator function, which is used to determine whether a row should be drawn as a separator. If the row separator function is nil, no separators are drawn. This is the default value.
#set_search_equal_func(search_equal_func, search_user_data, search_destroy) ⇒ nil
Sets the compare function for the interactive search capabilities; note that somewhat like strcmp() returning 0 for equality Gtk::TreeViewSearchEqualFunc returns false on matches.
#set_search_position_func(func, data, destroy) ⇒ nil
Sets the function to use when positioning the search dialog.
#set_tooltip_cell(tooltip, path, column, cell) ⇒ nil
Sets the tip area of tooltip to the area path, column and cell have in common. For example if path is nil and column is set, the tip area will be set to the full area covered by column. See also gtk_tooltip_set_tip_area().
Note that if path is not specified and cell is set and part of a column containing the expander, the tooltip might not show and hide at the correct position. In such cases path must be set to the current node under the mouse cursor for this function to operate correctly.
See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
#set_tooltip_row(tooltip, path) ⇒ nil
Sets the tip area of tooltip to be the area covered by the row at path. See also gtk_tree_view_set_tooltip_column() for a simpler alternative. See also gtk_tooltip_set_tip_area().
#show_expanders ⇒ TrueClass
Returns whether or not expanders are drawn in tree_view. otherwise.
#show_expanders=(show_expanders) ⇒ TrueClass
true if the view has expanders.
#show_expanders? ⇒ TrueClass
true if the view has expanders.
#tooltip_column ⇒ Integer
Returns tooltip-column.
#tooltip_column=(tooltip_column) ⇒ Integer
#ubuntu_almost_fixed_height_mode=(ubuntu_almost_fixed_height_mode) ⇒ TrueClass
Returns ubuntu-almost-fixed-height-mode.
#unset_rows_drag_dest ⇒ nil
Undoes the effect of gtk_tree_view_enable_model_drag_dest(). Calling this method sets Gtk::TreeView:reorderable to false.
#unset_rows_drag_source ⇒ nil
Undoes the effect of gtk_tree_view_enable_model_drag_source(). Calling this method sets Gtk::TreeView:reorderable to false.
#vadjustment ⇒ Gtk::Adjustment
Gets the Gtk::Adjustment currently being used for the vertical aspect.
#vadjustment=(adjustment) ⇒ nil
Sets the Gtk::Adjustment for the current vertical aspect.