ticker-mac 0.0.7

macOS egui GUI for Ticker — a tick-based spreadsheet.
/// Every user-visible action in ticker-mac.
///
/// Both keyboard input and native menu events produce a `Command`.
/// The single `App::execute()` method handles all of them.
#[derive(Clone, Debug)]
#[allow(dead_code)]
pub enum Command {
    // ── Navigation ────────────────────────────────────────────────────────────
    MoveUp,
    MoveDown,
    MoveLeft,
    MoveRight,
    MoveFirstCol,
    MoveLastCol,
    MoveFirstTick,
    MoveLastTick,
    PageUp,
    PageDown,
    NextSheet,
    PrevSheet,
    GoToSheet(usize),

    // ── Editing ───────────────────────────────────────────────────────────────
    /// Start editing: clear buffer and put cell in edit mode (Enter / char-key).
    StartEdit,
    /// Open edit mode keeping the current value (F2).
    StartEditKeepValue,
    /// Enter formula mode (= key in Normal).
    StartFormula,
    /// Append a character to the active buffer.
    TypeChar(char),
    Backspace,
    /// Delete key in edit modes — clears whole buffer.
    DeleteBuffer,
    /// Delete key in Normal mode — removes cell content.
    DeleteCell,
    /// Confirm the active buffer (Enter in Editing / FormulaName / Command).
    Confirm,
    /// Cancel the active input (Escape).
    Cancel,

    // ── Formula ───────────────────────────────────────────────────────────────
    /// Empty-Enter on a variadic formula (finish the arg list).
    FinishVariadic,
    /// Enter a nested formula (= inside FormulaArgs).
    StartNestedFormula,

    // ── Undo / Redo ───────────────────────────────────────────────────────────
    Undo,
    Redo,

    // ── File ──────────────────────────────────────────────────────────────────
    Save,
    Open(String),
    Quit,

    // ── Native file-dialog variants (menu bar only) ───────────────────────────
    /// Show a native folder-picker and open the selected project.
    OpenDialog,
    /// Save to the known path, or show a native folder-picker if none is set.
    SaveDialog,
    /// Show a native file-picker (CSV/TSV/JSON) and import the selection.
    ImportDialog,

    // ── Sheet management ──────────────────────────────────────────────────────
    AddSheet(Option<String>),
    RenameCurrentSheet(String),
    DeleteSheet,
    CreateFilter { source: Option<String>, condition: String },
    UpdateFilter(String),

    // ── Column management ─────────────────────────────────────────────────────
    AddColumn(Option<String>),
    RenameCurrentColumn(String),
    DeleteColumn,
    MoveColumnLeft,
    MoveColumnRight,
    ClearColumn,
    HideColumn,
    ShowColumn(String),
    ListHidden,
    ConvertToValues,

    // ── Properties ────────────────────────────────────────────────────────────
    SetProperty { key: String, value: String },
    DeleteProperty(String),

    // ── Period navigation ─────────────────────────────────────────────────────
    PeriodIncrease,
    PeriodDecrease,

    // ── View ──────────────────────────────────────────────────────────────────
    TogglePropertyPanel,

    // ── Property panel focus ──────────────────────────────────────────────────
    FocusGrid,
    FocusPropertyPanel,
    PropMoveUp,
    PropMoveDown,
    PropStartEdit,
    PropStartFormula,
    PropDeleteSelected,

    // ── Help ──────────────────────────────────────────────────────────────────
    OpenHelp,
    CloseHelp,

    // ── Colon-command dispatcher ──────────────────────────────────────────────
    /// A complete `:cmd args` string from command mode.
    RunCommand(String),

    // ── Import ────────────────────────────────────────────────────────────────
    RenameProject(String),

    // ── Repeat ───────────────────────────────────────────────────────────────
    /// Re-run the last `:command` string (F4).
    RepeatLastCommand,
}