vty-ui-1.3.1: An interactive terminal user interface library for Vty



This module provides a directory browser interface widget. For full details, please see the Vty-ui User's Manual.



data BrowserSkin Source

The collection of attributes and annotations used to determine the browser's visual appearance.




browserHeaderAttr :: Attr

Used for the header and footer areas of the interface.

browserUnfocusedSelAttr :: Attr

Used for the selected entry when the browser does not have focus.

browserErrorAttr :: Attr

Used for the browser's error-reporting area.

browserDirAttr :: Attr

Used for directory entries.

browserLinkAttr :: Attr

Used for symbolic link entries.

browserBlockDevAttr :: Attr

Used for block device entries.

browserNamedPipeAttr :: Attr

Used for named pipe entries.

browserCharDevAttr :: Attr

Used for device entries.

browserSockAttr :: Attr

Used for socket entries.

browserCustomAnnotations :: [(FilePath -> FileStatus -> Bool, FilePath -> FileStatus -> IO String, Attr)]

File annotations.

newDirBrowser :: BrowserSkin -> IO (DirBrowser, Widget FocusGroup)Source

Create a directory browser widget with the specified skin. Returns the browser itself along with its focus group.

withAnnotations :: BrowserSkin -> [(FilePath -> FileStatus -> Bool, FilePath -> FileStatus -> IO String, Attr)] -> BrowserSkinSource

Apply annotations to a browser skin.

setDirBrowserPath :: DirBrowser -> FilePath -> IO ()Source

Set the browser's current path.

getDirBrowserPath :: DirBrowser -> IO FilePathSource

Get the browser's current path.

defaultBrowserSkin :: BrowserSkinSource

The default browser skin with (hopefully) sane attribute defaults.

onBrowseAccept :: DirBrowser -> (FilePath -> IO ()) -> IO ()Source

Register handlers to be invoked when the user makes a selection.

onBrowseCancel :: DirBrowser -> (FilePath -> IO ()) -> IO ()Source

Register handlers to be invoked when the user cancels browsing.

onBrowserPathChange :: DirBrowser -> (FilePath -> IO ()) -> IO ()Source

Register handlers to be invoked when the browser's path changes.

reportBrowserError :: DirBrowser -> String -> IO ()Source

Report an error in the browser's error-reporting area. Useful for reporting application-specific errors with the user's file selection.

refreshBrowser :: DirBrowser -> IO ()Source

Refresh the browser by reloading and displaying the contents of the browser's current path.