Skip to main content

HeaderFooterStyle

Struct HeaderFooterStyle 

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

Style attributes for header/footer.

Implementations§

Source§

impl HeaderFooterStyle

Source

pub fn style(&self) -> &AttrMap2

General attributes.

Source

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

General attributes.

Source

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

The fo:background-color attribute specifies a background color for characters, paragraphs, text sections, frames, page bodies, headers, footers, table cells, table rows and tables. This can be transparent or a color. If the value is set to transparent, it switches off any background image that is specified by a style:background-image 17.3.

If a value for a draw:fill attribute is provided in a style, any background image that is specified by a style:background-image element and any background color that is specified with the fo:background-color attribute are switched off.

Source

pub fn set_border(&mut self, width: Length, border: Border, color: Rgb<u8>)

Border style all four sides. See §7.29.3 of XSL.

Source

pub fn set_border_bottom( &mut self, width: Length, border: Border, color: Rgb<u8>, )

Border style. See §7.29.4 of XSL

Source

pub fn set_border_left(&mut self, width: Length, border: Border, color: Rgb<u8>)

Border style. See §7.29.6 of XSL.

Source

pub fn set_border_right( &mut self, width: Length, border: Border, color: Rgb<u8>, )

Border style. See §7.29.7 of XSL.

Source

pub fn set_border_top(&mut self, width: Length, border: Border, color: Rgb<u8>)

Border style. See §7.29.10 of XSL.

Source

pub fn set_margin(&mut self, margin: Margin)

See §7.29.14 of XSL. In the OpenDocument XSL-compatible namespace, the fo:margin attribute does not support auto and inherit values.

The fo:margin attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6 and style:tableproperties 17.15.

Source

pub fn set_margin_bottom(&mut self, margin: Margin)

See §7.10.2 of XSL. If this attribute is contained in a style:paragraph-properties 17.6 element, its value may be a percentage that refers to the corresponding margin of a parent style. In the OpenDocument XSL-compatible namespace, the fo:margin-bottom attribute does not support the auto and inherit values.

The fo:margin-bottom attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6 and style:tableproperties 17.15.

Source

pub fn set_margin_left(&mut self, margin: Margin)

See §7.10.3 of XSL. If this attribute is contained in a style:paragraph-properties 17.6 element, its value may be a percentage that refers to the corresponding margin of a parent style. Tables that align to the left or to the center ignore right margins, and tables that align to the right or to the center ignore left margins.

The fo:margin-left attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6, style:sectionproperties 17.11 and style:table-properties 17.15.

Source

pub fn set_margin_right(&mut self, margin: Margin)

See §7.10.4 of XSL. If this attribute is contained in a style:paragraph-properties 17.6 element, its value may be a percentage that refers to the corresponding margin of a parent style. Tables that align to the left or to the center ignore right margins, and tables that align to the right or to the center ignore left margins.

The fo:margin-right attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6, style:sectionproperties 17.11 and style:table-properties 17.15.

Source

pub fn set_margin_top(&mut self, margin: Margin)

See §7.10.1 of XSL. If this attribute is contained in a style:paragraph-properties 17.6 element, its value may be a percentage that refers to the corresponding margin of a parent style. In the OpenDocument XSL-compatible namespace, the fo:margin-top attribute does not support the inherit value.

The fo:margin-top attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6 and style:tableproperties 17.15.

Source

pub fn set_min_height(&mut self, height: LengthPercent)

Minimum height.

Source

pub fn set_padding(&mut self, padding: Length)

Padding for all sides. See §7.29.15 of XSL.

The fo:padding attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6 and style:tablecell-properties 17.18.

Source

pub fn set_padding_bottom(&mut self, padding: Length)

Padding. See §7.7.36 of XSL.

The fo:padding-bottom attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6 and style:tablecell-properties 17.18.

Source

pub fn set_padding_left(&mut self, padding: Length)

Padding. See §7.7.37 of XSL.

The fo:padding-left attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6 and style:tablecell-properties 17.18.

Source

pub fn set_padding_right(&mut self, padding: Length)

Padding. See §7.7.38 of XSL.

The fo:padding-right attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6 and style:tablecell-properties 17.18.

Source

pub fn set_padding_top(&mut self, padding: Length)

Padding. See §7.7.35 of XSL.

The fo:padding-top attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6 and style:tablecell-properties 17.18.

Source

pub fn set_border_line_width( &mut self, inner: Length, spacing: Length, outer: Length, )

