Safe Haskell | None |
---|---|
Language | Haskell98 |
This module provides a directory browser interface widget. For full details, please see the Vty-ui User's Manual.
- data DirBrowser
- data BrowserSkin = BrowserSkin {
- browserHeaderAttr :: Attr
- browserUnfocusedSelAttr :: Attr
- browserErrorAttr :: Attr
- browserDirAttr :: Attr
- browserLinkAttr :: Attr
- browserBlockDevAttr :: Attr
- browserNamedPipeAttr :: Attr
- browserCharDevAttr :: Attr
- browserSockAttr :: Attr
- browserShowHeader :: Bool
- browserShowFooter :: Bool
- browserCustomAnnotations :: [(FilePath -> FileStatus -> Bool, FilePath -> FileStatus -> IO Text, Attr)]
- browserIncludeEntry :: FilePath -> FileStatus -> Bool
- type DirBrowserWidgetType = Box (Box (Box FormattedText FormattedText) HFill) (Box (List [Char] (Box FormattedText FormattedText)) (Box (Box (Box FormattedText FormattedText) HFill) FormattedText))
- newDirBrowser :: BrowserSkin -> IO (DirBrowser, Widget FocusGroup)
- withAnnotations :: BrowserSkin -> [(FilePath -> FileStatus -> Bool, FilePath -> FileStatus -> IO Text, Attr)] -> BrowserSkin
- setDirBrowserPath :: DirBrowser -> FilePath -> IO ()
- getDirBrowserPath :: DirBrowser -> IO FilePath
- defaultBrowserSkin :: BrowserSkin
- onBrowseAccept :: DirBrowser -> (FilePath -> IO ()) -> IO ()
- onBrowseCancel :: DirBrowser -> (FilePath -> IO ()) -> IO ()
- onBrowserPathChange :: DirBrowser -> (FilePath -> IO ()) -> IO ()
- reportBrowserError :: DirBrowser -> Text -> IO ()
- refreshBrowser :: DirBrowser -> IO ()
Documentation
data DirBrowser Source
data BrowserSkin Source
The collection of attributes and annotations used to determine the browser's visual appearance.
BrowserSkin | |
|
type DirBrowserWidgetType = Box (Box (Box FormattedText FormattedText) HFill) (Box (List [Char] (Box FormattedText FormattedText)) (Box (Box (Box FormattedText FormattedText) HFill) FormattedText)) Source
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 Text, Attr)] -> BrowserSkin Source
Apply annotations to a browser skin.
setDirBrowserPath :: DirBrowser -> FilePath -> IO () Source
Set the browser's current path.
getDirBrowserPath :: DirBrowser -> IO FilePath Source
Get the browser's current path.
defaultBrowserSkin :: BrowserSkin Source
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 -> Text -> 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.