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
GtkConstraintGuideinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
constraint_guide_ptrDefault implementationTyped pointer to the underlying
GtkConstraintGuideinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkConstraintGuideinstance.Declaration
Swift
var constraint_guide_ptr: UnsafeMutablePointer<GtkConstraintGuide>! { get } -
Required Initialiser for types conforming to
ConstraintGuideProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
ConstraintGuidePropertyNamesource 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 : 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 ConstraintGuide property
Declaration
Swift
@inlinable func get(property: ConstraintGuidePropertyName) -> 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 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
propertythe 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
guideis 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
guideis 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
guideis 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) -
nameExtension methodA name that identifies the
GtkConstraintGuide, for debugging.Declaration
Swift
@inlinable var name: String! { get nonmutating set } -
strengthExtension methodThe
GtkConstraintStrengthto be used for the constraint on the natural size of the guide.Declaration
Swift
@inlinable var strength: GtkConstraintStrength { get nonmutating set }
View on GitHub
Install in Dash
ConstraintGuideProtocol Protocol Reference