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.

  • ptr

    Untyped pointer to the underlying GtkColumnViewColumn instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • column_view_column_ptr Default implementation

    Typed pointer to the underlying GtkColumnViewColumn instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GtkColumnViewColumn instance.

    Declaration

    Swift

    var column_view_column_ptr: UnsafeMutablePointer<GtkColumnViewColumn>! { get }
  • Required Initialiser for types conforming to ColumnViewColumnProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

ColumnViewColumn Class

  • Bind a ColumnViewColumnPropertyName source 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 : ObjectProtocol

    Parameters

    source_property

    the source property to bind

    target

    the target object to bind to

    target_property

    the target property to bind to

    flags

    the flags to pass to the Binding

    transform_from

    ValueTransformer to use for forward transformation

    transform_to

    ValueTransformer to use for backwards transformation

    Return Value

    binding reference or nil in case of an error

  • get(property:) Extension method

    Get the value of a ColumnViewColumn property

    Declaration

    Swift

    @inlinable
    func get(property: ColumnViewColumnPropertyName) -> GLibObject.Value

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

  • set(property:value:) Extension method

    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

    property

    the property to get the value for

    Return Value

    the value of the named property

ColumnViewColumn Class: ColumnViewColumnProtocol extension (methods and fields)

  • getColumnView() Extension method

    Gets the column view that’s currently displaying this column.

    If self has not been added to a column view yet, nil is returned.

    Declaration

    Swift

    @inlinable
    func getColumnView() -> ColumnViewRef!
  • getExpand() Extension method

    Returns whether this column should expand.

    Declaration

    Swift

    @inlinable
    func getExpand() -> Bool
  • getFactory() Extension method

    Gets the factory that’s currently used to populate list items for this column.

    Declaration

    Swift

    @inlinable
    func getFactory() -> ListItemFactoryRef!
  • getFixedWidth() Extension method

    Gets the fixed width of the column.

    Declaration

    Swift

    @inlinable
    func getFixedWidth() -> Int
  • getHeaderMenu() Extension method

    Gets the menu model that is used to create the context menu for the column header.

    Declaration

    Swift

    @inlinable
    func getHeaderMenu() -> GIO.MenuModelRef!
  • getResizable() Extension method

    Returns whether this column is resizable.

    Declaration

    Swift

    @inlinable
    func getResizable() -> Bool
  • getSorter() Extension method

    Returns the sorter that is associated with the column.

    Declaration

    Swift

    @inlinable
    func getSorter() -> SorterRef!
  • getTitle() Extension method

    Returns the title set with gtk_column_view_column_set_title().

    Declaration

    Swift

    @inlinable
    func getTitle() -> String!
  • getVisible() Extension method

    Returns 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 GtkListItemFactory to use for populating list items for this column.

    Declaration

    Swift

    @inlinable
    func set(factory: ListItemFactoryRef? = nil)
  • set(factory:) Extension method

    Sets the GtkListItemFactory to 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_width is not -1, sets the fixed width of column; 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 sorter is nil, 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 [methodGtk.ColumnView.sort_by_column].

    See [methodGtk.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 sorter is nil, 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 [methodGtk.ColumnView.sort_by_column].

    See [methodGtk.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 GtkColumnView for 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)
  • columnView Extension method

    Gets the column view that’s currently displaying this column.

    If self has not been added to a column view yet, nil is returned.

    Declaration

    Swift

    @inlinable
    var columnView: ColumnViewRef! { get }
  • expand Extension method

    Column gets share of extra width allocated to the view.

    Declaration

    Swift

    @inlinable
    var expand: Bool { get nonmutating set }
  • factory Extension method

    Factory for populating list items.

    Declaration

    Swift

    @inlinable
    var factory: ListItemFactoryRef! { get nonmutating set }
  • fixedWidth Extension method

    Gets the fixed width of the column.

    Declaration

    Swift

    @inlinable
    var fixedWidth: Int { get nonmutating set }
  • headerMenu Extension method

    Gets 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 }
  • resizable Extension method

    Whether this column is resizable.

    Declaration

    Swift

    @inlinable
    var resizable: Bool { get nonmutating set }
  • sorter Extension method

    Sorter for sorting items according to this column.

    Declaration

    Swift

    @inlinable
    var sorter: SorterRef! { get nonmutating set }
  • title Extension method

    Title displayed in the header.

    Declaration

    Swift

    @inlinable
    var title: String! { get nonmutating set }
  • visible Extension method

    Whether this column is visible.

    Declaration

    Swift

    @inlinable
    var visible: Bool { get nonmutating set }