Class: Gtk::TreeSelection
- Inherits:
-
Object
- Object
- Gtk::TreeSelection
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#count_selected_rows ⇒ Integer
Returns the number of rows that have been selected in tree.
-
#get_selected(model, iter) ⇒ TrueClass
Sets iter to the currently selected node if selection is set to #GTK_SELECTION_SINGLE or #GTK_SELECTION_BROWSE.
-
#get_selected_rows(model) ⇒ GLib::List
Creates a list of path of all selected rows.
-
#iter_is_selected(iter) ⇒ TrueClass
Returns true if the row at iter is currently selected.
-
#mode ⇒ Gtk::SelectionMode
Selection mode.
-
#mode=(mode) ⇒ Gtk::SelectionMode
Selection mode.
-
#path_is_selected(path) ⇒ TrueClass
Returns true if the row pointed to by path is currently selected.
-
#select_all ⇒ nil
Selects all the nodes.
-
#select_function ⇒ Gtk::TreeSelectionFunc
Returns the current selection function.
-
#select_iter(iter) ⇒ nil
Selects the specified iterator.
-
#select_path(path) ⇒ nil
Select the row at path.
-
#select_range(start_path, end_path) ⇒ nil
Selects a range of nodes, determined by start_path and end_path inclusive.
-
#selected_foreach(func, data) ⇒ nil
Calls a function for each selected node.
-
#set_select_function(func, data, destroy) ⇒ nil
Sets the selection function.
-
#tree_view ⇒ Gtk::TreeView
Returns the tree view associated with selection.
-
#unselect_all ⇒ nil
Unselects all the nodes.
-
#unselect_iter(iter) ⇒ nil
Unselects the specified iterator.
-
#unselect_path(path) ⇒ nil
Unselects the row at path.
-
#unselect_range(start_path, end_path) ⇒ nil
Unselects a range of nodes, determined by start_path and end_path inclusive.
-
#user_data ⇒ GObject
Returns the user data for the selection function.
Instance Method Details
#count_selected_rows ⇒ Integer
Returns the number of rows that have been selected in tree.
#get_selected(model, iter) ⇒ TrueClass
Sets iter to the currently selected node if selection is set to #GTK_SELECTION_SINGLE or #GTK_SELECTION_BROWSE. iter may be NULL if you just want to test if selection has any selected nodes. model is filled with the current model as a convenience. This function will not work if you use selection is #GTK_SELECTION_MULTIPLE.
#get_selected_rows(model) ⇒ GLib::List
Creates a list of path of all selected rows. Additionally, if you are planning on modifying the model after calling this function, you may want to convert the returned list into a list of Gtk::TreeRowReferences. To do this, you can use gtk_tree_row_reference_new().
To free the return value, use:
g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
#iter_is_selected(iter) ⇒ TrueClass
Returns true if the row at iter is currently selected.
#mode ⇒ Gtk::SelectionMode
Selection mode. See gtk_tree_selection_set_mode() for more information on this property.
#mode=(mode) ⇒ Gtk::SelectionMode
Selection mode. See gtk_tree_selection_set_mode() for more information on this property.
#path_is_selected(path) ⇒ TrueClass
Returns true if the row pointed to by path is currently selected. If path does not point to a valid location, false is returned
#select_all ⇒ nil
Selects all the nodes. selection must be set to #GTK_SELECTION_MULTIPLE mode.
#select_function ⇒ Gtk::TreeSelectionFunc
Returns the current selection function.
#select_iter(iter) ⇒ nil
Selects the specified iterator.
#select_path(path) ⇒ nil
Select the row at path.
#select_range(start_path, end_path) ⇒ nil
Selects a range of nodes, determined by start_path and end_path inclusive. selection must be set to #GTK_SELECTION_MULTIPLE mode.
#selected_foreach(func, data) ⇒ nil
Calls a function for each selected node. Note that you cannot modify the tree or selection from within this function. As a result, gtk_tree_selection_get_selected_rows() might be more useful.
#set_select_function(func, data, destroy) ⇒ nil
Sets the selection function.
If set, this function is called before any node is selected or unselected, giving some control over which nodes are selected. The select function should return true if the state of the node may be toggled, and false if the state of the node should be left unchanged.
#tree_view ⇒ Gtk::TreeView
Returns the tree view associated with selection.
#unselect_all ⇒ nil
Unselects all the nodes.
#unselect_iter(iter) ⇒ nil
Unselects the specified iterator.
#unselect_path(path) ⇒ nil
Unselects the row at path.
#unselect_range(start_path, end_path) ⇒ nil
Unselects a range of nodes, determined by start_path and end_path inclusive.
#user_data ⇒ GObject
Returns the user data for the selection function.