Struct andiskaz::style::Style [−][src]
pub struct Style<C = Color2> where
C: Updater, {
pub left_margin: Coord,
pub right_margin: Coord,
pub top_margin: Coord,
pub bottom_margin: Coord,
pub min_width: Coord,
pub max_width: Coord,
pub min_height: Coord,
pub max_height: Coord,
pub align_numer: Coord,
pub align_denom: Coord,
pub colors: C,
}
Expand description
Alignment, margin and other settings for texts.
Fields
left_margin: Coord
Left margin.
right_margin: Coord
Right margin.
top_margin: Coord
Top margin.
bottom_margin: Coord
Bottom margin.
min_width: Coord
Minimum width.
max_width: Coord
Maximum width.
min_height: Coord
Minimum height.
max_height: Coord
Maximum height.
align_numer: Coord
Alignment align_numererator.
align_denom: Coord
Alignment align_denomominator.
colors: C
Foreground-background color pair.
Implementations
Creates a style with the given colors.
Updates the style to the given color updater.
Sets left margin.
Sets right margin.
Sets top margin.
Sets bottom margin.
Sets minimum height.
Sets maximum height.
Sets alignment. Numerator and align_denomominator are used such that
line\[index\] * align_numer / align_denom == screen\[index\]
Makes a coordinate pair that contains the margin dimensions that are “less”.
Makes a coordinate pair that contains the margin dimensions that are “greater”.
Makes a coordinate pair that contains the minima sizes.
Makes a coordinate pair that contains the maxima sizes.
Trait Implementations
Auto Trait Implementations
impl<C> RefUnwindSafe for Style<C> where
C: RefUnwindSafe,
impl<C> UnwindSafe for Style<C> where
C: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more