The style:border-line-width attribute specifies the widths of borders defined by the FO border properties (see 20.183) for borders where the value of these properties is double. The value of the style:border-line-width attribute is a list of three white space-separated lengths, as follows:

  • The first value specifies the width of the inner line
  • The second value specifies the distance between the two lines
  • The third value specifies the width of the outer line

The style:border-line-width attribute is usable with the following elements: style:graphic-properties 17.21, style:header-footer-properties 17.5, style:page-layout-properties 17.2, style:paragraph-properties 17.6 and style:table-cell-properties 17.18.

Source

pub fn set_border_line_width_bottom( &mut self, inner: Length, spacing: Length, outer: Length, )

The style:border-line-width-bottom attribute specifies the widths of the bottom border for borders defined by the FO border properties (see 20.183) if the property for the bottom border has the value double. The value of the style:border-line-width-bottom attribute is a list of three white spaceseparated lengths, as follows:

  • The first value specifies the width of the inner line
  • The second value specifies the distance between the two lines
  • The third value specifies the width of the outer line

The style:border-line-width attribute is usable with the following elements: style:graphic-properties 17.21, style:header-footer-properties 17.5, style:page-layout-properties 17.2, style:paragraph-properties 17.6 and style:table-cell-properties 17.18.

Source

pub fn set_border_line_width_left( &mut self, inner: Length, spacing: Length, outer: Length, )

The style:border-line-width-left attribute specifies the widths of the left border for borders defined by the FO border properties (see 20.183) if the property for the left border has the value double. The value of the style:border-line-width-left attribute is a list of three white spaceseparated lengths, as follows:

  • The first value specifies the width of the inner line
  • The second value specified the distance between the two lines
  • The third value specifies the width of the outer line

The style:border-line-width attribute is usable with the following elements: style:graphic-properties 17.21, style:header-footer-properties 17.5, style:page-layout-properties 17.2, style:paragraph-properties 17.6 and style:table-cell-properties 17.18.

Source

pub fn set_border_line_width_right( &mut self, inner: Length, spacing: Length, outer: Length, )

The style:border-line-width-right attribute specifies the widths of the right border for borders defined by the FO border properties (see 20.183) if the property for the right border has the value double. The value of the style:border-line-width-right attribute is a list of three white spaceseparated lengths, as follows:

  • The first value specifies the width of the inner line
  • The second value specified the distance between the two lines
  • The third value specifies the width of the outer line

The style:border-line-width attribute is usable with the following elements: style:graphic-properties 17.21, style:header-footer-properties 17.5, style:page-layout-properties 17.2, style:paragraph-properties 17.6 and style:table-cell-properties 17.18.

Source

pub fn set_border_line_width_top( &mut self, inner: Length, spacing: Length, outer: Length, )

The style:border-line-width-top attribute specifies the widths of the top border for borders defined by the FO border properties (see 20.183) if the property for the top border has the value double. The value of the style:border-line-width-top attribute is a list of three white spaceseparated lengths, as follows:

  • The first value specifies the width of the inner line
  • The second value specified the distance between the two lines
  • The third value specifies the width of the outer line

The style:border-line-width attribute is usable with the following elements: style:graphic-properties 17.21, style:header-footer-properties 17.5, style:page-layout-properties 17.2, style:paragraph-properties 17.6 and style:table-cell-properties 17.18.

Source

pub fn set_dynamic_spacing(&mut self, dynamic: bool)

Dynamic spacing

Source

pub fn set_shadow( &mut self, x_offset: Length, y_offset: Length, blur: Option<Length>, color: Rgb<u8>, )

The style:shadow attribute specifies a shadow effect. The defined values for this attribute are those defined in §7.16.5 of XSL, except the value inherit.

The shadow effect is not applied to the text content of an element, but depending on the element where the attribute appears, to a paragraph, a text box, a page body, a header, a footer, a table or a table cell.

The style:shadow attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6, style:tablecell-properties 17.18 and style:table-properties 17.15.

Source

pub fn set_height(&mut self, height: Length)

Height.

Trait Implementations§

Source§

impl Clone for HeaderFooterStyle

Source§

fn clone(&self) -> HeaderFooterStyle

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 HeaderFooterStyle

Source§

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

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

impl Default for HeaderFooterStyle

Source§

fn default() -> HeaderFooterStyle

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

impl GetSize for HeaderFooterStyle

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.