fileShellF :: (c1 -> String, String -> String ⊕ c1, Maybe c1) -> String -> F c1 (InputMsg c1) -> F c2 d textFileShellF :: String -> F String (InputMsg String) -> F c d showReadFileShellF :: (Show a, Read a) => Maybe a -> String -> F a (InputMsg a) -> F c d
fileShellF (show,parse,optEmpty) title editor
The documents that are edited can be of any type, provided there is a way to
convert the values to and from strings that can be saved in files.
fileShellF, conversion functions are supplied explicitly.
showReadFileShellF the methods of the
classes are used for conversion. With
textFileShellF, no conversion is
(show,parse,optEmpty) :: (c1 -> String, String -> String ⊕ c1, Maybe c1)
showis applied to the value before it is saved in a file. The function
parseis applied to the contents of openned files. If the value
emptyis sent to the editor fudget when the command
Newis selected from the menu.
title :: String
editor :: F c1 (InputMsg c1)
Save Ascommands will save the most resently output value.
main = fudlogue $ textFileShellF "Text Editor" (scrollF inputEditorF)
This is all that is needed to create a simple text editor.
Customisable versions: fileShellF' et al.
There is currently no good way of adding a conventional
to the menu bar.