Safe Haskell | Safe-Inferred |
---|
Internal Cmds, that keep bits of Cmd.State up to date that everyone else relies on.
Synopsis
- cmd_record_keys :: Cmd.M m => Msg.Msg -> m Cmd.Status
- record_focus :: Cmd.M m => Msg.Msg -> m Cmd.Status
- cmd_record_ui_updates :: Cmd.M m => Msg.Msg -> m Cmd.Status
- update_ui_state :: Cmd.M m => Msg.Msg -> m Cmd.Status
- set_style :: Track.SetStyleHigh
- sync_status :: Ui.State -> Cmd.State -> Update.UiDamage -> Cmd.CmdId Cmd.Status
- default_selection_hooks :: [[(Id.ViewId, Maybe.Maybe Cmd.TrackSelection)] -> Cmd.CmdId ()]
- sync_zoom_status :: Cmd.M m => Id.ViewId -> m ()
- can_checkpoint :: Cmd.State -> Maybe.Maybe (Path.Canonical, GitT.Commit)
Documentation
cmd_record_keys :: Cmd.M m => Msg.Msg -> m Cmd.Status Source #
Record keydowns into the State
modifier map.
record_focus :: Cmd.M m => Msg.Msg -> m Cmd.Status Source #
Keep Cmd.state_focused_view
up to date.
cmd_record_ui_updates :: Cmd.M m => Msg.Msg -> m Cmd.Status Source #
Catch UiMsg.Msg
s from the UI, and modify the state accordingly to
reflect the UI state.
Unlike all the other Cmds, the state changes this makes are not synced. UiUpdates report changes that have already occurred directly on the UI, so syncing them would be redundant.
update_ui_state :: Cmd.M m => Msg.Msg -> m Cmd.Status Source #
This is the other half of cmd_record_ui_updates
, whose output is synced
like normal Cmds. When its a block update I have to update the other
views.
sync_status :: Ui.State -> Cmd.State -> Update.UiDamage -> Cmd.CmdId Cmd.Status Source #
This is called after every non-failing cmd.
default_selection_hooks :: [[(Id.ViewId, Maybe.Maybe Cmd.TrackSelection)] -> Cmd.CmdId ()] Source #
sync_zoom_status :: Cmd.M m => Id.ViewId -> m () Source #
:: Cmd.State | |
-> Maybe.Maybe (Path.Canonical, GitT.Commit) | I need both a repo and a previous commit to checkpoint. |
Return Just if there will be a git checkpoint. update_saved
has to
predict this because by the time save_history
runs, it's too
late to make Ui.State changes.
This is not defined in Cmd.Undo to avoid a circular import.