TreeSelectionRef
public struct TreeSelectionRef : TreeSelectionProtocol, GWeakCapturing
The selection object for GtkTreeView
The GtkTreeSelection object is a helper object to manage the selection
for a GtkTreeView widget. The GtkTreeSelection object is
automatically created when a new GtkTreeView widget is created, and
cannot exist independently 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 be
methods on the GtkTreeView widget instead of a separate function.
The GtkTreeSelection object is gotten from a GtkTreeView by calling
gtk_tree_view_get_selection(). It can be manipulated to check the
selection status of the tree, as well as select and deselect individual
rows. Selection is done completely view side. As a result, multiple
views of the same model can have completely different selections.
Additionally, you cannot change the selection of a row on the model that
is not currently displayed by the view without expanding its parents
first.
One of the important things to remember when monitoring the selection of
a view is that the GtkTreeSelectionchanged signal is mostly a hint.
That is, it may only emit one signal when a range of rows is selected.
Additionally, it may on occasion emit a GtkTreeSelectionchanged signal
when nothing has happened (mostly as a result of programmers calling
select_row on an already selected row).
The TreeSelectionRef type acts as a lightweight Swift reference to an underlying GtkTreeSelection instance.
It exposes methods that can operate on this data type through TreeSelectionProtocol conformance.
Use TreeSelectionRef only as an unowned reference to an existing GtkTreeSelection instance.
-
Untyped pointer to the underlying `GtkTreeSelection` instance.For type-safe access, use the generated, typed pointer
tree_selection_ptrproperty instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GtkTreeSelection>) -
Designated initialiser from a constant pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GtkTreeSelection>) -
Conditional initialiser from an optional pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GtkTreeSelection>?) -
Conditional initialiser from an optional, non-mutable pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GtkTreeSelection>?) -
Conditional initialiser from an optional
gpointerDeclaration
Swift
@inlinable init!(gpointer g: gpointer?) -
Conditional initialiser from an optional, non-mutable
gconstpointerDeclaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?) -
Reference intialiser for a related type that implements
TreeSelectionProtocolDeclaration
Swift
@inlinable init<T>(_ other: T) where T : TreeSelectionProtocol -
This factory is syntactic sugar for setting weak pointers wrapped in
GWeak<T>Declaration
Swift
@inlinable static func unowned<T>(_ other: T) -> TreeSelectionRef where T : TreeSelectionProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
TreeSelectionProtocol.Declaration
Swift
@inlinable init<T>(cPointer: UnsafeMutablePointer<T>) -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
TreeSelectionProtocol.Declaration
Swift
@inlinable init<T>(constPointer: UnsafePointer<T>) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
TreeSelectionProtocol.Declaration
Swift
@inlinable init(mutating raw: UnsafeRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
TreeSelectionProtocol.Declaration
Swift
@inlinable init(raw: UnsafeMutableRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
TreeSelectionProtocol.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer)
View on GitHub
Install in Dash
TreeSelectionRef Structure Reference