gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Interfaces.ColorChooser

Contents

Description

ColorChooser is an interface that is implemented by widgets for choosing colors. Depending on the situation, colors may be allowed to have alpha (translucency).

In GTK+, the main widgets that implement this interface are ColorChooserWidget, ColorChooserDialog and ColorButton.

Synopsis

Exported types

Methods

addPalette

colorChooserAddPalette Source #

Arguments

:: (HasCallStack, MonadIO m, IsColorChooser a) 
=> a

chooser: a ColorChooser

-> Orientation

orientation: OrientationHorizontal if the palette should be displayed in rows, OrientationVertical for columns

-> Int32

colorsPerLine: the number of colors to show in each row/column

-> Maybe [RGBA]

colors: the colors of the palette, or Nothing

-> m () 

Adds a palette to the color chooser. If orientation is horizontal, the colors are grouped in rows, with colorsPerLine colors in each row. If horizontal is False, the colors are grouped in columns instead.

The default color palette of ColorChooserWidget has 27 colors, organized in columns of 3 colors. The default gray palette has 9 grays in a single row.

The layout of the color chooser widget works best when the palettes have 9-10 columns.

Calling this function for the first time has the side effect of removing the default color and gray palettes from the color chooser.

If colors is Nothing, removes all previously added palettes.

Since: 3.4

getRgba

colorChooserGetRgba Source #

Arguments

:: (HasCallStack, MonadIO m, IsColorChooser a) 
=> a

chooser: a ColorChooser

-> m RGBA 

Gets the currently-selected color.

Since: 3.4

getUseAlpha

colorChooserGetUseAlpha Source #

Arguments

:: (HasCallStack, MonadIO m, IsColorChooser a) 
=> a

chooser: a ColorChooser

-> m Bool

Returns: True if the color chooser uses the alpha channel, False if not

Returns whether the color chooser shows the alpha channel.

Since: 3.4

setRgba

colorChooserSetRgba Source #

Arguments

:: (HasCallStack, MonadIO m, IsColorChooser a) 
=> a

chooser: a ColorChooser

-> RGBA

color: the new color

-> m () 

Sets the color.

Since: 3.4

setUseAlpha

colorChooserSetUseAlpha Source #

Arguments

:: (HasCallStack, MonadIO m, IsColorChooser a) 
=> a

chooser: a ColorChooser

-> Bool

useAlpha: True if color chooser should use alpha channel, False if not

-> m () 

Sets whether or not the color chooser should use the alpha channel.

Since: 3.4

Properties

rgba

data ColorChooserRgbaPropertyInfo Source #

Instances

AttrInfo ColorChooserRgbaPropertyInfo Source # 
type AttrOrigin ColorChooserRgbaPropertyInfo Source # 
type AttrLabel ColorChooserRgbaPropertyInfo Source # 
type AttrGetType ColorChooserRgbaPropertyInfo Source # 
type AttrBaseTypeConstraint ColorChooserRgbaPropertyInfo Source # 
type AttrSetTypeConstraint ColorChooserRgbaPropertyInfo Source # 
type AttrAllowedOps ColorChooserRgbaPropertyInfo Source # 

useAlpha

data ColorChooserUseAlphaPropertyInfo Source #

Instances

AttrInfo ColorChooserUseAlphaPropertyInfo Source # 
type AttrOrigin ColorChooserUseAlphaPropertyInfo Source # 
type AttrLabel ColorChooserUseAlphaPropertyInfo Source # 
type AttrGetType ColorChooserUseAlphaPropertyInfo Source # 
type AttrBaseTypeConstraint ColorChooserUseAlphaPropertyInfo Source # 
type AttrSetTypeConstraint ColorChooserUseAlphaPropertyInfo Source # 
type AttrAllowedOps ColorChooserUseAlphaPropertyInfo Source # 

Signals

colorActivated