Skip to main content

FormNodeStyle

Struct FormNodeStyle 

Source
pub struct FormNodeStyle {
Show 39 fields pub font_family: Option<String>, pub font_size: Option<f64>, pub font_weight: Option<String>, pub font_style: Option<String>, pub text_color: Option<(u8, u8, u8)>, pub bg_color: Option<(u8, u8, u8)>, pub border_color: Option<(u8, u8, u8)>, pub border_colors: Option<[(u8, u8, u8); 4]>, pub border_width_pt: Option<f64>, pub border_widths: Option<[f64; 4]>, pub space_above_pt: Option<f64>, pub space_below_pt: Option<f64>, pub margin_left_pt: Option<f64>, pub margin_right_pt: Option<f64>, pub line_height_pt: Option<f64>, pub text_indent_pt: Option<f64>, pub inset_top_pt: Option<f64>, pub inset_bottom_pt: Option<f64>, pub inset_left_pt: Option<f64>, pub inset_right_pt: Option<f64>, pub v_align: Option<VerticalAlign>, pub h_align: Option<TextAlign>, pub border_radius_pt: Option<f64>, pub border_style: Option<String>, pub border_edges: [bool; 4], pub generic_family: Option<String>, pub font_horizontal_scale: Option<f64>, pub letter_spacing_pt: Option<f64>, pub caption_text: Option<String>, pub caption_placement: Option<String>, pub caption_reserve: Option<f64>, pub check_button_mark: Option<String>, pub check_button_on_value: Option<String>, pub check_button_off_value: Option<String>, pub check_button_neutral_value: Option<String>, pub rich_text_spans: Option<Vec<RichTextSpan>>, pub underline: bool, pub line_through: bool, pub format_pattern: Option<String>,
}
Expand description

Visual style properties for a form node.

Fields§

§font_family: Option<String>

Font family.

§font_size: Option<f64>

Font size.

§font_weight: Option<String>

Font weight.

§font_style: Option<String>

Font style.

§text_color: Option<(u8, u8, u8)>

Text color.

§bg_color: Option<(u8, u8, u8)>

Background color.

§border_color: Option<(u8, u8, u8)>

Border color.

§border_colors: Option<[(u8, u8, u8); 4]>

Per-edge border colors (top, right, bottom, left) in RGB 0-255. When set, overrides border_color for individual edges.

§border_width_pt: Option<f64>

Border width in points.

§border_widths: Option<[f64; 4]>

Per-edge border widths (top, right, bottom, left) in points. When set, overrides border_width_pt for individual edges.

§space_above_pt: Option<f64>

Paragraph space above in points (XFA <para spaceAbove>).

§space_below_pt: Option<f64>

Paragraph space below in points (XFA <para spaceBelow>).

§margin_left_pt: Option<f64>

Paragraph left margin in points (XFA <para marginLeft>).

§margin_right_pt: Option<f64>

Paragraph right margin in points (XFA <para marginRight>).

§line_height_pt: Option<f64>

XFA Spec 3.3 §17 “para” (p803) — lineHeight: baseline-to-baseline distance in points. When None, use font metrics.

§text_indent_pt: Option<f64>

XFA Spec 3.3 §17 “para” (p803) — textIndent: indentation of the first line of each paragraph in points.

§inset_top_pt: Option<f64>

Margin top inset in points (XFA <margin topInset>).

§inset_bottom_pt: Option<f64>

Margin bottom inset in points (XFA <margin bottomInset>).

§inset_left_pt: Option<f64>

Margin left inset in points (XFA <margin leftInset>).

§inset_right_pt: Option<f64>

Margin right inset in points (XFA <margin rightInset>).

§v_align: Option<VerticalAlign>

Vertical text alignment (XFA <para vAlign>).

§h_align: Option<TextAlign>

Horizontal alignment for layout positioning (XFA <para hAlign>, §8.3).

§border_radius_pt: Option<f64>

Border corner radius in points (XFA <border><corner radius>).

§border_style: Option<String>

Border edge stroke style (XFA <border><edge stroke>).

§border_edges: [bool; 4]

Per-edge visibility: [top, right, bottom, left]. All true when absent.

§generic_family: Option<String>

XFA Spec 3.3 §17 (p716) — genericFamily fallback hint. Values: serif, sansSerif, monospaced, decorative, fantasy, cursive.

§font_horizontal_scale: Option<f64>

Font horizontal scale factor (XFA <font fontHorizontalScale>). 1.0 = 100% (default), 0.96 = 96%, etc.

§letter_spacing_pt: Option<f64>

Letter spacing in points (XFA <font letterSpacing>). 0.0 = normal (default). Negative values tighten, positive widen.

§caption_text: Option<String>

Caption text (XFA <caption><value><text>).

§caption_placement: Option<String>

Caption placement (left/right/top/bottom/inline).

§caption_reserve: Option<f64>

Caption reserve width/height in points.

§check_button_mark: Option<String>

CheckButton mark style (XFA <checkButton mark="...">). Values: “check”, “circle”, “cross”, “diamond”, “square”, “star”.

§check_button_on_value: Option<String>

CheckButton on-value (first <items> entry, XFA 3.3 §17.8).

§check_button_off_value: Option<String>

CheckButton off-value (second <items> entry). When omitted, the spec default is the null string.

§check_button_neutral_value: Option<String>

CheckButton neutral-value (third <items> entry, checkbox only).

§rich_text_spans: Option<Vec<RichTextSpan>>

Rich text spans parsed from <exData contentType="text/html"> XHTML.

§underline: bool

Font underline (XFA <font underline="1">).

§line_through: bool

Font line-through / strikethrough (XFA <font lineThrough="1">).

§format_pattern: Option<String>

XFA format picture clause (e.g. num{z,zzz.99}).

Trait Implementations§

Source§

impl Clone for FormNodeStyle

Source§

fn clone(&self) -> FormNodeStyle

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for FormNodeStyle

Source§

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

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

impl Default for FormNodeStyle

Source§

fn default() -> Self

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

impl PartialEq for FormNodeStyle

Source§

fn eq(&self, other: &FormNodeStyle) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for FormNodeStyle

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.