use super::super::Span;
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
pub struct Style<'a> {
pub name: &'a str,
pub parent: Option<&'a str>,
pub fontname: &'a str,
pub fontsize: &'a str,
pub primary_colour: &'a str,
pub secondary_colour: &'a str,
pub outline_colour: &'a str,
pub back_colour: &'a str,
pub bold: &'a str,
pub italic: &'a str,
pub underline: &'a str,
pub strikeout: &'a str,
pub scale_x: &'a str,
pub scale_y: &'a str,
pub spacing: &'a str,
pub angle: &'a str,
pub border_style: &'a str,
pub outline: &'a str,
pub shadow: &'a str,
pub alignment: &'a str,
pub margin_l: &'a str,
pub margin_r: &'a str,
pub margin_v: &'a str,
pub margin_t: Option<&'a str>,
pub margin_b: Option<&'a str>,
pub encoding: &'a str,
pub relative_to: Option<&'a str>,
pub span: Span,
}
impl Default for Style<'_> {
fn default() -> Self {
Self {
name: "Default",
parent: None,
fontname: "Arial",
fontsize: "20",
primary_colour: "&Hffffff",
secondary_colour: "&H0000ff",
outline_colour: "&H000000",
back_colour: "&H000000",
bold: "0",
italic: "0",
underline: "0",
strikeout: "0",
scale_x: "100",
scale_y: "100",
spacing: "0",
angle: "0",
border_style: "1",
outline: "0",
shadow: "0",
alignment: "2",
margin_l: "10",
margin_r: "10",
margin_v: "10",
margin_t: None,
margin_b: None,
encoding: "1",
relative_to: None,
span: Span::new(0, 0, 0, 0),
}
}
}