gi-gtk-4.0.8: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.ColorDialogButton

Description

The GtkColorDialogButton is a wrapped around a ColorDialog and allows to open a color chooser dialog to change the color.

It is suitable widget for selecting a color in a preference dialog.

CSS nodes

colorbutton
╰── button.color
    ╰── [content]

GtkColorDialogButton has a single CSS node with name colorbutton which contains a button node. To differentiate it from a plain GtkButton, it gets the .color style class.

Since: 4.10

Synopsis

Exported types

newtype ColorDialogButton Source #

Memory-managed wrapper type.

Constructors

ColorDialogButton (ManagedPtr ColorDialogButton) 

Instances

Instances details
Eq ColorDialogButton Source # 
Instance details

Defined in GI.Gtk.Objects.ColorDialogButton

GObject ColorDialogButton Source # 
Instance details

Defined in GI.Gtk.Objects.ColorDialogButton

ManagedPtrNewtype ColorDialogButton Source # 
Instance details

Defined in GI.Gtk.Objects.ColorDialogButton

TypedObject ColorDialogButton Source # 
Instance details

Defined in GI.Gtk.Objects.ColorDialogButton

Methods

glibType :: IO GType

HasParentTypes ColorDialogButton Source # 
Instance details

Defined in GI.Gtk.Objects.ColorDialogButton

IsGValue (Maybe ColorDialogButton) Source #

Convert ColorDialogButton to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.ColorDialogButton

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe ColorDialogButton -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe ColorDialogButton)

type ParentTypes ColorDialogButton Source # 
Instance details

Defined in GI.Gtk.Objects.ColorDialogButton

class (GObject o, IsDescendantOf ColorDialogButton o) => IsColorDialogButton o Source #

Type class for types which can be safely cast to ColorDialogButton, for instance with toColorDialogButton.

Instances

Instances details
(GObject o, IsDescendantOf ColorDialogButton o) => IsColorDialogButton o Source # 
Instance details

Defined in GI.Gtk.Objects.ColorDialogButton

toColorDialogButton :: (MonadIO m, IsColorDialogButton o) => o -> m ColorDialogButton Source #

Cast to ColorDialogButton, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDialog, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRgba, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

Setters

setAccessibleParent, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDialog, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setRgba, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

getDialog

colorDialogButtonGetDialog Source #

Arguments

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

self: a GtkColorDialogButton

-> m (Maybe ColorDialog)

Returns: the GtkColorDialog

Returns the GtkColorDialog of self.

Since: 4.10

getRgba

colorDialogButtonGetRgba Source #

Arguments

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

self: a GtkColorDialogButton

-> m RGBA

Returns: the color

Returns the color of the button.

This function is what should be used to obtain the color that was chosen by the user. To get informed about changes, listen to "notifycolor".

Since: 4.10

new

colorDialogButtonNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsColorDialog a) 
=> Maybe a

dialog: the GtkColorDialog to use

-> m ColorDialogButton

Returns: the new GtkColorDialogButton

Creates a new GtkColorDialogButton with the given GtkColorDialog.

You can pass NULL to this function and set a GtkColorDialog later. The button will be insensitive until that happens.

Since: 4.10

setDialog

colorDialogButtonSetDialog Source #

Arguments

:: (HasCallStack, MonadIO m, IsColorDialogButton a, IsColorDialog b) 
=> a

self: a GtkColorDialogButton

-> b

dialog: the new GtkColorDialog

-> m () 

Sets a GtkColorDialog object to use for creating the color chooser dialog that is presented when the user clicks the button.

Since: 4.10

setRgba

colorDialogButtonSetRgba Source #

Arguments

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

self: a GtkColorDialogButton

-> RGBA

color: the new color

-> m () 

Sets the color of the button.

Since: 4.10

Properties

dialog

The GtkColorDialog that contains parameters for the color chooser dialog.

Since: 4.10

constructColorDialogButtonDialog :: (IsColorDialogButton o, MonadIO m, IsColorDialog a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “dialog” property. This is rarely needed directly, but it is used by new.

getColorDialogButtonDialog :: (MonadIO m, IsColorDialogButton o) => o -> m (Maybe ColorDialog) Source #

Get the value of the “dialog” property. When overloading is enabled, this is equivalent to

get colorDialogButton #dialog

setColorDialogButtonDialog :: (MonadIO m, IsColorDialogButton o, IsColorDialog a) => o -> a -> m () Source #

Set the value of the “dialog” property. When overloading is enabled, this is equivalent to

set colorDialogButton [ #dialog := value ]

rgba

The selected color.

This property can be set to give the button its initial color, and it will be updated to reflect the users choice in the color chooser dialog.

Listen to notify::rgba to get informed about changes to the buttons color.

Since: 4.10

constructColorDialogButtonRgba :: (IsColorDialogButton o, MonadIO m) => RGBA -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “rgba” property. This is rarely needed directly, but it is used by new.

getColorDialogButtonRgba :: (MonadIO m, IsColorDialogButton o) => o -> m RGBA Source #

Get the value of the “rgba” property. When overloading is enabled, this is equivalent to

get colorDialogButton #rgba

setColorDialogButtonRgba :: (MonadIO m, IsColorDialogButton o) => o -> RGBA -> m () Source #

Set the value of the “rgba” property. When overloading is enabled, this is equivalent to

set colorDialogButton [ #rgba := value ]