pub struct ParagraphMix<P>(/* private fields */);Expand description
m Text paragraph properties.
The base Text! widget only implements minimal support for paragraphs, rich text widgets will probably
segment paragraphs into sub widgets and may ignore PARAGRAPH_BREAK_VAR depending on the source text format.
Implementations§
Source§impl ParagraphMix<()>
impl ParagraphMix<()>
Sourcepub fn context_vars_set(set: &mut ContextValueSet)
pub fn context_vars_set(set: &mut ContextValueSet)
Insert context variables used by properties in this mixin.
Source§impl<P: WidgetImpl> ParagraphMix<P>
impl<P: WidgetImpl> ParagraphMix<P>
Sourcepub fn paragraph_break(&self, mode: impl IntoVar<ParagraphBreak>)
pub fn paragraph_break(&self, mode: impl IntoVar<ParagraphBreak>)
P Defines paragraphs in the text.
In the base Text! widget this defines how paragraph_spacing and paragraph_indent are applied.
Other rich text widgets usually segment paragraphs into widgets and may ignore this property, depending on the source text format.
Sets the PARAGRAPH_BREAK_VAR.
Source§impl<P: WidgetImpl> ParagraphMix<P>
impl<P: WidgetImpl> ParagraphMix<P>
Sourcepub fn paragraph_spacing(&self, extra: impl IntoVar<ParagraphSpacing>)
pub fn paragraph_spacing(&self, extra: impl IntoVar<ParagraphSpacing>)
P Extra spacing in-between paragraphs.
The default value is 1.em(). Note that paragraph_break defines the entire text as a single paragraph
by default, so this will not be applied by default on the base Text! widget.
Sets the PARAGRAPH_SPACING_VAR.
Source§impl<P: WidgetImpl> ParagraphMix<P>
impl<P: WidgetImpl> ParagraphMix<P>
Sourcepub fn paragraph_indent(&self, indent: impl IntoVar<Indentation>)
pub fn paragraph_indent(&self, indent: impl IntoVar<Indentation>)
P Extra spacing added at the start of lines in a paragraph.
This can be set to a width Length to insert spacing at the start of each first line,
or it can be set to (Length, true) to hang all lines except the first.
See paragraph_break for how to define paragraphs.
Sets the PARAGRAPH_INDENT_VAR.
Trait Implementations§
Source§impl<P> Deref for ParagraphMix<P>
impl<P> Deref for ParagraphMix<P>
Auto Trait Implementations§
impl<P> Freeze for ParagraphMix<P>where
P: Freeze,
impl<P> RefUnwindSafe for ParagraphMix<P>where
P: RefUnwindSafe,
impl<P> Send for ParagraphMix<P>where
P: Send,
impl<P> Sync for ParagraphMix<P>where
P: Sync,
impl<P> Unpin for ParagraphMix<P>where
P: Unpin,
impl<P> UnwindSafe for ParagraphMix<P>where
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more