pub struct PlanningModal {
pub segment: PlanningSegment,
pub selected: usize,
pub prompt: Option<PlanningPrompt>,
}Expand description
The planning modal: a segment switch (cycles/milestones) over a row list with a clamped cursor, a render-time vertical scroll window, and an optional inline confirmation prompt.
Fields§
§segment: PlanningSegmentActive segment (cycles or milestones).
selected: usizeRow cursor within the active segment.
prompt: Option<PlanningPrompt>Active inline prompt (None = browsing the list).
Implementations§
Source§impl PlanningModal
impl PlanningModal
pub fn new() -> Self
Sourcepub fn move_selected(&mut self, delta: isize, len: usize)
pub fn move_selected(&mut self, delta: isize, len: usize)
Move the row cursor, clamped to len (the active segment’s rows).
pub fn switch_segment(&mut self)
Sourcepub fn move_selected_to(&mut self, row: usize, len: usize)
pub fn move_selected_to(&mut self, row: usize, len: usize)
Jump the row cursor straight to row (a row click), clamped to the same
range the arrow keys navigate.
Sourcepub fn render(
&self,
f: &mut Frame<'_>,
area: Rect,
cycles: &[PlanningRow],
milestones: &[PlanningRow],
)
pub fn render( &self, f: &mut Frame<'_>, area: Rect, cycles: &[PlanningRow], milestones: &[PlanningRow], )
Render the modal over area for the given cycle and milestone rows.
pub fn render_with_bindings( &self, f: &mut Frame<'_>, area: Rect, cycles: &[PlanningRow], milestones: &[PlanningRow], bindings: &EffectiveBindings, context: InputContext, )
Trait Implementations§
Source§impl Clone for PlanningModal
impl Clone for PlanningModal
Source§impl Debug for PlanningModal
impl Debug for PlanningModal
Source§impl Default for PlanningModal
impl Default for PlanningModal
impl Eq for PlanningModal
Source§impl PartialEq for PlanningModal
impl PartialEq for PlanningModal
impl StructuralPartialEq for PlanningModal
Auto Trait Implementations§
impl Freeze for PlanningModal
impl RefUnwindSafe for PlanningModal
impl Send for PlanningModal
impl Sync for PlanningModal
impl Unpin for PlanningModal
impl UnsafeUnpin for PlanningModal
impl UnwindSafe for PlanningModal
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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