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: i32

Current cursor position

Implementations

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 coordinates of the bottom right corner.

Returns the width of the text box.

Returns the height of a line.

Starts a new 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Performs the conversion.

Performs the conversion.

Casts the value.

Should always be Self

Casts the value.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

Casts the value.