pub struct App {
pub title: String,
pub should_quit: bool,
pub day: DayPlan,
pub config: Config,
/* private fields */
}Fields§
§title: String§should_quit: bool§day: DayPlan§config: ConfigImplementations§
Source§impl App
impl App
pub fn new() -> Self
pub fn with_config(config: Config) -> Self
pub fn handle_key(&mut self, code: KeyCode)
pub fn handle_key_event(&mut self, ev: KeyEvent)
Sourcepub fn handle_mouse_event(&mut self, ev: MouseEvent, area: Rect)
pub fn handle_mouse_event(&mut self, ev: MouseEvent, area: Rect)
Handle mouse events using the current terminal area to map coordinates to UI regions.
- Left click on a list row selects that task; double-click toggles start/pause.
- Right click on a list row opens estimate edit.
- Clicking tabs switches views.
- Mouse move updates hover index.
- Ignores clicks while in input/popup modes.
Sourcepub fn handle_mouse_move(&mut self, col: u16, row: u16, area: Rect)
pub fn handle_mouse_move(&mut self, col: u16, row: u16, area: Rect)
For tests: update hover by coordinates without constructing a MouseEvent.
Sourcepub fn handle_paste(&mut self, s: &str)
pub fn handle_paste(&mut self, s: &str)
Handle pasted text from the terminal (bracketed/kitty paste etc.). Appends to the input buffer only when in input mode.
pub fn add_task(&mut self, title: &str, estimate_min: u16) -> usize
pub fn finish_active(&mut self)
Sourcepub fn finish_selected(&mut self)
pub fn finish_selected(&mut self)
Finish the currently selected task regardless of its active state.
pub fn selected_index(&self) -> usize
pub fn select_up(&mut self)
pub fn select_down(&mut self)
pub fn postpone_selected(&mut self)
Sourcepub fn bring_selected_from_future(&mut self)
pub fn bring_selected_from_future(&mut self)
Bring a task from Future to Today (mirror of postpone). No-op unless in Future view.
pub fn tomorrow_tasks(&self) -> &Vec<Task>
pub fn history_tasks(&self) -> &Vec<Task>
pub fn view(&self) -> View
pub fn display_mode(&self) -> DisplayMode
pub fn in_input_mode(&self) -> bool
pub fn input_buffer(&self) -> Option<&str>
pub fn is_estimate_editing(&self) -> bool
pub fn is_new_task_estimate(&self) -> bool
pub fn is_command_mode(&self) -> bool
pub fn is_confirm_delete(&self) -> bool
pub fn is_category_picker(&self) -> bool
pub fn is_start_time_edit(&self) -> bool
Sourcepub fn is_text_input_mode(&self) -> bool
pub fn is_text_input_mode(&self) -> bool
True only when typing a task title (Normal/Interrupt), not for estimate/confirm popups.
pub fn selected_estimate(&self) -> Option<u16>
pub fn new_task_title(&self) -> Option<&str>
pub fn new_task_default_estimate(&self) -> Option<u16>
pub fn new_task_planned_ymd(&self) -> Option<u32>
pub fn hovered_index(&self) -> Option<usize>
pub fn is_dragging(&self) -> bool
pub fn drag_source_index(&self) -> Option<usize>
pub fn pulse_on(&self) -> bool
pub fn hovered_tab_index(&self) -> Option<usize>
pub fn category_pick_index(&self) -> usize
pub fn toggle_display_mode(&mut self)
pub fn tick(&mut self, seconds: u16)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnwindSafe for App
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> 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