AlignmentRef

public struct AlignmentRef : AlignmentProtocol, GWeakCapturing

The GtkAlignment widget controls the alignment and size of its child widget. It has four settings: xscale, yscale, xalign, and yalign.

The scale settings are used to specify how much the child widget should expand to fill the space allocated to the GtkAlignment. The values can range from 0 (meaning the child doesn’t expand at all) to 1 (meaning the child expands to fill all of the available space).

The align settings are used to place the child widget within the available area. The values range from 0 (top or left) to 1 (bottom or right). Of course, if the scale settings are both set to 1, the alignment settings have no effect.

GtkAlignment has been deprecated in 3.14 and should not be used in newly-written code. The desired effect can be achieved by using the GtkWidget:halign, GtkWidget:valign and GtkWidget:margin properties on the child widget.

The AlignmentRef type acts as a lightweight Swift reference to an underlying GtkAlignment instance. It exposes methods that can operate on this data type through AlignmentProtocol conformance. Use AlignmentRef only as an unowned reference to an existing GtkAlignment instance.

  • ptr
    Untyped pointer to the underlying `GtkAlignment` instance.
    

    For type-safe access, use the generated, typed pointer alignment_ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

Alignment Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafeMutablePointer<GtkAlignment>)
  • Designated initialiser from a constant pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafePointer<GtkAlignment>)
  • Conditional initialiser from an optional pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafeMutablePointer<GtkAlignment>?)
  • Conditional initialiser from an optional, non-mutable pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GtkAlignment>?)
  • Conditional initialiser from an optional gpointer

    Declaration

    Swift

    @inlinable
    init!(gpointer g: gpointer?)
  • Conditional initialiser from an optional, non-mutable gconstpointer

    Declaration

    Swift

    @inlinable
    init!(gconstpointer g: gconstpointer?)
  • Reference intialiser for a related type that implements AlignmentProtocol

    Declaration

    Swift

    @inlinable
    init<T>(_ other: T) where T : AlignmentProtocol
  • This factory is syntactic sugar for setting weak pointers wrapped in GWeak<T>

    Declaration

    Swift

    @inlinable
    static func unowned<T>(_ other: T) -> AlignmentRef where T : AlignmentProtocol
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to AlignmentProtocol.

    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 AlignmentProtocol.

    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 AlignmentProtocol.

    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 AlignmentProtocol.

    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 AlignmentProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Creates a new `GtkAlignment`.
    

    new is deprecated: Use #GtkWidget alignment and margin properties

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    init(xalign: Double, yalign: Double, xscale: Double, yscale: Double)