Skip to main content

Module controller

Module controller 

Source
Expand description

Controller module (MVC “C”).

Responsibilities:

  • Accept Action values from the view.
  • Validate and translate actions into Commands.
  • Mutate PlotModel and data table state.
  • Maintain undo/redo stacks.
  • Handle import/export workflows.

Architecture notes:

  • Actions are user intents; Controller validates and turns them into Commands.
  • Commands are the single source of truth for mutations, enabling undo/redo.
  • Export path aims to mirror on-screen layout to avoid visual drift.
  • Axis titles are positioned relative to the plotting area, not the full canvas, to avoid vertical drift with font-size changes.

Re-exports§

pub use action::*;
pub use command::*;

Modules§

action
View-to-controller intents.
command
Undoable state transitions.

Structs§

Notification
EN: Notification shown in the status block of the editor. RU: Soobshchenie v statuse redaktora.
PlotController
EN: Main MVC controller. Owns model, data table, command history and notifications. RU: Glavnyy MVC-kontroller. Hranit model, tablitsu dannyh, istoriyu komand i uvedomleniya.

Enums§

ControllerError
EN: Controller-level error for validation and user-safe feedback. RU: Oshibka kontrollera dlya validatsii i bezopasnoy obratnoy svyazi.
NotificationLevel
EN: UI notification severity. RU: Uroven uvedomleniya dlya UI.