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.Objects.ColorButton

Contents

Description

The ColorButton is a button which displays the currently selected color and allows to open a color selection dialog to change the color. It is suitable widget for selecting a color in a preference dialog.

CSS nodes

GtkColorButton has a single CSS node with name button. To differentiate it from a plain Button, it gets the .color style class.

Synopsis

Exported types

Methods

getAlpha

colorButtonGetAlpha Source #

Arguments

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

button: a ColorButton

-> m Word16

Returns: an integer between 0 and 65535

Deprecated: (Since version 3.4)Use colorChooserGetRgba instead.

Returns the current alpha value.

Since: 2.4

getColor

colorButtonGetColor Source #

Arguments

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

button: a ColorButton

-> m Color 

Deprecated: (Since version 3.4)Use colorChooserGetRgba instead.

Sets color to be the current color in the ColorButton widget.

Since: 2.4

getTitle

colorButtonGetTitle Source #

Arguments

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

button: a ColorButton

-> m Text

Returns: An internal string, do not free the return value

Gets the title of the color selection dialog.

Since: 2.4

getUseAlpha

colorButtonGetUseAlpha Source #

Arguments

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

button: a ColorButton

-> m Bool

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

Deprecated: (Since version 3.4)Use colorChooserGetUseAlpha instead.

Does the color selection dialog use the alpha channel ?

Since: 2.4

new

colorButtonNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m ColorButton

Returns: a new color button

Creates a new color button.

This returns a widget in the form of a small button containing a swatch representing the current selected color. When the button is clicked, a color-selection dialog will open, allowing the user to select a color. The swatch will be updated to reflect the new color when the user finishes.

Since: 2.4

newWithColor

colorButtonNewWithColor Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Color

color: A Color to set the current color with

-> m ColorButton

Returns: a new color button

Deprecated: (Since version 3.4)Use colorButtonNewWithRgba instead.

Creates a new color button.

Since: 2.4

newWithRgba

colorButtonNewWithRgba Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> RGBA

rgba: A RGBA to set the current color with

-> m ColorButton

Returns: a new color button

Creates a new color button.

Since: 3.0

setAlpha

colorButtonSetAlpha Source #

Arguments

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

button: a ColorButton

-> Word16

alpha: an integer between 0 and 65535

-> m () 

Deprecated: (Since version 3.4)Use colorChooserSetRgba instead.

Sets the current opacity to be alpha.

Since: 2.4

setColor

colorButtonSetColor Source #

Arguments

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

button: a ColorButton

-> Color

color: A Color to set the current color with

-> m () 

Deprecated: Use colorChooserSetRgba instead.

Sets the current color to be color.

Since: 2.4

setTitle

colorButtonSetTitle Source #

Arguments

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

button: a ColorButton

-> Text

title: String containing new window title

-> m () 

Sets the title for the color selection dialog.

Since: 2.4

setUseAlpha

colorButtonSetUseAlpha Source #

Arguments

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

button: a ColorButton

-> Bool

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

-> m () 

Deprecated: (Since version 3.4)Use colorChooserSetUseAlpha instead.

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

Since: 2.4

Properties

alpha

data ColorButtonAlphaPropertyInfo Source #

Instances

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

color

data ColorButtonColorPropertyInfo Source #

Instances

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

rgba

data ColorButtonRgbaPropertyInfo Source #

Instances

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

showEditor

data ColorButtonShowEditorPropertyInfo Source #

Instances

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

title

data ColorButtonTitlePropertyInfo Source #

Instances

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

useAlpha

data ColorButtonUseAlphaPropertyInfo Source #

Instances

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

Signals

colorSet