Struct embedded_text::Cursor [−][src]
pub struct Cursor {
pub y: i32,
// some fields omitted
}Expand description
Internal structure that keeps track of position information while rendering a TextBox.
Fields
y: i32Current cursor position
Implementations
pub fn new(
bounds: Rectangle,
base_line_height: u32,
line_height: LineHeight,
tab_width: u32
) -> Self
pub fn new(
bounds: Rectangle,
base_line_height: u32,
line_height: LineHeight,
tab_width: u32
) -> Self
Creates a new Cursor object located at the top left of the given bounding [Rectangle].
Returns the coordinates of the bottom right corner.
Returns the width of the text box.
Returns the height of a line.
Returns whether the cursor is completely in the bounding box.
Completely means, that the line that is marked by the cursor can be drawn without any vertical clipping or drawing outside the bounds.
Note: Only vertical overrun is checked.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Cursor
impl UnwindSafe for Cursor
Blanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
type Output = T
type Output = T
Should always be Self
Casts the value.
Casts the value.
Casts the value.