[−][src]Struct embedded_text::rendering::Cursor
Internal structure that keeps track of rendering a [TextBox
].
Fields
bounds: Rectangle
Bounding box of the [TextBox
]
position: Point
Current cursor position
Implementations
impl<F: Font> Cursor<F>
[src]
pub fn new_line(&mut self)
[src]
Starts a new line.
pub fn in_display_area(&self) -> bool
[src]
Returns whether the cursor is in the bounding box.
Note: Only vertical overrun is checked.
pub fn fits_in_line(&self, width: u32) -> bool
[src]
Returns whether the current line has enough space to also include an object of given width.
pub fn advance_char(&mut self, c: char)
[src]
Advances the cursor by a given character.
pub fn advance(&mut self, by: u32)
[src]
Advances the cursor by a given amount.
Auto Trait Implementations
impl<F> RefUnwindSafe for Cursor<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for Cursor<F> where
F: Send,
F: Send,
impl<F> Sync for Cursor<F> where
F: Sync,
F: Sync,
impl<F> Unpin for Cursor<F> where
F: Unpin,
F: Unpin,
impl<F> UnwindSafe for Cursor<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,