Class: Gtk::TreeView
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#activate_on_single_click ⇒ Boolean
Gets the setting set by gtk_tree_view_set_activate_on_single_click().
-
#activate_on_single_click=(activate_on_single_click) ⇒ Boolean
The activate-on-single-click property specifies whether the "row-activated" signal will be emitted after a single click.
-
#activate_on_single_click? ⇒ Boolean
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.
-
#collapse_all ⇒ nil
Recursively collapses all visible, expanded nodes in tree_view.
-
#collapse_row(path) ⇒ Boolean
Collapses a row (hides its child rows, if they exist).
-
#columns ⇒ GLib::List<Gtk::TreeViewColumn>
Returns a
GListof all theGtkTreeViewColumns 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 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.
-
#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) ⇒ Gdk::Paintable
Creates a
cairo_surface_trepresentation 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(formats, actions) ⇒ nil
Turns tree_view into a drop destination for automatic DND.
-
#enable_model_drag_source(start_button_mask, formats, actions) ⇒ nil
Turns tree_view into a drag source for automatic DND.
-
#enable_search ⇒ Boolean
Returns whether or not the tree allows to start interactive searching by typing in text.
- #enable_search=(enable_search) ⇒ Boolean
-
#enable_search? ⇒ Boolean
Enable-search.
-
#enable_tree_lines ⇒ Boolean
Returns whether or not tree lines are drawn in tree_view.
- #enable_tree_lines=(enable_tree_lines) ⇒ Boolean
-
#enable_tree_lines? ⇒ Boolean
Enable-tree-lines.
-
#expand_all ⇒ nil
Recursively expands all nodes in the tree_view.
-
#expand_row(path, open_all) ⇒ Boolean
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 ⇒ Boolean
Returns whether fixed height mode is turned on for tree_view.
-
#fixed_height_mode=(fixed_height_mode) ⇒ Boolean
Setting the ::fixed-height-mode property to true speeds up
GtkTreeViewby assuming that all rows have the same height. -
#fixed_height_mode? ⇒ Boolean
Setting the ::fixed-height-mode property to true speeds up
GtkTreeViewby 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
GtkTreeViewColumnat 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) ⇒ Boolean
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) ⇒ Boolean
Finds the path at the point (x, y), relative to bin_window coordinates.
-
#get_tooltip_context(x, y, keyboard_tip, model, path, iter) ⇒ Boolean
This function is supposed to be used in a ::query-tooltip signal handler for
GtkTreeView. -
#get_visible_range(start_path, end_path) ⇒ Boolean
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.
-
#headers_clickable ⇒ Boolean
Returns whether all header columns are clickable.
- #headers_clickable=(headers_clickable) ⇒ Boolean
-
#headers_clickable? ⇒ Boolean
Headers-clickable.
-
#headers_visible ⇒ Boolean
Returns true if the headers on the tree_view are visible.
- #headers_visible=(headers_visible) ⇒ Boolean
-
#headers_visible? ⇒ Boolean
Headers-visible.
-
#hover_expand ⇒ Boolean
Returns whether hover expansion mode is turned on for tree_view.
-
#hover_expand=(hover_expand) ⇒ Boolean
Enables or disables the hover expansion mode of tree_view.
-
#hover_expand? ⇒ Boolean
Enables or disables the hover expansion mode of tree_view.
-
#hover_selection ⇒ Boolean
Returns whether hover selection mode is turned on for tree_view.
-
#hover_selection=(hover_selection) ⇒ Boolean
Enables or disables the hover selection mode of tree_view.
-
#hover_selection? ⇒ Boolean
Enables or disables the hover selection mode of tree_view.
-
#initialize(model) ⇒ Gtk::Widget
constructor
Creates a new
GtkTreeViewwidget with the model initialized to model. -
#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
GtkTreeViewColumnand 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
GtkTreeViewwith the given cell renderer and aGtkTreeCellDataFuncto set cell renderer attributes (normally using data from the model). -
#is_blank_at_pos(x, y, path, column, cell_x, cell_y) ⇒ Boolean
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 ⇒ Boolean
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.
-
#remove_column(column) ⇒ Integer
Removes column from tree_view.
-
#reorderable ⇒ Boolean
Retrieves whether the user can reorder the tree via drag-and-drop.
- #reorderable=(reorderable) ⇒ Boolean
-
#reorderable? ⇒ Boolean
Reorderable.
-
#row_activated(path, column) ⇒ nil
Activates the cell determined by path and column.
-
#row_expanded(path) ⇒ Boolean
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 ⇒ Boolean
Returns whether rubber banding is turned on for tree_view.
- #rubber_banding=(rubber_banding) ⇒ Boolean
-
#rubber_banding? ⇒ Boolean
Rubber-banding.
-
#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::Editable
Returns the
GtkEntrywhich 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.
-
#selection ⇒ Gtk::TreeSelection
Gets the
GtkTreeSelectionassociated 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_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
GtkTreeViewSearchEqualFunc returns false on matches. -
#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 ⇒ Boolean
Returns whether or not expanders are drawn in tree_view.
-
#show_expanders=(show_expanders) ⇒ Boolean
true if the view has expanders.
-
#show_expanders? ⇒ Boolean
true if the view has expanders.
-
#tooltip_column ⇒ Integer
Tooltip-column.
- #tooltip_column=(tooltip_column) ⇒ Integer
-
#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().
Methods inherited from Widget
#accessible_role, #accessible_role=, #action_set_enabled, #activate, #activate_action, #activate_action_variant, #activate_default, #activate_signal, #activate_signal=, #activate_signal_from_name=, #add_binding, #add_binding_action, #add_binding_signal, #add_controller, #add_css_class, #add_mnemonic_label, #add_shortcut, #add_tick_callback, #allocate, #allocated_baseline, #allocated_height, #allocated_width, #baseline, #bind_template_callback_full, #bind_template_child_full, #can_focus, #can_focus=, #can_focus?, #can_target, #can_target=, #can_target?, #child_focus, #child_visible, #child_visible=, #clipboard, #compute_bounds, #compute_expand, #compute_point, #compute_transform, #contains, #create_pango_context, #create_pango_layout, #css_classes, #css_classes=, #css_name, #css_name=, #cursor, #cursor=, #cursor_from_name=, default_direction, default_direction=, #direction, #direction=, #display, #dispose_template, #drag_check_threshold, #error_bell, #first_child, #focus_child, #focus_child=, #focus_on_click, #focus_on_click=, #focus_on_click?, #focusable, #focusable=, #focusable?, #font_map, #font_map=, #font_options, #font_options=, #frame_clock, #get_allocation, #get_ancestor, #get_color, #get_preferred_size, #get_size, #get_size_request, #get_template_child, #grab_focus, #halign, #halign=, #has_css_class, #has_default, #has_default=, #has_default?, #has_focus, #has_focus=, #has_focus?, #has_tooltip, #has_tooltip=, #has_tooltip?, #has_visible_focus, #height, #height_request, #height_request=, #hexpand, #hexpand=, #hexpand?, #hexpand_set, #hexpand_set=, #hexpand_set?, #hide, #in_destruction, #init_template, #insert_action_group, #insert_after, #insert_before, #install_action, #install_property_action, #is_ancestor, #is_drawable, #is_focus, #is_sensitive, #is_visible, #keynav_failed, #last_child, #layout_manager, #layout_manager=, #layout_manager_type, #layout_manager_type=, #list_mnemonic_labels, #map, #mapped, #margin_bottom, #margin_bottom=, #margin_end, #margin_end=, #margin_start, #margin_start=, #margin_top, #margin_top=, #measure, #mnemonic_activate, #name, #name=, #native, #next_sibling, #observe_children, #observe_controllers, #opacity, #opacity=, #overflow, #overflow=, #pango_context, #parent, #parent=, #pick, #prev_sibling, #primary_clipboard, #query_action, #queue_allocate, #queue_draw, #queue_resize, #realize, #realized, #receives_default, #receives_default=, #receives_default?, #remove_controller, #remove_css_class, #remove_mnemonic_label, #remove_tick_callback, #request_mode, #root, #root=, #scale_factor, #scale_factor=, #sensitive, #sensitive=, #sensitive?, #set_size_request, #set_state_flags, #settings, #should_layout, #show, #size_allocate, #snapshot_child, #state_flags, #style_context, #template=, #template_from_resource=, #template_scope=, #tooltip_markup, #tooltip_markup=, #tooltip_text, #tooltip_text=, #translate_coordinates, #trigger_tooltip_query, #unmap, #unparent, #unrealize, #unset_state_flags, #valign, #valign=, #vexpand, #vexpand=, #vexpand?, #vexpand_set, #vexpand_set=, #vexpand_set?, #visible, #visible=, #visible?, #width, #width_request, #width_request=
Constructor Details
#initialize(model) ⇒ Gtk::Widget
Creates a new GtkTreeView widget with the model initialized to model.
Instance Method Details
#activate_on_single_click ⇒ Boolean
Gets the setting set by gtk_tree_view_set_activate_on_single_click().
#activate_on_single_click=(activate_on_single_click) ⇒ Boolean
The activate-on-single-click property specifies whether the "row-activated" signal will be emitted after a single click.
#activate_on_single_click? ⇒ Boolean
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.
#collapse_all ⇒ nil
Recursively collapses all visible, expanded nodes in tree_view.
#collapse_row(path) ⇒ Boolean
Collapses a row (hides its child rows, if they exist).
#columns ⇒ GLib::List<Gtk::TreeViewColumn>
Returns a GList of all the GtkTreeViewColumns 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 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.
#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) ⇒ Gdk::Paintable
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(formats, actions) ⇒ nil
Turns tree_view into a drop destination for automatic DND. Calling
this method sets GtkTreeView:reorderable to false.
#enable_model_drag_source(start_button_mask, formats, actions) ⇒ nil
Turns tree_view into a drag source for automatic DND. Calling this
method sets GtkTreeView:reorderable to false.
#enable_search ⇒ Boolean
Returns whether or not the tree allows to start interactive searching by typing in text.
#enable_search=(enable_search) ⇒ Boolean
#enable_search? ⇒ Boolean
Returns enable-search.
#enable_tree_lines ⇒ Boolean
Returns whether or not tree lines are drawn in tree_view. otherwise.
#enable_tree_lines=(enable_tree_lines) ⇒ Boolean
#enable_tree_lines? ⇒ Boolean
Returns enable-tree-lines.
#expand_all ⇒ nil
Recursively expands all nodes in the tree_view.
#expand_row(path, open_all) ⇒ Boolean
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 ⇒ Boolean
Returns whether fixed height mode is turned on for tree_view.
#fixed_height_mode=(fixed_height_mode) ⇒ Boolean
Setting the ::fixed-height-mode property to true speeds up
GtkTreeView 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? ⇒ Boolean
Setting the ::fixed-height-mode property to true speeds up
GtkTreeView 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 GtkTreeViewColumn 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 GtkTreePath 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) ⇒ Boolean
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) ⇒ Boolean
Finds the path at the point (x, y), relative to bin_window coordinates.
That is, x and y are relative to an events coordinates. Widget-relative
coordinates must be converted using
gtk_tree_view_convert_widget_to_bin_window_coords(). It is primarily for
things like popup menus. If path is non-nil, 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-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) ⇒ Boolean
This function is supposed to be used in a ::query-tooltip
signal handler for GtkTreeView. 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) ⇒ Boolean
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.
#headers_clickable ⇒ Boolean
Returns whether all header columns are clickable.
#headers_clickable=(headers_clickable) ⇒ Boolean
#headers_clickable? ⇒ Boolean
Returns headers-clickable.
#headers_visible ⇒ Boolean
Returns true if the headers on the tree_view are visible.
#headers_visible=(headers_visible) ⇒ Boolean
#headers_visible? ⇒ Boolean
Returns headers-visible.
#hover_expand ⇒ Boolean
Returns whether hover expansion mode is turned on for tree_view.
#hover_expand=(hover_expand) ⇒ Boolean
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 GtkComboBox or GtkEntryCompletion.
#hover_expand? ⇒ Boolean
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 GtkComboBox or GtkEntryCompletion.
#hover_selection ⇒ Boolean
Returns whether hover selection mode is turned on for tree_view.
#hover_selection=(hover_selection) ⇒ Boolean
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 GtkComboBox or GtkEntryCompletion.
#hover_selection? ⇒ Boolean
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 GtkComboBox 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 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. 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 GtkTreeView
with the given cell renderer and a GtkTreeCellDataFunc 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) ⇒ Boolean
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. Widget-relative coordinates must be converted using gtk_tree_view_convert_widget_to_bin_window_coords().
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 ⇒ Boolean
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.
#remove_column(column) ⇒ Integer
Removes column from tree_view.
#reorderable ⇒ Boolean
Retrieves whether the user can reorder the tree via drag-and-drop. See gtk_tree_view_set_reorderable().
#reorderable=(reorderable) ⇒ Boolean
#reorderable? ⇒ Boolean
Returns reorderable.
#row_activated(path, column) ⇒ nil
Activates the cell determined by path and column.
#row_expanded(path) ⇒ Boolean
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 ⇒ Boolean
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) ⇒ Boolean
#rubber_banding? ⇒ Boolean
Returns rubber-banding.
#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::Editable
Returns the GtkEntry 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.
#selection ⇒ Gtk::TreeSelection
Gets the GtkTreeSelection 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 GtkTreeViewColumn being
dragged, the two GtkTreeViewColumns determining the drop spot, and
user_data. If either of the GtkTreeViewColumn 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_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
GtkTreeViewSearchEqualFunc returns false on matches.
#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 ⇒ Boolean
Returns whether or not expanders are drawn in tree_view. otherwise.
#show_expanders=(show_expanders) ⇒ Boolean
true if the view has expanders.
#show_expanders? ⇒ Boolean
true if the view has expanders.
#tooltip_column ⇒ Integer
Returns tooltip-column.
#tooltip_column=(tooltip_column) ⇒ Integer
#unset_rows_drag_dest ⇒ nil
Undoes the effect of
gtk_tree_view_enable_model_drag_dest(). Calling this method sets
GtkTreeView:reorderable to false.
#unset_rows_drag_source ⇒ nil
Undoes the effect of
gtk_tree_view_enable_model_drag_source(). Calling this method sets
GtkTreeView:reorderable to false.