[−][src]Trait embedded_text::style::height_mode::HeightMode
Specifies how the TextBox
's height is adjusted when it is turned into a StyledTextBox
.
Required methods
pub fn apply<C, F, A, V, H>(text_box: &mut StyledTextBox<'_, C, F, A, V, H>) where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode,
[src]
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode,
Apply the height mode to the textbox
Note: This function is used by TextBox::into_styled
and normally does not need to be
called manually.
pub fn calculate_displayed_row_range<F: Font>(cursor: &Cursor<F>) -> Range<i32>
[src]
Calculate the range of rows of the current line that can be drawn.
If a line does not fully fit in the bounding box, some HeightMode
options allow drawing
partial lines. For a partial line, this function calculates, which rows of each character
should be displayed.
Implementors
impl HeightMode for FitToText
[src]
pub fn apply<C, F, A, V, H>(text_box: &mut StyledTextBox<'_, C, F, A, V, H>) where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode,
[src]
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode,
pub fn calculate_displayed_row_range<F: Font>(_: &Cursor<F>) -> Range<i32>
[src]
impl<OV> HeightMode for Exact<OV> where
OV: VerticalOverdraw,
[src]
OV: VerticalOverdraw,
pub fn apply<C, F, A, V, H>(_text_box: &mut StyledTextBox<'_, C, F, A, V, H>) where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode,
[src]
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode,
pub fn calculate_displayed_row_range<F: Font>(cursor: &Cursor<F>) -> Range<i32>
[src]
impl<OV> HeightMode for ShrinkToText<OV> where
OV: VerticalOverdraw,
[src]
OV: VerticalOverdraw,
pub fn apply<C, F, A, V, H>(text_box: &mut StyledTextBox<'_, C, F, A, V, H>) where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode,
[src]
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode,