Enum makeup::DrawCommand
source · pub enum DrawCommand {
TextUnderCursor(String),
CharUnderCursor(char),
EraseCurrentLine(LineEraseMode),
MoveCursorAbsolute {
x: Coordinate,
y: Coordinate,
},
MoveCursorRelative {
x: RelativeCoordinate,
y: RelativeCoordinate,
},
HideCursor,
ShowCursor,
Style(DrawStyle),
}
Expand description
Commands for drawing to the character grid. Draw commands are processed by
the current Renderer
.
Variants§
TextUnderCursor(String)
Draw text under the cursor, advancing the cursor by text.len()
characters.
CharUnderCursor(char)
Draw a single character under the cursor, advancing the cursor by 1 character.
EraseCurrentLine(LineEraseMode)
Erase the current line, with behaviour depending on the position of the
cursor and the LineEraseMode
passed in.
MoveCursorAbsolute
Move the cursor absolutely. This is almost certainly NOT what you want.
MoveCursorRelative
Move the cursor relative to its current position. You probably want
this and not MoveCursorAbsolute
.
HideCursor
Hide the cursor.
ShowCursor
Show the cursor.
Style(DrawStyle)
Style the text that follows this command.
Trait Implementations§
source§impl Clone for DrawCommand
impl Clone for DrawCommand
source§fn clone(&self) -> DrawCommand
fn clone(&self) -> DrawCommand
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DrawCommand
impl Debug for DrawCommand
source§impl Display for DrawCommand
impl Display for DrawCommand
source§impl Hash for DrawCommand
impl Hash for DrawCommand
source§impl Ord for DrawCommand
impl Ord for DrawCommand
source§fn cmp(&self, other: &DrawCommand) -> Ordering
fn cmp(&self, other: &DrawCommand) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for DrawCommand
impl PartialEq for DrawCommand
source§fn eq(&self, other: &DrawCommand) -> bool
fn eq(&self, other: &DrawCommand) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for DrawCommand
impl PartialOrd for DrawCommand
source§fn partial_cmp(&self, other: &DrawCommand) -> Option<Ordering>
fn partial_cmp(&self, other: &DrawCommand) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for DrawCommand
impl StructuralEq for DrawCommand
impl StructuralPartialEq for DrawCommand
Auto Trait Implementations§
impl RefUnwindSafe for DrawCommand
impl Send for DrawCommand
impl Sync for DrawCommand
impl Unpin for DrawCommand
impl UnwindSafe for DrawCommand
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more