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.
-
Untyped pointer to the underlying
GtkConstraintGuide
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
constraint_guide_ptr
Default implementationTyped 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)
-
bind(property:
Extension methodto: _: flags: transformFrom: transformTo: ) 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 transformationtransform_to
ValueTransformer
to use for backwards transformationReturn 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:
Extension methodvalue: ) 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
-
getMaxSize(width:
Extension methodheight: ) Gets the maximum size of
guide
.Declaration
Swift
@inlinable func getMaxSize(width: UnsafeMutablePointer<gint>? = nil, height: UnsafeMutablePointer<gint>? = nil)
-
getMinSize(width:
Extension methodheight: ) Gets the minimum size of
guide
.Declaration
Swift
@inlinable func getMinSize(width: UnsafeMutablePointer<gint>? = nil, height: UnsafeMutablePointer<gint>? = nil)
-
getName()
Extension methodRetrieves the name set using
gtk_constraint_guide_set_name()
.Declaration
Swift
@inlinable func getName() -> String!
-
getNatSize(width:
Extension methodheight: ) Gets the natural size of
guide
.Declaration
Swift
@inlinable func getNatSize(width: UnsafeMutablePointer<gint>? = nil, height: UnsafeMutablePointer<gint>? = nil)
-
getStrength()
Extension methodRetrieves the strength set using
gtk_constraint_guide_set_strength()
.Declaration
Swift
@inlinable func getStrength() -> GtkConstraintStrength
-
setMaxSize(width:
Extension methodheight: ) Sets the maximum size of
guide
.If
guide
is attached to aGtkConstraintLayout
, the constraints will be updated to reflect the new size.Declaration
Swift
@inlinable func setMaxSize(width: Int, height: Int)
-
setMinSize(width:
Extension methodheight: ) Sets the minimum size of
guide
.If
guide
is attached to aGtkConstraintLayout
, 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:
Extension methodheight: ) Sets the natural size of
guide
.If
guide
is attached to aGtkConstraintLayout
, 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 methodA name that identifies the
GtkConstraintGuide
, for debugging.Declaration
Swift
@inlinable var name: String! { get nonmutating set }
-
strength
Extension methodThe
GtkConstraintStrength
to be used for the constraint on the natural size of the guide.Declaration
Swift
@inlinable var strength: GtkConstraintStrength { get nonmutating set }