License | BSD-3-Clause |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Prepares and validates scenario launch parameters
Synopsis
- swarmLangFileExtension :: String
- toValidatedParams :: EditingLaunchParams -> Either Text ValidatedLaunchParams
- parseSeedInput :: Editor Text Name -> Either Text (Maybe Seed)
- parseWidgetParams :: LaunchControls -> IO EditingLaunchParams
- makeFocusRingWith :: [ScenarioConfigPanelFocusable] -> FocusRing Name
- initEditorWidget :: Text -> Editor Text Name
- initConfigPanel :: IO LaunchOptions
- initFileBrowserWidget :: MonadIO m => Maybe FilePath -> m (FileBrowser Name)
- prepareLaunchDialog :: ScenarioInfoPair -> EventM Name LaunchOptions ()
Documentation
initConfigPanel :: IO LaunchOptions Source #
Called before any particular scenario is selected, so we supply some Nothings as defaults to the ValidatedLaunchParams.
initFileBrowserWidget :: MonadIO m => Maybe FilePath -> m (FileBrowser Name) Source #
prepareLaunchDialog :: ScenarioInfoPair -> EventM Name LaunchOptions () Source #
If the selected scenario has been launched with an initial script before, set the file browser to initially open that script's directory. Then set the launch dialog to be displayed.
Note that the FileBrowser widget normally allows multiple selections ("marked" files). However, there do not exist any public "setters" set the marked files, so we have some workarounds: * When the user marks the first file, we immediately close the FileBrowser widget. * We re-instantiate the FileBrowser from scratch every time it is opened, so that it is not possible to mark more than one file. * The "marked file" is persisted outside of the FileBrowser state, and the "initial directory" is set upon instantiation from that external state.