Skip to main content

GenericTextParagraphProperties

Struct GenericTextParagraphProperties 

Source
pub struct GenericTextParagraphProperties { /* private fields */ }
Expand description

Generic implementation of TextParagraphProperties.

Implementations§

Source§

impl GenericTextParagraphProperties

Source

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.

Source

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 properties
  • text_alignment — logical horizontal alignment
  • text_wrapping — text wrap option
  • line_height — paragraph line height
  • letter_spacing — letter spacing
Source

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.

Source

pub fn set_line_spacing(&self, line_spacing: f64)

Set line spacing: the additional space between lines.

Source

pub fn from_properties( text_paragraph_properties: &dyn TextParagraphProperties, ) -> Self

Creates a copy of other paragraph properties.

Trait Implementations§

Source§

impl TextParagraphProperties for GenericTextParagraphProperties

Source§

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

Gets the text alignment.
Source§

fn line_height(&self) -> f64

Paragraph’s line height.
Source§

fn line_spacing(&self) -> f64

Paragraph’s line spacing.
Source§

fn first_line_in_paragraph(&self) -> bool

Indicates the first line of the paragraph.
Source§

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>

Gets the default text style.
Source§

fn text_wrapping(&self) -> TextWrapping

Gets the text wrapping.
Source§

fn indent(&self) -> f64

Line indentation.
Source§

fn letter_spacing(&self) -> f64

Gets the letter spacing.
Source§

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

Get the paragraph indentation.
Source§

fn default_incremental_tab(&self) -> f64

Gets the default incremental tab width.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.