pub struct GenericTextParagraphProperties { /* private fields */ }Expand description
Generic implementation of TextParagraphProperties.
Implementations§
Source§impl GenericTextParagraphProperties
impl GenericTextParagraphProperties
Sourcepub fn new(default_text_run_properties: Rc<dyn TextRunProperties>) -> Self
pub fn new(default_text_run_properties: Rc<dyn TextRunProperties>) -> Self
Creates left aligned, non wrapping paragraph properties with automatic line height and no letter spacing.
Sourcepub fn with_options(
default_text_run_properties: Rc<dyn TextRunProperties>,
text_alignment: TextAlignment,
text_wrapping: TextWrapping,
line_height: f64,
letter_spacing: f64,
) -> Self
pub fn with_options( default_text_run_properties: Rc<dyn TextRunProperties>, text_alignment: TextAlignment, text_wrapping: TextWrapping, line_height: f64, letter_spacing: f64, ) -> Self
Creates paragraph properties.
default_text_run_properties— default paragraph’s default run propertiestext_alignment— logical horizontal alignmenttext_wrapping— text wrap optionline_height— paragraph line heightletter_spacing— letter spacing
Sourcepub fn with_all(
flow_direction: FlowDirection,
text_alignment: TextAlignment,
first_line_in_paragraph: bool,
always_collapsible: bool,
default_text_run_properties: Rc<dyn TextRunProperties>,
text_wrapping: TextWrapping,
line_height: f64,
indent: f64,
letter_spacing: f64,
) -> Self
pub fn with_all( flow_direction: FlowDirection, text_alignment: TextAlignment, first_line_in_paragraph: bool, always_collapsible: bool, default_text_run_properties: Rc<dyn TextRunProperties>, text_wrapping: TextWrapping, line_height: f64, indent: f64, letter_spacing: f64, ) -> Self
Creates paragraph properties with every value specified.
Sourcepub fn set_line_spacing(&self, line_spacing: f64)
pub fn set_line_spacing(&self, line_spacing: f64)
Set line spacing: the additional space between lines.
Sourcepub fn from_properties(
text_paragraph_properties: &dyn TextParagraphProperties,
) -> Self
pub fn from_properties( text_paragraph_properties: &dyn TextParagraphProperties, ) -> Self
Creates a copy of other paragraph properties.
Trait Implementations§
Source§impl TextParagraphProperties for GenericTextParagraphProperties
impl TextParagraphProperties for GenericTextParagraphProperties
Source§fn flow_direction(&self) -> FlowDirection
fn flow_direction(&self) -> FlowDirection
This property specifies whether the primary text advance direction
shall be left-to-right, right-to-left.
Source§fn text_alignment(&self) -> TextAlignment
fn text_alignment(&self) -> TextAlignment
Gets the text alignment.
Source§fn line_height(&self) -> f64
fn line_height(&self) -> f64
Paragraph’s line height.
Source§fn line_spacing(&self) -> f64
fn line_spacing(&self) -> f64
Paragraph’s line spacing.
Source§fn first_line_in_paragraph(&self) -> bool
fn first_line_in_paragraph(&self) -> bool
Indicates the first line of the paragraph.
Source§fn always_collapsible(&self) -> bool
fn always_collapsible(&self) -> bool
If true, the formatted line may always be collapsed. If false, only
lines that overflow the paragraph width are collapsed.
Source§fn default_text_run_properties(&self) -> &Rc<dyn TextRunProperties>
fn default_text_run_properties(&self) -> &Rc<dyn TextRunProperties>
Gets the default text style.
Source§fn text_wrapping(&self) -> TextWrapping
fn text_wrapping(&self) -> TextWrapping
Gets the text wrapping.
Source§fn letter_spacing(&self) -> f64
fn letter_spacing(&self) -> f64
Gets the letter spacing.
Source§fn text_decorations(&self) -> Option<&TextDecorationCollection>
fn text_decorations(&self) -> Option<&TextDecorationCollection>
If not null, text decorations to apply to all runs in the line. This
is in addition to any text decorations specified by the text run
properties for individual text runs.
Source§fn paragraph_indent(&self) -> f64
fn paragraph_indent(&self) -> f64
Get the paragraph indentation.
Source§fn default_incremental_tab(&self) -> f64
fn default_incremental_tab(&self) -> f64
Gets the default incremental tab width.
Auto Trait Implementations§
impl !Freeze for GenericTextParagraphProperties
impl !RefUnwindSafe for GenericTextParagraphProperties
impl !Send for GenericTextParagraphProperties
impl !Sync for GenericTextParagraphProperties
impl !UnwindSafe for GenericTextParagraphProperties
impl Unpin for GenericTextParagraphProperties
impl UnsafeUnpin for GenericTextParagraphProperties
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
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more