ticker-mac 0.0.7

macOS egui GUI for Ticker — a tick-based spreadsheet.
/// UI mode — determines how keyboard input is interpreted.
#[derive(Clone, Debug, PartialEq, Default)]
pub enum Mode {
    /// Default: navigate the grid with arrow keys.
    #[default]
    Normal,
    /// Editing a plain cell value.
    Editing,
    /// Editing a formula via the tree editor.
    FormulaTree,
    /// Typing a formula name after `=` (legacy, kept for compatibility).
    FormulaName,
    /// Entering formula arguments one by one (legacy, kept for compatibility).
    FormulaArgs,
    /// Typing a `:command` in the footer.
    Command,
    /// Entering arguments for a command one prompt at a time.
    CommandArgs {
        cmd: String,
        prompts: Vec<&'static str>,
        done: Vec<String>,
    },
    /// Help overlay.
    Help,
}

impl Mode {
    #[allow(dead_code)]
    pub fn label(&self) -> &'static str {
        match self {
            Mode::Normal         => "Normal",
            Mode::Editing        => "Editing",
            Mode::FormulaTree    => "Formula",
            Mode::FormulaName    => "Formula",
            Mode::FormulaArgs    => "Args",
            Mode::Command        => "Command",
            Mode::CommandArgs {..}=> "Command",
            Mode::Help           => "Help",
        }
    }
}