TabStop

Struct TabStop 

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

The style:tab-stops element is a container for style:tab-stop elements. If a style contains a style:tab-stops element, it overrides the entire style:tab-stops element of the parent style such that no style:tab-stop children are inherited; otherwise, the style inherits the entire style:tab-stops element as specified in section 16.2 style:style.

Implementations§

Source§

impl TabStop

Source

pub fn new() -> Self

Empty.

Source

pub fn attrmap(&self) -> &AttrMap2

General attributes.

Source

pub fn attrmap_mut(&mut self) -> &mut AttrMap2

General attributes.

Source

pub fn set_char(&mut self, c: char)

The style:char attribute specifies the delimiter character for tab stops of type char

Source

pub fn set_leader_color(&mut self, color: Rgb<u8>)

The style:leader-color attribute specifies the color of a leader line. The value of this attribute is either font-color or a color. If the value is font-color, the current text color is used for the leader line.

Source

pub fn set_leader_style(&mut self, style: LineStyle)

The style:leader-style attribute specifies a style for a leader line.

The defined values for the style:leader-style attribute are:

  • none: tab stop has no leader line.
  • dash: tab stop has a dashed leader line.
  • dot-dash: tab stop has a leader line whose repeating pattern is a dot followed by a dash.
  • dot-dot-dash: tab stop has a leader line whose repeating pattern has two dots followed by a dash.
  • dotted: tab stop has a dotted leader line.
  • long-dash: tab stop has a dashed leader line whose dashes are longer than the ones from the dashed line for value dash.
  • solid: tab stop has a solid leader line.
  • wave: tab stop has a wavy leader line.

Note: The definitions of the values of the style:leader-style attribute are based on the text decoration style ‘text-underline-style’ from CSS3Text, §9.2.

Source

pub fn set_leader_text(&mut self, text: char)

The style:leader-text attribute specifies a single Unicode character for use as leader text for tab stops. An consumer may support only specific characters as textual leaders. If a character that is not supported by a consumer is specified by this attribute, the consumer should display a leader character that it supports instead of the one specified by this attribute. If both style:leader-text and style:leader-style 19.480 attributes are specified, the value of the style:leader-text sets the leader text for tab stops.

The default value for this attribute is “ ” (U+0020, SPACE).

Source

pub fn set_leader_text_style(&mut self, styleref: &TextStyleRef)

The style:leader-text-style specifies a text style that is applied to a textual leader. It is not applied to leader lines. If the attribute appears in an automatic style, it may reference either an automatic text style or a common style. If the attribute appears in a common style, it may reference a common style only.

Source

pub fn set_leader_type(&mut self, t: LineType)

The style:leader-type attribute specifies whether a leader line should be drawn, and if so, whether a single or double line will be used.

The defined values for the style:leader-type attribute are:

  • double: a double line is drawn.
  • none: no line is drawn.
  • single: a single line is drawn.
Source

pub fn set_leader_width(&mut self, w: LineWidth)

The style:leader-width attribute specifies the width (i.e., thickness) of a leader line.

The defined values for the style:leader-width attribute are:

  • auto: the width of a leader line should be calculated from the font size of the text where the leader line will appear.
  • bold: the width of a leader line should be calculated from the font size of the text where the leader line will appear but is wider than for the value of auto.
  • a value of type percent 18.3.23
  • a value of type positiveInteger 18.2
  • a value of type positiveLength 18.3.26

The line widths referenced by the values medium, normal, thick and thin are implementation defined.

Source

pub fn set_position(&mut self, pos: Length)

The style:position attribute specifies the position of a tab stop. Depending on the value of the text:relative-tab-stop-position 19.861 attribute in the text:table-ofcontent-source 8.3.2, text:illustration-index-source 8.4.2, text:object-index-source 8.6.2, text:user-index-source 8.7.2 or text:alphabetical-index-source 8.8.2 parent element, the position of the tab is interpreted as being relative to the left margin or the left indent.

Source

pub fn set_type(&mut self, t: TabStopType)

The style:type attribute specifies the type of a tab stop within paragraph formatting properties.

The defined values for the style:type attribute are:

  • center: text is centered on a tab stop.
  • char: character appears at a tab stop position.
  • left: text is left aligned with a tab stop.
  • right: text is right aligned with a tab stop.

For a style:tab-stop 17.8 element the default value for this attribute is left.

Trait Implementations§

Source§

impl Clone for TabStop

Source§

fn clone(&self) -> TabStop

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TabStop

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TabStop

Source§

fn default() -> TabStop

Returns the “default value” for a type. Read more
Source§

impl GetSize for TabStop

Source§

fn get_heap_size(&self) -> usize

Determines how many bytes this object occupies inside the heap. Read more
Source§

fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>( &self, tracker: TRACKER, ) -> (usize, TRACKER)

Determines how many bytes this object occupies inside the heap while using a tracker. Read more
Source§

fn get_stack_size() -> usize

Determines how may bytes this object occupies inside the stack. Read more
Source§

fn get_size(&self) -> usize

Determines the total size of the object. Read more
Source§

fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)
where T: GetSizeTracker,

Determines the total size of the object while using a tracker. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.