| |||||||||||||||||||||||||
| |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Description | |||||||||||||||||||||||||
Tool for maintaining a status bar, supporting multiple simultaneous tasks, as a layer atop Data.Progress.Tracker. Written by John Goerzen, jgoerzen@complete.org | |||||||||||||||||||||||||
Synopsis | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Types | |||||||||||||||||||||||||
type ProgressMeter = MVar ProgressMeterR | |||||||||||||||||||||||||
Creation and Configuration | |||||||||||||||||||||||||
simpleNewMeter :: Progress -> IO ProgressMeter | |||||||||||||||||||||||||
Set up a new status bar using defaults:
| |||||||||||||||||||||||||
newMeter | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
setComponents :: ProgressMeter -> [Progress] -> IO () | |||||||||||||||||||||||||
Adjust the list of components of this ProgressMeter. | |||||||||||||||||||||||||
addComponent :: ProgressMeter -> Progress -> IO () | |||||||||||||||||||||||||
Add a new component to the list of components. | |||||||||||||||||||||||||
removeComponent :: ProgressMeter -> String -> IO () | |||||||||||||||||||||||||
Remove a component by name. | |||||||||||||||||||||||||
setWidth :: ProgressMeter -> Int -> IO () | |||||||||||||||||||||||||
Adjusts the width of this ProgressMeter. | |||||||||||||||||||||||||
Rendering and Output | |||||||||||||||||||||||||
renderMeter :: ProgressMeter -> IO String | |||||||||||||||||||||||||
Render the current status. | |||||||||||||||||||||||||
displayMeter :: Handle -> ProgressMeter -> IO () | |||||||||||||||||||||||||
Like renderMeter, but prints it to the screen instead of returning it. This function will output CR, then the meter. Pass stdout as the handle for regular display to the screen. | |||||||||||||||||||||||||
clearMeter :: Handle -> ProgressMeter -> IO () | |||||||||||||||||||||||||
Clears the meter -- outputs CR, spaces equal to the width - 1, then another CR. Pass stdout as the handle for regular display to the screen. | |||||||||||||||||||||||||
writeMeterString :: Handle -> ProgressMeter -> String -> IO () | |||||||||||||||||||||||||
Clears the meter, writes the given string, then restores the meter. The string is assumed to contain a trailing newline. Pass stdout as the handle for regular display to the screen. | |||||||||||||||||||||||||
autoDisplayMeter | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
killAutoDisplayMeter :: ProgressMeter -> ThreadId -> IO () | |||||||||||||||||||||||||
Stops the specified meter from displaying. You should probably call clearMeter after a call to this. | |||||||||||||||||||||||||
Produced by Haddock version 0.8 |