ColumnViewColumnProtocol
public protocol ColumnViewColumnProtocol : ObjectProtocol
GtkColumnViewColumn represents the columns being added to GtkColumnView.
The main ingredient for a GtkColumnViewColumn is the GtkListItemFactory
that tells the columnview how to create cells for this column from items in
the model.
Columns have a title, and can optionally have a header menu set
with [methodGtk.ColumnViewColumn.set_header_menu].
A sorter can be associated with a column using
[methodGtk.ColumnViewColumn.set_sorter], to let users influence sorting
by clicking on the column header.
The ColumnViewColumnProtocol protocol exposes the methods and properties of an underlying GtkColumnViewColumn instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see ColumnViewColumn.
Alternatively, use ColumnViewColumnRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkColumnViewColumninstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
column_view_column_ptrDefault implementationTyped pointer to the underlying
GtkColumnViewColumninstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkColumnViewColumninstance.Declaration
Swift
var column_view_column_ptr: UnsafeMutablePointer<GtkColumnViewColumn>! { get } -
Required Initialiser for types conforming to
ColumnViewColumnProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
ColumnViewColumnPropertyNamesource property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: ColumnViewColumnPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a ColumnViewColumn property
Declaration
Swift
@inlinable func get(property: ColumnViewColumnPropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) Set the value of a ColumnViewColumn property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: ColumnViewColumnPropertyName, value v: GLibObject.Value)Parameters
propertythe property to get the value for
Return Value
the value of the named property
-
getColumnView()Extension methodGets the column view that’s currently displaying this column.
If
selfhas not been added to a column view yet,nilis returned.Declaration
Swift
@inlinable func getColumnView() -> ColumnViewRef! -
getExpand()Extension methodReturns whether this column should expand.
Declaration
Swift
@inlinable func getExpand() -> Bool -
getFactory()Extension methodGets the factory that’s currently used to populate list items for this column.
Declaration
Swift
@inlinable func getFactory() -> ListItemFactoryRef! -
getFixedWidth()Extension methodGets the fixed width of the column.
Declaration
Swift
@inlinable func getFixedWidth() -> Int -
getHeaderMenu()Extension methodGets the menu model that is used to create the context menu for the column header.
Declaration
Swift
@inlinable func getHeaderMenu() -> GIO.MenuModelRef! -
getResizable()Extension methodReturns whether this column is resizable.
Declaration
Swift
@inlinable func getResizable() -> Bool -
getSorter()Extension methodReturns the sorter that is associated with the column.
Declaration
Swift
@inlinable func getSorter() -> SorterRef! -
getTitle()Extension methodReturns the title set with
gtk_column_view_column_set_title().Declaration
Swift
@inlinable func getTitle() -> String! -
getVisible()Extension methodReturns whether this column is visible.
Declaration
Swift
@inlinable func getVisible() -> Bool -
set(expand:Extension method) Sets the column to take available extra space.
The extra space is shared equally amongst all columns that have the expand set to
true.Declaration
Swift
@inlinable func set(expand: Bool) -
set(factory:Extension method) Sets the
GtkListItemFactoryto use for populating list items for this column.Declaration
Swift
@inlinable func set(factory: ListItemFactoryRef? = nil) -
set(factory:Extension method) Sets the
GtkListItemFactoryto use for populating list items for this column.Declaration
Swift
@inlinable func set<ListItemFactoryT>(factory: ListItemFactoryT?) where ListItemFactoryT : ListItemFactoryProtocol -
set(fixedWidth:Extension method) If
fixed_widthis not -1, sets the fixed width ofcolumn; otherwise unsets it.Setting a fixed width overrides the automatically calculated width. Interactive resizing also sets the “fixed-width” property.
Declaration
Swift
@inlinable func set(fixedWidth: Int) -
setHeader(menu:Extension method) Sets the menu model that is used to create the context menu for the column header.
Declaration
Swift
@inlinable func setHeader(menu: GIO.MenuModelRef? = nil) -
setHeader(menu:Extension method) Sets the menu model that is used to create the context menu for the column header.
Declaration
Swift
@inlinable func setHeader<MenuModelT>(menu: MenuModelT?) where MenuModelT : MenuModelProtocol -
set(resizable:Extension method) Sets whether this column should be resizable by dragging.
Declaration
Swift
@inlinable func set(resizable: Bool) -
set(sorter:Extension method) Associates a sorter with the column.
If
sorterisnil, the column will not let users change the sorting by clicking on its header.This sorter can be made active by clicking on the column header, or by calling [method
Gtk.ColumnView.sort_by_column].See [method
Gtk.ColumnView.get_sorter] for the necessary steps for setting up customizable sorting for [classGtk.ColumnView].Declaration
Swift
@inlinable func set(sorter: SorterRef? = nil) -
set(sorter:Extension method) Associates a sorter with the column.
If
sorterisnil, the column will not let users change the sorting by clicking on its header.This sorter can be made active by clicking on the column header, or by calling [method
Gtk.ColumnView.sort_by_column].See [method
Gtk.ColumnView.get_sorter] for the necessary steps for setting up customizable sorting for [classGtk.ColumnView].Declaration
Swift
@inlinable func set<SorterT>(sorter: SorterT?) where SorterT : SorterProtocol -
set(title:Extension method) Sets the title of this column.
The title is displayed in the header of a
GtkColumnViewfor this column and is therefore user-facing text that should be translated.Declaration
Swift
@inlinable func set(title: UnsafePointer<CChar>? = nil) -
set(visible:Extension method) Sets whether this column should be visible in views.
Declaration
Swift
@inlinable func set(visible: Bool) -
columnViewExtension methodGets the column view that’s currently displaying this column.
If
selfhas not been added to a column view yet,nilis returned.Declaration
Swift
@inlinable var columnView: ColumnViewRef! { get } -
expandExtension methodColumn gets share of extra width allocated to the view.
Declaration
Swift
@inlinable var expand: Bool { get nonmutating set } -
factoryExtension methodFactory for populating list items.
Declaration
Swift
@inlinable var factory: ListItemFactoryRef! { get nonmutating set } -
fixedWidthExtension methodGets the fixed width of the column.
Declaration
Swift
@inlinable var fixedWidth: Int { get nonmutating set } -
headerMenuExtension methodGets the menu model that is used to create the context menu for the column header.
Declaration
Swift
@inlinable var headerMenu: GIO.MenuModelRef! { get nonmutating set } -
resizableExtension methodWhether this column is resizable.
Declaration
Swift
@inlinable var resizable: Bool { get nonmutating set } -
sorterExtension methodSorter for sorting items according to this column.
Declaration
Swift
@inlinable var sorter: SorterRef! { get nonmutating set } -
titleExtension methodTitle displayed in the header.
Declaration
Swift
@inlinable var title: String! { get nonmutating set } -
visibleExtension methodWhether this column is visible.
Declaration
Swift
@inlinable var visible: Bool { get nonmutating set }
View on GitHub
Install in Dash
ColumnViewColumnProtocol Protocol Reference