?? gtktreeselection.sgml
字號:
<!-- ##### SECTION Title ##### -->GtkTreeSelection<!-- ##### SECTION Short_Description ##### -->The selection object for #GtkTreeView<!-- ##### SECTION Long_Description ##### --><para>The #GtkTreeSelection object is a helper object to manage the selectionfor a #GtkTreeView widget. The #GtkTreeSelection object isautomatically created when a new #GtkTreeView widget is created, andcannot exist independentally of this widget. The primary reason the#GtkTreeSelection objects exists is for cleanliness of code and API.That is, there is no conceptual reason all these functions could not bemethods on the #GtkTreeView widget instead of a separate function.</para><para>The #GtkTreeSelection object is gotten from a #GtkTreeView by callinggtk_tree_view_get_selection(). It can be manipulated to check theselection status of the tree, as well as select and deselect individualrows. Selection is done completely view side. As a result, multipleviews of the same model can have completely different selections.Additionally, you cannot change the selection of a row on the model thatis not currently displayed by the view without expanding its parentsfirst.</para><para>One of the important things to remember when monitoring the selection ofa view is that the "changed" signal is mostly a hint. That is, it mayonly emit one signal when a range of rows is selected. Additionally, itmay on occasion emit a "changed" signal when nothing has happened(mostly as a result of programmers calling select_row on an alreadyselected row).</para><!-- ##### SECTION See_Also ##### --><para>#GtkTreeView, #GtkTreeViewColumn, #GtkTreeDnd, #GtkTreeModel, #GtkTreeSortable, #GtkTreeModelSort, #GtkListStore, #GtkTreeStore, #GtkCellRenderer, #GtkCellEditable, #GtkCellRendererPixbuf, #GtkCellRendererText, #GtkCellRendererToggle</para><!-- ##### SECTION Stability_Level ##### --><!-- ##### STRUCT GtkTreeSelection ##### --><para></para><!-- ##### SIGNAL GtkTreeSelection::changed ##### --><para>Emitted whenever the selection has (possibly) changed. Please note thatthis signal is mostly a hint. It may only be emitted once when a rangeof rows are selected, and it may occasionally be emitted when nothinghas happened.</para>@treeselection: the object which received the signal.<!-- ##### USER_FUNCTION GtkTreeSelectionFunc ##### --><para>A function used by gtk_tree_selection_set_select_function() to filterwhether or not a row may be selected. It is called whenever a row'sstate might change. A return value of %TRUE indicates to @selectionthat it is okay to change the selection.</para>@selection: A #GtkTreeSelection@model: A #GtkTreeModel being viewed@path: The #GtkTreePath of the row in question@path_currently_selected: %TRUE, if the path is currently selected@data: user data@Returns: %TRUE, if the selection state of the row can be toggled<!-- ##### USER_FUNCTION GtkTreeSelectionForeachFunc ##### --><para>A function used by gtk_tree_selection_selected_foreach() to map allselected rows. It will be called on every selected row in the view.</para>@model: The #GtkTreeModel being viewed@path: The #GtkTreePath of a selected row@iter: A #GtkTreeIter pointing to a selected row@data: user data<!-- ##### FUNCTION gtk_tree_selection_set_mode ##### --><para></para>@selection: @type: <!-- ##### FUNCTION gtk_tree_selection_get_mode ##### --><para></para>@selection: @Returns: <!-- ##### FUNCTION gtk_tree_selection_set_select_function ##### --><para></para>@selection: @func: @data: @destroy: <!-- ##### FUNCTION gtk_tree_selection_get_user_data ##### --><para></para>@selection: @Returns: <!-- ##### FUNCTION gtk_tree_selection_get_tree_view ##### --><para></para>@selection: @Returns: <!-- ##### FUNCTION gtk_tree_selection_get_selected ##### --><para></para>@selection: @model: @iter: @Returns: <!-- ##### FUNCTION gtk_tree_selection_selected_foreach ##### --><para></para>@selection: @func: @data: <!-- ##### FUNCTION gtk_tree_selection_get_selected_rows ##### --><para></para>@selection: @model: @Returns: <!-- ##### FUNCTION gtk_tree_selection_count_selected_rows ##### --><para></para>@selection: @Returns: <!-- ##### FUNCTION gtk_tree_selection_select_path ##### --><para></para>@selection: @path: <!-- ##### FUNCTION gtk_tree_selection_unselect_path ##### --><para></para>@selection: @path: <!-- ##### FUNCTION gtk_tree_selection_path_is_selected ##### --><para></para>@selection: @path: @Returns: <!-- ##### FUNCTION gtk_tree_selection_select_iter ##### --><para></para>@selection: @iter: <!-- ##### FUNCTION gtk_tree_selection_unselect_iter ##### --><para></para>@selection: @iter: <!-- ##### FUNCTION gtk_tree_selection_iter_is_selected ##### --><para></para>@selection: @iter: @Returns: <!-- ##### FUNCTION gtk_tree_selection_select_all ##### --><para></para>@selection: <!-- ##### FUNCTION gtk_tree_selection_unselect_all ##### --><para></para>@selection: <!-- ##### FUNCTION gtk_tree_selection_select_range ##### --><para></para>@selection: @start_path: @end_path: <!-- ##### FUNCTION gtk_tree_selection_unselect_range ##### --><para></para>@selection: @start_path: @end_path:
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -