fltkhs-themes-0.1.0.5: A set of themed widgets that provides drop in replacements to the ones in FLTKHS.

Safe HaskellNone
LanguageHaskell2010

Graphics.UI.FLTK.Theme.Light.ColorChooser

Contents

Synopsis

Documentation

Drawing routines

data ColorChooserComponentBounds Source #

Bounds of the color chooser subcomponents

Constructors

ColorChooserComponentBounds 

Fields

data ColorChooserComponentLayout Source #

Layout of color chooser subcomponents

Constructors

ColorChooserComponentLayout 

Fields

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 #

Draw the hue box subcomponent in the given Box, takes the Double indicator handle radius, the Int slider gauge height so it can align itself with it.

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

generateImage :: Size -> IO (Ref RGBImage) Source #

Generate the hue box image

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 #

Handle all events inside the hue box given the Double indicator radius and the Int gauge height.

hueBoxBounds :: Rectangle -> Double -> Int -> Rectangle Source #

Calculate the bounds of the hue box based on the overall Rectangle bounds, the Double radius of the indicator circle (half the indicator circle can be outside the box so the center is always within it), and the Int saturation slider height so the hue box can position itself accordingly.

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