pub struct SettingsModal {
pub selected: usize,
pub prompt: Option<SettingsPrompt>,
}Expand description
The settings modal: a cursor over the column checkbox rows plus an optional inline prompt.
Fields§
§selected: usizeRow cursor over the board’s columns.
prompt: Option<SettingsPrompt>Active inline prompt (None = browsing the checkbox list).
Implementations§
Source§impl SettingsModal
impl SettingsModal
pub fn new() -> Self
Sourcepub fn move_selected(&mut self, delta: isize, total_rows: usize)
pub fn move_selected(&mut self, delta: isize, total_rows: usize)
Move the row cursor (clamped to total_rows, i.e. the board’s columns
plus DISPLAY_ROWS).
Sourcepub fn move_selected_to(&mut self, row: usize, total_rows: usize)
pub fn move_selected_to(&mut self, row: usize, total_rows: usize)
Jump the row cursor straight to row (a row click, D6), clamped to the
same range the arrow keys navigate.
Sourcepub fn render(
&self,
f: &mut Frame<'_>,
area: Rect,
board_name: &str,
board: &BoardConfiguration,
)
pub fn render( &self, f: &mut Frame<'_>, area: Rect, board_name: &str, board: &BoardConfiguration, )
Render the settings modal over area for the given board.
pub fn render_with_bindings( &self, f: &mut Frame<'_>, area: Rect, board_name: &str, board: &BoardConfiguration, bindings: &EffectiveBindings, context: InputContext, )
Trait Implementations§
Source§impl Clone for SettingsModal
impl Clone for SettingsModal
Source§impl Debug for SettingsModal
impl Debug for SettingsModal
Auto Trait Implementations§
impl Freeze for SettingsModal
impl RefUnwindSafe for SettingsModal
impl Send for SettingsModal
impl Sync for SettingsModal
impl Unpin for SettingsModal
impl UnsafeUnpin for SettingsModal
impl UnwindSafe for SettingsModal
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more