taffybar-4.0.1: A desktop bar similar to xmobar, but with more GUI

Safe Haskell | Safe-Inferred
Language | Haskell2010

System.Taffybar.Widget.Generic.VerticalBar

Contents

- Types
- Accessors/Constructors

Description

A vertical bar that can plot data in the range [0, 1]. The colors are configurable.

Synopsis

- data VerticalBarHandle
- data BarConfig
  - = BarConfig {
    - barBorderColor :: (Double, Double, Double)
    - barBackgroundColor :: Double -> (Double, Double, Double)
    - barColor :: Double -> (Double, Double, Double)
    - barPadding :: Int
    - barWidth :: Int
    - barDirection :: BarDirection
    }
  - | BarConfigIO {
    - barBorderColorIO :: IO (Double, Double, Double)
    - barBackgroundColorIO :: Double -> IO (Double, Double, Double)
    - barColorIO :: Double -> IO (Double, Double, Double)
    - barPadding :: Int
    - barWidth :: Int
    - barDirection :: BarDirection
    }
- data BarDirection
  - = HORIZONTAL
  - | VERTICAL
- verticalBarNew :: MonadIO m => BarConfig -> m (Widget, VerticalBarHandle)
- verticalBarSetPercent :: VerticalBarHandle -> Double -> IO ()
- defaultBarConfig :: (Double -> (Double, Double, Double)) -> BarConfig
- defaultBarConfigIO :: (Double -> IO (Double, Double, Double)) -> BarConfig

# Types

data VerticalBarHandle Source #

data BarConfig Source #

Constructors

BarConfig |

Fields

- barBorderColor :: (Double, Double, Double)

  Color of the border drawn around the widget

- barBackgroundColor :: Double -> (Double, Double, Double)

  The background color of the widget

- barColor :: Double -> (Double, Double, Double)

  A function to determine the color of the widget for the current data point

- barPadding :: Int

  Number of pixels of padding around the widget

- barWidth :: Int
- barDirection :: BarDirection

BarConfigIO |

Fields

- barBorderColorIO :: IO (Double, Double, Double)
- barBackgroundColorIO :: Double -> IO (Double, Double, Double)
- barColorIO :: Double -> IO (Double, Double, Double)
- barPadding :: Int

  Number of pixels of padding around the widget

- barWidth :: Int
- barDirection :: BarDirection

data BarDirection Source #

Constructors

HORIZONTAL |
VERTICAL |

# Accessors/Constructors

verticalBarNew :: MonadIO m => BarConfig -> m (Widget, VerticalBarHandle) Source #

verticalBarSetPercent :: VerticalBarHandle -> Double -> IO () Source #

defaultBarConfig :: (Double -> (Double, Double, Double)) -> BarConfig Source #

A default bar configuration. The color of the active portion of the bar must be specified.

defaultBarConfigIO :: (Double -> IO (Double, Double, Double)) -> BarConfig Source #