ConstraintGuideProtocol

public protocol ConstraintGuideProtocol : ObjectProtocol, ConstraintTargetProtocol

A GtkConstraintGuide is an invisible layout element in a GtkConstraintLayout.

The GtkConstraintLayout treats guides like widgets. They can be used as the source or target of a GtkConstraint.

Guides have a minimum, maximum and natural size. Depending on the constraints that are applied, they can act like a guideline that widgets can be aligned to, or like flexible space.

Unlike a GtkWidget, a GtkConstraintGuide will not be drawn.

The ConstraintGuideProtocol protocol exposes the methods and properties of an underlying GtkConstraintGuide 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 ConstraintGuide. Alternatively, use ConstraintGuideRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying GtkConstraintGuide instance.

    Declaration

    Swift

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

    Typed pointer to the underlying GtkConstraintGuide instance.

    Default Implementation

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

    Declaration

    Swift

    var constraint_guide_ptr: UnsafeMutablePointer<GtkConstraintGuide>! { get }
  • Required Initialiser for types conforming to ConstraintGuideProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

ConstraintGuide Class

  • Bind a ConstraintGuidePropertyName source property to a given target object.

    Declaration

    Swift

    @discardableResult
    @inlinable
    func bind<Q, T>(property source_property: ConstraintGuidePropertyName, 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 ConstraintGuide property

    Declaration

    Swift

    @inlinable
    func get(property: ConstraintGuidePropertyName) -> 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 ConstraintGuide property. Note that this will only have an effect on properties that are writable and not construct-only!

    Declaration

    Swift

    @inlinable
    func set(property: ConstraintGuidePropertyName, value v: GLibObject.Value)

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

ConstraintGuide Class: ConstraintGuideProtocol extension (methods and fields)

  • getMaxSize(width:height:) Extension method

    Gets the maximum size of guide.

    Declaration

    Swift

    @inlinable
    func getMaxSize(width: UnsafeMutablePointer<gint>? = nil, height: UnsafeMutablePointer<gint>? = nil)
  • getMinSize(width:height:) Extension method

    Gets the minimum size of guide.

    Declaration

    Swift

    @inlinable
    func getMinSize(width: UnsafeMutablePointer<gint>? = nil, height: UnsafeMutablePointer<gint>? = nil)
  • getName() Extension method

    Retrieves the name set using gtk_constraint_guide_set_name().

    Declaration

    Swift

    @inlinable
    func getName() -> String!
  • getNatSize(width:height:) Extension method

    Gets the natural size of guide.

    Declaration

    Swift

    @inlinable
    func getNatSize(width: UnsafeMutablePointer<gint>? = nil, height: UnsafeMutablePointer<gint>? = nil)
  • getStrength() Extension method

    Retrieves the strength set using gtk_constraint_guide_set_strength().

    Declaration

    Swift

    @inlinable
    func getStrength() -> GtkConstraintStrength
  • setMaxSize(width:height:) Extension method

    Sets the maximum size of guide.

    If guide is attached to a GtkConstraintLayout, the constraints will be updated to reflect the new size.

    Declaration

    Swift

    @inlinable
    func setMaxSize(width: Int, height: Int)
  • setMinSize(width:height:) Extension method

    Sets the minimum size of guide.

    If guide is attached to a GtkConstraintLayout, the constraints will be updated to reflect the new size.

    Declaration

    Swift

    @inlinable
    func setMinSize(width: Int, height: Int)
  • set(name:) Extension method

    Sets a name for the given GtkConstraintGuide.

    The name is useful for debugging purposes.

    Declaration

    Swift

    @inlinable
    func set(name: UnsafePointer<CChar>? = nil)
  • setNatSize(width:height:) Extension method

    Sets the natural size of guide.

    If guide is attached to a GtkConstraintLayout, the constraints will be updated to reflect the new size.

    Declaration

    Swift

    @inlinable
    func setNatSize(width: Int, height: Int)
  • set(strength:) Extension method

    Sets the strength of the constraint on the natural size of the given GtkConstraintGuide.

    Declaration

    Swift

    @inlinable
    func set(strength: GtkConstraintStrength)
  • name Extension method

    A name that identifies the GtkConstraintGuide, for debugging.

    Declaration

    Swift

    @inlinable
    var name: String! { get nonmutating set }
  • strength Extension method

    The GtkConstraintStrength to be used for the constraint on the natural size of the guide.

    Declaration

    Swift

    @inlinable
    var strength: GtkConstraintStrength { get nonmutating set }