etch/cursor
This module provides cursor associated functions like moving it, hiding it or setting its style.
Types
Cursor style.
pub type CursorStyle {
DefaultShape
BlinkingBlock
SteadyBlock
BlinkingUnderScore
SteadyUnderScore
BlinkingBar
SteadyBar
}
Constructors
-
DefaultShapeDefault cursor shape.
-
BlinkingBlockBlinking block █.
-
SteadyBlockSteady (non-blinking) block █.
-
BlinkingUnderScoreBlinking underscore _.
-
SteadyUnderScoreSteady (non-blinking) underscore _.
-
BlinkingBarBlinking bar |.
-
SteadyBarSteady (non-blinking) bar |.
Values
pub fn move_down(n: Int) -> String
Moves cursor n rows to the down.
It is prefered not to use this directly. See MoveDown.
pub fn move_left(n: Int) -> String
Moves cursor n column to the left.
It is prefered not to use this directly. See MoveLeft.
pub fn move_right(n: Int) -> String
Moves cursor n column to the right.
It is prefered not to use this directly. See MoveRight.
pub fn move_to(x: Int, y: Int) -> String
Moves cursor to the given position.
It is prefered not to use this directly. See MoveTo.
pub fn move_to_column(n: Int) -> String
Moves cursor to the given column (the row remains unchainged).
It is prefered not to use this directly. See MoveToColumn.
pub fn move_to_next_line(n: Int) -> String
Moves cursor to the next line (at the beginning of the line below).
It is prefered not to use this directly. See MoveToNextLine.
pub fn move_to_previous_line(n: Int) -> String
Moves cursor to the previous line (at the beginning of the line above).
It is prefered not to use this directly. See MoveToPreviousLine.
pub fn move_to_row(n: Int) -> String
Moves cursor to the given row (the column remains unchainged).
It is prefered not to use this directly. See MoveToRow.
pub fn move_up(n: Int) -> String
Moves cursor n rows to the up.
It is prefered not to use this directly. See MoveUp.
pub fn restore_position() -> String
Restores saved cursor position.
It is prefered not to use this directly. See RestorePosition.
pub fn save_position() -> String
Saves current cursor position.
It is prefered not to use this directly. See SavePosition.
pub fn set_cursor_style(s: CursorStyle) -> String
Sets cursor style.
It is prefered not to use this directly. See SetCursorStyle.