pub struct WrapLayoutBuilder { /* private fields */ }v1_7 only.Expand description
A builder-pattern type to construct WrapLayout objects.
Implementations§
Source§impl WrapLayoutBuilder
impl WrapLayoutBuilder
Sourcepub fn align(self, align: f32) -> Self
pub fn align(self, align: f32) -> Self
The alignment of the children within each line.
0 means the children are placed at the start of the line, 1 means they are placed at the end of the line. 0.5 means they are placed in the middle of the line.
Alignment is only used when justify is set to
ADW_JUSTIFY_NONE, or on the last line when the
justify-last-line is FALSE.
Sourcepub fn child_spacing(self, child_spacing: i32) -> Self
pub fn child_spacing(self, child_spacing: i32) -> Self
The spacing between widgets on the same line.
See child-spacing-unit.
Sourcepub fn child_spacing_unit(self, child_spacing_unit: LengthUnit) -> Self
pub fn child_spacing_unit(self, child_spacing_unit: LengthUnit) -> Self
The length unit for child spacing.
Allows the spacing to vary depending on the text scale factor.
See child-spacing.
Sourcepub fn justify(self, justify: JustifyMode) -> Self
pub fn justify(self, justify: JustifyMode) -> Self
Determines whether and how each complete line should be stretched to fill the entire widget.
If set to ADW_JUSTIFY_FILL, each widget in the line will be stretched,
keeping consistent spacing, so that the line fills the entire widget.
If set to ADW_JUSTIFY_SPREAD, the spacing between widgets will be
increased, keeping widget sizes intact. The first and last widget will be
aligned with the beginning and end of the line. If the line only contains a
single widget, it will be stretched regardless.
If set to ADW_JUSTIFY_NONE, the line will not be stretched and the
children will be placed together within the line, according to
align.
By default this doesn’t affect the last line, as it will be incomplete. Use
justify-last-line to justify it as well.
Sourcepub fn justify_last_line(self, justify_last_line: bool) -> Self
pub fn justify_last_line(self, justify_last_line: bool) -> Self
Whether the last line should be stretched to fill the entire widget.
See justify.
Sourcepub fn line_homogeneous(self, line_homogeneous: bool) -> Self
pub fn line_homogeneous(self, line_homogeneous: bool) -> Self
Whether all lines should take the same amount of space.
Sourcepub fn line_spacing(self, line_spacing: i32) -> Self
pub fn line_spacing(self, line_spacing: i32) -> Self
The spacing between lines.
See line-spacing-unit.
Sourcepub fn line_spacing_unit(self, line_spacing_unit: LengthUnit) -> Self
pub fn line_spacing_unit(self, line_spacing_unit: LengthUnit) -> Self
The length unit for line spacing.
Allows the spacing to vary depending on the text scale factor.
See line-spacing.
Sourcepub fn natural_line_length(self, natural_line_length: i32) -> Self
pub fn natural_line_length(self, natural_line_length: i32) -> Self
Determines the natural size for each line.
It should be used to limit the line lengths, for example when used in popovers.
Sourcepub fn natural_line_length_unit(
self,
natural_line_length_unit: LengthUnit,
) -> Self
pub fn natural_line_length_unit( self, natural_line_length_unit: LengthUnit, ) -> Self
The length unit for natural line length.
Allows the length to vary depending on the text scale factor.
See natural-line-length.
Sourcepub fn pack_direction(self, pack_direction: PackDirection) -> Self
pub fn pack_direction(self, pack_direction: PackDirection) -> Self
The direction children are packed in each line.
Sourcepub fn wrap_policy(self, wrap_policy: WrapPolicy) -> Self
pub fn wrap_policy(self, wrap_policy: WrapPolicy) -> Self
The policy for line wrapping.
If set to ADW_WRAP_NATURAL, the box will wrap to the next line as soon as
the previous line cannot fit any more children without shrinking them past
their natural size.
If set to ADW_WRAP_MINIMUM, the box will try to fit as many children into
each line as possible, shrinking them down to their minimum size before
wrapping to the next line.
Sourcepub fn wrap_reverse(self, wrap_reverse: bool) -> Self
pub fn wrap_reverse(self, wrap_reverse: bool) -> Self
Whether wrap direction should be reversed.
By default, lines wrap downwards in a horizontal box, and towards the end
in a vertical box. If set to TRUE, they wrap upwards or towards the start
respectively.
Sourcepub fn orientation(self, orientation: Orientation) -> Self
pub fn orientation(self, orientation: Orientation) -> Self
The orientation of the orientable.
Sourcepub fn build(self) -> WrapLayout
pub fn build(self) -> WrapLayout
Build the WrapLayout.