Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- colorChooserNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> Maybe Color -> IO (Ref ColorChooser)
- flcColorChooser :: (?assets :: Assets) => Maybe Text -> Maybe Rectangle -> Maybe Color -> Maybe ColorChooserMode -> IO (Maybe Color)
- data ColorChooserComponentBounds = ColorChooserComponentBounds {}
- data ColorChooserComponentLayout = ColorChooserComponentLayout {}
- data ColorChooserState = ColorChooserState {}
- colorDialCallback :: Ref FillDial -> Ref FillDial -> Ref FillDial -> Ref ColorChooser -> IO ()
- drawCurrentColor :: Color -> Ref Box -> IO ()
- drawHueBox :: Double -> Int -> IORef ColorChooserState -> Ref ColorChooser -> Ref Box -> IO ()
- drawPreviewColor :: Ref ColorChooser -> Ref Box -> IO ()
- drawSaturationSlider :: IORef ColorChooserState -> Ref Slider -> IO ()
- gaugeImageRectangle :: GaugeSliderSpec -> Rectangle -> Rectangle
- generateImage :: Size -> IO (Ref RGBImage)
- generateVImage :: RGB -> Size -> IO (Ref SVGImage)
- handleHueBox :: Double -> Int -> Ref ColorChooser -> Ref Box -> Event -> IO (Either UnknownEvent ())
- hueBoxBounds :: Rectangle -> Double -> Int -> Rectangle
- makeColorChooserComponentBounds :: ColorChooserComponentLayout -> Rectangle -> Int -> ColorChooserComponentBounds
- makeColorChooserComponentLayout :: Size -> Width -> Int -> ColorChooserComponentLayout
- maxSliderWidth :: Width
- modeMenuCallback :: IORef ColorChooserState -> Ref FillDial -> Ref FillDial -> Ref FillDial -> Ref ColorChooser -> Ref Choice -> IO ()
- setValuators :: Ref FillDial -> Ref FillDial -> Ref FillDial -> Ref ColorChooser -> IO ()
- sliderCallback :: IORef ColorChooserState -> Ref ColorChooser -> Ref Slider -> IO ()
- updateHsv :: IORef ColorChooserState -> Ref Slider -> Ref Box -> Ref FillDial -> Ref FillDial -> Ref FillDial -> Ref Group -> Ref ColorChooser -> (Between0And6, Between0And1, Between0And1) -> IO Int
- updateRgb :: IORef ColorChooserState -> Ref Slider -> Ref Box -> Ref FillDial -> Ref FillDial -> Ref FillDial -> Ref Group -> Ref ColorChooser -> (Between0And1, Between0And1, Between0And1) -> IO Int
Documentation
colorChooserNew :: (?assets :: Assets) => Rectangle -> Maybe Text -> Maybe Color -> IO (Ref ColorChooser) Source #
flcColorChooser :: (?assets :: Assets) => Maybe Text -> Maybe Rectangle -> Maybe Color -> Maybe ColorChooserMode -> IO (Maybe Color) Source #
Drawing routines
data ColorChooserComponentBounds Source #
Bounds of the color chooser subcomponents
ColorChooserComponentBounds | |
|
Instances
data ColorChooserComponentLayout Source #
Layout of color chooser subcomponents
ColorChooserComponentLayout | |
|
Instances
data ColorChooserState Source #
The state of color chooser, passed around as in IORef
and updated in callbacks, etc.
Instances
Show ColorChooserState Source # | |
Defined in Graphics.UI.FLTK.Theme.Light.ColorChooser showsPrec :: Int -> ColorChooserState -> ShowS # show :: ColorChooserState -> String # showList :: [ColorChooserState] -> ShowS # |
colorDialCallback :: Ref FillDial -> Ref FillDial -> Ref FillDial -> Ref ColorChooser -> IO () Source #
React to changes the dials in the preview pane
drawHueBox :: Double -> Int -> IORef ColorChooserState -> Ref ColorChooser -> Ref Box -> IO () Source #
drawPreviewColor :: Ref ColorChooser -> Ref Box -> IO () Source #
drawSaturationSlider :: IORef ColorChooserState -> Ref Slider -> IO () Source #
Draw the saturation slider using the current color to fill in the background image
gaugeImageRectangle :: GaugeSliderSpec -> Rectangle -> Rectangle Source #
Calculate the bounds of the saturation slider
generateVImage :: RGB -> Size -> IO (Ref SVGImage) Source #
Generate the background of the saturation slider
handleHueBox :: Double -> Int -> Ref ColorChooser -> Ref Box -> Event -> IO (Either UnknownEvent ()) Source #
makeColorChooserComponentBounds :: ColorChooserComponentLayout -> Rectangle -> Int -> ColorChooserComponentBounds Source #
Calculate the overall bounds of all the subcomponents
makeColorChooserComponentLayout :: Size -> Width -> Int -> ColorChooserComponentLayout Source #
The default layout of color chooser subcomponents
maxSliderWidth :: Width Source #
Max width of the saturation slider if the color chooser is resized
modeMenuCallback :: IORef ColorChooserState -> Ref FillDial -> Ref FillDial -> Ref FillDial -> Ref ColorChooser -> Ref Choice -> IO () Source #
Update the dials if the preview mode is changed from RGB->Hex->HSV->Byte mode
setValuators :: Ref FillDial -> Ref FillDial -> Ref FillDial -> Ref ColorChooser -> IO () Source #
Set the dials according the selected color
sliderCallback :: IORef ColorChooserState -> Ref ColorChooser -> Ref Slider -> IO () Source #
React to changes in the saturation slider
updateHsv :: IORef ColorChooserState -> Ref Slider -> Ref Box -> Ref FillDial -> Ref FillDial -> Ref FillDial -> Ref Group -> Ref ColorChooser -> (Between0And6, Between0And1, Between0And1) -> IO Int Source #
Update all the controls based on the dial selected HSV
updateRgb :: IORef ColorChooserState -> Ref Slider -> Ref Box -> Ref FillDial -> Ref FillDial -> Ref FillDial -> Ref Group -> Ref ColorChooser -> (Between0And1, Between0And1, Between0And1) -> IO Int Source #
Update all the controls based on the dial selected RGB value