HasScreenCursor

Trait HasScreenCursor 

Source
pub trait HasScreenCursor {
    // Required method
    fn screen_cursor(&self) -> Option<(u16, u16)>;
}
Expand description

Trait for accessing the screen-cursor.

In ratatui the screen-cursor can’t be set during rendering, instead it must be set with the Frame at some point.

This trait provides a method to get the screen cursor (if any) for a widget.

Required Methods§

Source

fn screen_cursor(&self) -> Option<(u16, u16)>

This returns the cursor position if

  • The cursor is displayed at all, and not scrolled off-screen.
  • The widget has some kind of input focus
  • other reasons

Implementors§

Source§

impl HasScreenCursor for ButtonState

Source§

impl HasScreenCursor for CheckboxState

Source§

impl HasScreenCursor for ColorInputState

Source§

impl HasScreenCursor for ComboboxState

Source§

impl HasScreenCursor for DateInputState

Source§

impl HasScreenCursor for DialogFrameState

Source§

impl HasScreenCursor for FileDialogState

Source§

impl HasScreenCursor for LineNumberState

Source§

impl HasScreenCursor for MenuLineState

Source§

impl HasScreenCursor for MenubarState

Source§

impl HasScreenCursor for PopupMenuState

Source§

impl HasScreenCursor for MsgDialogState

Source§

impl HasScreenCursor for NumberInputState

Source§

impl HasScreenCursor for ParagraphState

Source§

impl HasScreenCursor for StatusLineState

Source§

impl HasScreenCursor for TextInputState

Source§

impl HasScreenCursor for MaskedInputState

Source§

impl HasScreenCursor for TextAreaState

Source§

impl<'a, T> HasScreenCursor for PairedWidget<'a, T>

Source§

impl<S> HasScreenCursor for EditListState<S>
where S: HasScreenCursor,

Source§

impl<S> HasScreenCursor for EditableTableState<S>
where S: HasScreenCursor,

Source§

impl<S> HasScreenCursor for EditableTableVecState<S>

Source§

impl<Selection> HasScreenCursor for MonthState<Selection>

Source§

impl<Selection> HasScreenCursor for ListState<Selection>

Source§

impl<T> HasScreenCursor for ChoiceState<T>
where T: PartialEq + Clone + Default,

Source§

impl<T> HasScreenCursor for RadioState<T>
where T: PartialEq + Clone + Default,

Source§

impl<T> HasScreenCursor for SliderState<T>
where T: RangeOp<Step: Copy + Debug> + MapRange<u16> + Debug + Default + Copy + PartialEq, u16: MapRange<T>,

Source§

impl<TS, US> HasScreenCursor for PairedState<'_, TS, US>

Source§

impl<const N: usize, Selection> HasScreenCursor for CalendarState<N, Selection>