ListBoxRef
public struct ListBoxRef : ListBoxProtocol, GWeakCapturing
A GtkListBox is a vertical container that contains GtkListBoxRow children. These rows can be dynamically sorted and filtered, and headers can be added dynamically depending on the row content. It also allows keyboard and mouse navigation and selection like a typical list.
Using GtkListBox is often an alternative to GtkTreeView, especially
when the list contents has a more complicated layout than what is allowed
by a GtkCellRenderer, or when the contents is interactive (i.e. has a
button in it).
Although a GtkListBox must have only GtkListBoxRow children you can
add any kind of widget to it via gtk_container_add(), and a GtkListBoxRow
widget will automatically be inserted between the list and the widget.
GtkListBoxRows can be marked as activatable or selectable. If a row
is activatable, GtkListBox::row-activated will be emitted for it when
the user tries to activate it. If it is selectable, the row will be marked
as selected when the user tries to select it.
The GtkListBox widget was added in GTK+ 3.10.
GtkListBox as GtkBuildable
The GtkListBox implementation of the GtkBuildable interface supports
setting a child as the placeholder by specifying “placeholder” as the “type”
attribute of a <child> element. See gtk_list_box_set_placeholder() for info.
CSS nodes
(plain Language Example):
list
╰── row[.activatable]
GtkListBox uses a single CSS node named list. Each GtkListBoxRow uses a single CSS node named row. The row nodes get the .activatable style class added when appropriate.
The ListBoxRef type acts as a lightweight Swift reference to an underlying GtkListBox instance.
It exposes methods that can operate on this data type through ListBoxProtocol conformance.
Use ListBoxRef only as an unowned reference to an existing GtkListBox instance.
-
Untyped pointer to the underlying `GtkListBox` instance.For type-safe access, use the generated, typed pointer
list_box_ptrproperty instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GtkListBox>) -
Designated initialiser from a constant pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GtkListBox>) -
Conditional initialiser from an optional pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GtkListBox>?) -
Conditional initialiser from an optional, non-mutable pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GtkListBox>?) -
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
ListBoxProtocolDeclaration
Swift
@inlinable init<T>(_ other: T) where T : ListBoxProtocol -
This factory is syntactic sugar for setting weak pointers wrapped in
GWeak<T>Declaration
Swift
@inlinable static func unowned<T>(_ other: T) -> ListBoxRef where T : ListBoxProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
ListBoxProtocol.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
ListBoxProtocol.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
ListBoxProtocol.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
ListBoxProtocol.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
ListBoxProtocol.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer) -
Creates a new
GtkListBoxcontainer.Declaration
Swift
@inlinable init()
View on GitHub
Install in Dash
ListBoxRef Structure Reference