pub struct WrapBoxBuilder { /* private fields */ }v1_7 only.Expand description
A builder-pattern type to construct WrapBox objects.
Implementations§
Source§impl WrapBoxBuilder
impl WrapBoxBuilder
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 can_focus(self, can_focus: bool) -> Self
pub fn can_focus(self, can_focus: bool) -> Self
Whether the widget or any of its descendents can accept the input focus.
This property is meant to be set by widget implementations, typically in their instance init function.
Sourcepub fn can_target(self, can_target: bool) -> Self
pub fn can_target(self, can_target: bool) -> Self
Whether the widget can receive pointer events.
Sourcepub fn css_classes(self, css_classes: impl Into<StrV>) -> Self
pub fn css_classes(self, css_classes: impl Into<StrV>) -> Self
A list of css classes applied to this widget.
Sourcepub fn css_name(self, css_name: impl Into<GString>) -> Self
pub fn css_name(self, css_name: impl Into<GString>) -> Self
The name of this widget in the CSS tree.
This property is meant to be set by widget implementations, typically in their instance init function.
Sourcepub fn focus_on_click(self, focus_on_click: bool) -> Self
pub fn focus_on_click(self, focus_on_click: bool) -> Self
Whether the widget should grab focus when it is clicked with the mouse.
This property is only relevant for widgets that can take focus.
Sourcepub fn focusable(self, focusable: bool) -> Self
pub fn focusable(self, focusable: bool) -> Self
Whether this widget itself will accept the input focus.
Sourcepub fn halign(self, halign: Align) -> Self
pub fn halign(self, halign: Align) -> Self
How to distribute horizontal space if widget gets extra space.
Sourcepub fn has_tooltip(self, has_tooltip: bool) -> Self
pub fn has_tooltip(self, has_tooltip: bool) -> Self
Enables or disables the emission of the query-tooltip
signal on @widget.
A true value indicates that @widget can have a tooltip, in this case
the widget will be queried using query-tooltip to
determine whether it will provide a tooltip or not.
Sourcepub fn height_request(self, height_request: i32) -> Self
pub fn height_request(self, height_request: i32) -> Self
Overrides for height request of the widget.
If this is -1, the natural request will be used.
Sourcepub fn hexpand_set(self, hexpand_set: bool) -> Self
pub fn hexpand_set(self, hexpand_set: bool) -> Self
Whether to use the hexpand property.
Sourcepub fn layout_manager(self, layout_manager: &impl IsA<LayoutManager>) -> Self
pub fn layout_manager(self, layout_manager: &impl IsA<LayoutManager>) -> Self
The gtk::LayoutManager instance to use to compute
the preferred size of the widget, and allocate its children.
This property is meant to be set by widget implementations, typically in their instance init function.
Sourcepub fn limit_events(self, limit_events: bool) -> Self
Available on crate feature gtk_v4_18 only.
pub fn limit_events(self, limit_events: bool) -> Self
gtk_v4_18 only.Makes this widget act like a modal dialog, with respect to event delivery.
Global event controllers will not handle events with targets
inside the widget, unless they are set up to ignore propagation
limits. See Gtk::EventController::set_propagation_limit().
Sourcepub fn margin_bottom(self, margin_bottom: i32) -> Self
pub fn margin_bottom(self, margin_bottom: i32) -> Self
Margin on bottom side of widget.
This property adds margin outside of the widget’s normal size
request, the margin will be added in addition to the size from
[WidgetExtManual::set_size_request()][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
Sourcepub fn margin_end(self, margin_end: i32) -> Self
pub fn margin_end(self, margin_end: i32) -> Self
Margin on end of widget, horizontally.
This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget’s normal size
request, the margin will be added in addition to the size from
[WidgetExtManual::set_size_request()][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
Sourcepub fn margin_start(self, margin_start: i32) -> Self
pub fn margin_start(self, margin_start: i32) -> Self
Margin on start of widget, horizontally.
This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget’s normal size
request, the margin will be added in addition to the size from
[WidgetExtManual::set_size_request()][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
Sourcepub fn margin_top(self, margin_top: i32) -> Self
pub fn margin_top(self, margin_top: i32) -> Self
Margin on top side of widget.
This property adds margin outside of the widget’s normal size
request, the margin will be added in addition to the size from
[WidgetExtManual::set_size_request()][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
Sourcepub fn overflow(self, overflow: Overflow) -> Self
pub fn overflow(self, overflow: Overflow) -> Self
How content outside the widget’s content area is treated.
This property is meant to be set by widget implementations, typically in their instance init function.
Sourcepub fn receives_default(self, receives_default: bool) -> Self
pub fn receives_default(self, receives_default: bool) -> Self
Whether the widget will receive the default action when it is focused.
Sourcepub fn tooltip_markup(self, tooltip_markup: impl Into<GString>) -> Self
pub fn tooltip_markup(self, tooltip_markup: impl Into<GString>) -> Self
Sets the text of tooltip to be the given string, which is marked up with Pango markup.
Also see Gtk::Tooltip::set_markup().
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL:
has-tooltip will automatically be set to true
and there will be taken care of query-tooltip in
the default signal handler.
Note that if both tooltip-text and
tooltip-markup are set, the last one wins.
Sourcepub fn tooltip_text(self, tooltip_text: impl Into<GString>) -> Self
pub fn tooltip_text(self, tooltip_text: impl Into<GString>) -> Self
Sets the text of tooltip to be the given string.
Also see Gtk::Tooltip::set_text().
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL:
has-tooltip will automatically be set to true
and there will be taken care of query-tooltip in
the default signal handler.
Note that if both tooltip-text and
tooltip-markup are set, the last one wins.
Sourcepub fn valign(self, valign: Align) -> Self
pub fn valign(self, valign: Align) -> Self
How to distribute vertical space if widget gets extra space.
Sourcepub fn vexpand_set(self, vexpand_set: bool) -> Self
pub fn vexpand_set(self, vexpand_set: bool) -> Self
Whether to use the vexpand property.
Sourcepub fn width_request(self, width_request: i32) -> Self
pub fn width_request(self, width_request: i32) -> Self
Overrides for width request of the widget.
If this is -1, the natural request will be used.
Sourcepub fn accessible_role(self, accessible_role: AccessibleRole) -> Self
pub fn accessible_role(self, accessible_role: AccessibleRole) -> Self
The accessible role of the given gtk::Accessible implementation.
The accessible role cannot be changed once set.
Sourcepub fn orientation(self, orientation: Orientation) -> Self
pub fn orientation(self, orientation: Orientation) -> Self
The orientation of the orientable.