Gtk2HsContentsIndex
Graphics.UI.Gtk.Selectors.ColorSelection
Description
The ColorSelection is a widget that is used to select a color. It consists of a color wheel and number of sliders and entry boxes for color parameters such as hue, saturation, value, red, green, blue, and opacity. It is found on the standard color selection dialog box ColorSelectionDialog.
Synopsis
colorSelectionNew :: IO ColorSelection
colorSelectionGetCurrentAlpha :: ColorSelectionClass obj => obj -> IO Int
colorSelectionSetCurrentAlpha :: ColorSelectionClass obj => obj -> Int -> IO ()
colorSelectionGetCurrentColor :: ColorSelectionClass obj => obj -> IO Color
colorSelectionSetCurrentColor :: ColorSelectionClass obj => obj -> Color -> IO ()
colorSelectionGetHasOpacityControl :: ColorSelectionClass obj => obj -> IO Bool
colorSelectionSetHasOpacityControl :: ColorSelectionClass obj => obj -> Bool -> IO ()
colorSelectionGetHasPalette :: ColorSelectionClass obj => obj -> IO Bool
colorSelectionSetHasPalette :: ColorSelectionClass obj => obj -> Bool -> IO ()
colorSelectionGetPreviousAlpha :: ColorSelectionClass obj => obj -> IO Int
colorSelectionSetPreviousAlpha :: ColorSelectionClass obj => obj -> Int -> IO ()
colorSelectionGetPreviousColor :: ColorSelectionClass obj => obj -> IO Color
colorSelectionSetPreviousColor :: ColorSelectionClass obj => obj -> Color -> IO ()
colorSelectionIsAdjusting :: ColorSelectionClass obj => obj -> IO Bool
Documentation
colorSelectionNew :: IO ColorSelection
Creates a new ColorSelection widget.
colorSelectionGetCurrentAlpha :: ColorSelectionClass obj => obj -> IO Int

Returns the current alpha value.

  • The alpha value is represented by an integer between 0 and 65535.
colorSelectionSetCurrentAlpha :: ColorSelectionClass obj => obj -> Int -> IO ()

Sets the current opacity. The first time this is called, it will also set the original opacity too.

  • The alpha value is represented by an integer between 0 and 65535.
colorSelectionGetCurrentColor :: ColorSelectionClass obj => obj -> IO Color
Gets the current color in the ColorSelection widget.
colorSelectionSetCurrentColor :: ColorSelectionClass obj => obj -> Color -> IO ()
Sets the current color. The first time this is called, it will also set the original color too.
colorSelectionGetHasOpacityControl :: ColorSelectionClass obj => obj -> IO Bool
Sets the ColorSelection widget to use or not use opacity.
colorSelectionSetHasOpacityControl :: ColorSelectionClass obj => obj -> Bool -> IO ()
Determines whether the ColorSelection widget has an opacity control.
colorSelectionGetHasPalette :: ColorSelectionClass obj => obj -> IO Bool
Determines whether the color selector has a color palette.
colorSelectionSetHasPalette :: ColorSelectionClass obj => obj -> Bool -> IO ()
Sets whether to show or hide the palette.
colorSelectionGetPreviousAlpha :: ColorSelectionClass obj => obj -> IO Int
Returns the previous alpha value.
colorSelectionSetPreviousAlpha :: ColorSelectionClass obj => obj -> Int -> IO ()

Sets the 'previous' alpha to the given value.

  • This function should be called with some hesitations, as it might seem confusing to have that alpha change.
colorSelectionGetPreviousColor :: ColorSelectionClass obj => obj -> IO Color
Returns the original color value.
colorSelectionSetPreviousColor :: ColorSelectionClass obj => obj -> Color -> IO ()

Sets the 'previous' color.

  • This function should be called with some hesitations, as it might seem confusing to have that color change.
  • Calling colorSelectionSetCurrentColor will also set this color the first time it is called.
colorSelectionIsAdjusting :: ColorSelectionClass obj => obj -> IO Bool
Gets the current state of the widget. Returns True if the user is currently dragging a color around, and False if the selection has stopped.
Produced by Haddock version 0.6