pub struct App<'a> {Show 36 fields
pub storage: &'a Storage,
pub settings: &'a Settings,
pub paths: &'a EnvelopePaths,
pub should_quit: bool,
pub active_view: ActiveView,
pub focused_panel: FocusedPanel,
pub input_mode: InputMode,
pub active_dialog: ActiveDialog,
pub selected_account: Option<AccountId>,
pub selected_account_index: usize,
pub selected_transaction: Option<TransactionId>,
pub selected_transaction_index: usize,
pub selected_category: Option<CategoryId>,
pub selected_category_index: usize,
pub current_period: BudgetPeriod,
pub budget_header_display: BudgetHeaderDisplay,
pub show_archived: bool,
pub multi_select_mode: bool,
pub selected_transactions: Vec<TransactionId>,
pub scroll_offset: usize,
pub status_message: Option<String>,
pub command_input: String,
pub command_results: Vec<usize>,
pub selected_command_index: usize,
pub transaction_form: TransactionFormState,
pub move_funds_state: MoveFundsState,
pub bulk_categorize_state: BulkCategorizeState,
pub reconciliation_state: ReconciliationState,
pub reconcile_start_state: ReconcileStartState,
pub adjustment_dialog_state: AdjustmentDialogState,
pub account_form: AccountFormState,
pub category_form: CategoryFormState,
pub group_form: GroupFormState,
pub budget_dialog_state: BudgetDialogState,
pub income_form: IncomeFormState,
pub pending_g: bool,
}Expand description
Main application state
Fields§
§storage: &'a StorageThe storage layer
settings: &'a SettingsApplication settings
paths: &'a EnvelopePathsPaths configuration
should_quit: boolWhether the app should quit
active_view: ActiveViewCurrently active view
focused_panel: FocusedPanelWhich panel is focused
input_mode: InputModeCurrent input mode
active_dialog: ActiveDialogCurrently active dialog
selected_account: Option<AccountId>Selected account (if any)
selected_account_index: usizeSelected account index in the list
selected_transaction: Option<TransactionId>Selected transaction (if any)
selected_transaction_index: usizeSelected transaction index in the register
selected_category: Option<CategoryId>Selected category (for budget view)
selected_category_index: usizeSelected category index
current_period: BudgetPeriodCurrent budget period being viewed
budget_header_display: BudgetHeaderDisplayWhat to display in the budget header (toggle between ATB and account balances)
show_archived: boolShow archived accounts
multi_select_mode: boolMulti-selection mode (for bulk operations)
selected_transactions: Vec<TransactionId>Selected transaction IDs for bulk operations
scroll_offset: usizeScroll offset for the main view
status_message: Option<String>Status message to display
command_input: StringCommand palette input
command_results: Vec<usize>Filtered commands for palette
selected_command_index: usizeSelected command index in palette
transaction_form: TransactionFormStateTransaction form state
move_funds_state: MoveFundsStateMove funds dialog state
bulk_categorize_state: BulkCategorizeStateBulk categorize dialog state
reconciliation_state: ReconciliationStateReconciliation view state
reconcile_start_state: ReconcileStartStateReconcile start dialog state
adjustment_dialog_state: AdjustmentDialogStateAdjustment dialog state
account_form: AccountFormStateAccount form dialog state
category_form: CategoryFormStateCategory form dialog state
group_form: GroupFormStateGroup form dialog state
budget_dialog_state: BudgetDialogStateUnified budget dialog state (period budget + target)
income_form: IncomeFormStateIncome form dialog state
pending_g: boolPending ‘g’ keypress for Vim-style gg (go to top)
Implementations§
Source§impl<'a> App<'a>
impl<'a> App<'a>
Sourcepub fn new(
storage: &'a Storage,
settings: &'a Settings,
paths: &'a EnvelopePaths,
) -> Self
pub fn new( storage: &'a Storage, settings: &'a Settings, paths: &'a EnvelopePaths, ) -> Self
Create a new App instance
Sourcepub fn set_status(&mut self, message: impl Into<String>)
pub fn set_status(&mut self, message: impl Into<String>)
Set a status message
Sourcepub fn clear_status(&mut self)
pub fn clear_status(&mut self)
Clear the status message
Sourcepub fn switch_view(&mut self, view: ActiveView)
pub fn switch_view(&mut self, view: ActiveView)
Switch to a different view
Sourcepub fn toggle_panel_focus(&mut self)
pub fn toggle_panel_focus(&mut self)
Toggle focus between sidebar and main panel
Sourcepub fn ensure_selection_initialized(&mut self)
pub fn ensure_selection_initialized(&mut self)
Ensure selection is initialized for the current view
Sourcepub fn open_dialog(&mut self, dialog: ActiveDialog)
pub fn open_dialog(&mut self, dialog: ActiveDialog)
Open a dialog
Sourcepub fn close_dialog(&mut self)
pub fn close_dialog(&mut self)
Close the current dialog
Sourcepub fn has_dialog(&self) -> bool
pub fn has_dialog(&self) -> bool
Check if a dialog is active
Sourcepub fn prev_period(&mut self)
pub fn prev_period(&mut self)
Go to previous budget period
Sourcepub fn next_period(&mut self)
pub fn next_period(&mut self)
Go to next budget period
Sourcepub fn toggle_multi_select(&mut self)
pub fn toggle_multi_select(&mut self)
Toggle multi-select mode
Sourcepub fn toggle_transaction_selection(&mut self)
pub fn toggle_transaction_selection(&mut self)
Toggle selection of current transaction in multi-select mode
Auto Trait Implementations§
impl<'a> Freeze for App<'a>
impl<'a> RefUnwindSafe for App<'a>
impl<'a> Send for App<'a>
impl<'a> Sync for App<'a>
impl<'a> Unpin for App<'a>
impl<'a> UnwindSafe for App<'a>
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
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>
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>
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