Struct gtk4::builders::ConstraintBuilder  
source · pub struct ConstraintBuilder { /* private fields */ }Expand description
A builder-pattern type to construct Constraint objects.
Implementations§
source§impl ConstraintBuilder
 
impl ConstraintBuilder
sourcepub fn constant(self, constant: f64) -> Self
 
pub fn constant(self, constant: f64) -> Self
The constant value to be added to the source-attribute.
sourcepub fn multiplier(self, multiplier: f64) -> Self
 
pub fn multiplier(self, multiplier: f64) -> Self
The multiplication factor to be applied to
the source-attribute.
sourcepub fn relation(self, relation: ConstraintRelation) -> Self
 
pub fn relation(self, relation: ConstraintRelation) -> Self
The order relation between the terms of the constraint.
sourcepub fn source(self, source: &impl IsA<ConstraintTarget>) -> Self
 
pub fn source(self, source: &impl IsA<ConstraintTarget>) -> Self
The source of the constraint.
The constraint will set the target-attribute
property of the target using the source-attribute
property of the source.
sourcepub fn source_attribute(self, source_attribute: ConstraintAttribute) -> Self
 
pub fn source_attribute(self, source_attribute: ConstraintAttribute) -> Self
The attribute of the source read by the
constraint.
sourcepub fn strength(self, strength: i32) -> Self
 
pub fn strength(self, strength: i32) -> Self
The strength of the constraint.
The strength can be expressed either using one of the symbolic values
of the ConstraintStrength enumeration, or any positive integer
value.
sourcepub fn target(self, target: &impl IsA<ConstraintTarget>) -> Self
 
pub fn target(self, target: &impl IsA<ConstraintTarget>) -> Self
The target of the constraint.
The constraint will set the target-attribute
property of the target using the source-attribute
property of the source widget.
sourcepub fn target_attribute(self, target_attribute: ConstraintAttribute) -> Self
 
pub fn target_attribute(self, target_attribute: ConstraintAttribute) -> Self
The attribute of the target set by the constraint.
sourcepub fn build(self) -> Constraint
 
pub fn build(self) -> Constraint
Build the Constraint.