GridLayoutProtocol
public protocol GridLayoutProtocol : LayoutManagerProtocol
GtkGridLayout is a layout manager which arranges child widgets in
rows and columns.
Children have an “attach point” defined by the horizontal and vertical
index of the cell they occupy; children can span multiple rows or columns.
The layout properties for setting the attach points and spans are set
using the [classGtk.GridLayoutChild] associated to each child widget.
The behaviour of GtkGridLayout when several children occupy the same
grid cell is undefined.
GtkGridLayout can be used like a GtkBoxLayout if all children are
attached to the same row or column; however, if you only ever need a
single row or column, you should consider using GtkBoxLayout.
The GridLayoutProtocol protocol exposes the methods and properties of an underlying GtkGridLayout 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 GridLayout.
Alternatively, use GridLayoutRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkGridLayoutinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
grid_layout_ptrDefault implementationTyped pointer to the underlying
GtkGridLayoutinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkGridLayoutinstance.Declaration
Swift
var grid_layout_ptr: UnsafeMutablePointer<GtkGridLayout>! { get } -
Required Initialiser for types conforming to
GridLayoutProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
GridLayoutPropertyNamesource property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: GridLayoutPropertyName, 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 GridLayout property
Declaration
Swift
@inlinable func get(property: GridLayoutPropertyName) -> 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 GridLayout property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: GridLayoutPropertyName, value v: GLibObject.Value)Parameters
propertythe property to get the value for
Return Value
the value of the named property
-
getBaselineRow()Extension methodRetrieves the row set with
gtk_grid_layout_set_baseline_row().Declaration
Swift
@inlinable func getBaselineRow() -> Int -
getColumnHomogeneous()Extension methodChecks whether all columns of
gridshould have the same width.Declaration
Swift
@inlinable func getColumnHomogeneous() -> Bool -
getColumnSpacing()Extension methodRetrieves the spacing set with
gtk_grid_layout_set_column_spacing().Declaration
Swift
@inlinable func getColumnSpacing() -> Int -
getRowBaselinePosition(row:Extension method) Returns the baseline position of
row.If no value has been set with [method
Gtk.GridLayout.set_row_baseline_position], the default value ofGTK_BASELINE_POSITION_CENTERis returned.Declaration
Swift
@inlinable func getRowBaselinePosition(row: Int) -> GtkBaselinePosition -
getRowHomogeneous()Extension methodChecks whether all rows of
gridshould have the same height.Declaration
Swift
@inlinable func getRowHomogeneous() -> Bool -
getRowSpacing()Extension methodRetrieves the spacing set with
gtk_grid_layout_set_row_spacing().Declaration
Swift
@inlinable func getRowSpacing() -> Int -
setBaseline(row:Extension method) Sets which row defines the global baseline for the entire grid.
Each row in the grid can have its own local baseline, but only one of those is global, meaning it will be the baseline in the parent of the
grid.Declaration
Swift
@inlinable func setBaseline(row: Int) -
setColumn(homogeneous:Extension method) Sets whether all columns of
gridshould have the same width.Declaration
Swift
@inlinable func setColumn(homogeneous: Bool) -
setColumn(spacing:Extension method) Sets the amount of space to insert between consecutive columns.
Declaration
Swift
@inlinable func setColumn(spacing: Int) -
setRowBaselinePosition(row:Extension methodpos: ) Sets how the baseline should be positioned on
rowof the grid, in case that row is assigned more space than is requested.Declaration
Swift
@inlinable func setRowBaselinePosition(row: Int, pos: GtkBaselinePosition) -
setRow(homogeneous:Extension method) Sets whether all rows of
gridshould have the same height.Declaration
Swift
@inlinable func setRow(homogeneous: Bool) -
setRow(spacing:Extension method) Sets the amount of space to insert between consecutive rows.
Declaration
Swift
@inlinable func setRow(spacing: Int) -
baselineRowExtension methodRetrieves the row set with
gtk_grid_layout_set_baseline_row().Declaration
Swift
@inlinable var baselineRow: Int { get nonmutating set } -
columnHomogeneousExtension methodChecks whether all columns of
gridshould have the same width.Declaration
Swift
@inlinable var columnHomogeneous: Bool { get nonmutating set } -
columnSpacingExtension methodRetrieves the spacing set with
gtk_grid_layout_set_column_spacing().Declaration
Swift
@inlinable var columnSpacing: Int { get nonmutating set } -
rowHomogeneousExtension methodChecks whether all rows of
gridshould have the same height.Declaration
Swift
@inlinable var rowHomogeneous: Bool { get nonmutating set } -
rowSpacingExtension methodRetrieves the spacing set with
gtk_grid_layout_set_row_spacing().Declaration
Swift
@inlinable var rowSpacing: Int { get nonmutating set }
View on GitHub
Install in Dash
GridLayoutProtocol Protocol Reference