Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- newtype ColorDialogButton = ColorDialogButton (ManagedPtr ColorDialogButton)
- class (GObject o, IsDescendantOf ColorDialogButton o) => IsColorDialogButton o
- toColorDialogButton :: (MonadIO m, IsColorDialogButton o) => o -> m ColorDialogButton
- colorDialogButtonGetDialog :: (HasCallStack, MonadIO m, IsColorDialogButton a) => a -> m (Maybe ColorDialog)
- colorDialogButtonGetRgba :: (HasCallStack, MonadIO m, IsColorDialogButton a) => a -> m RGBA
- colorDialogButtonNew :: (HasCallStack, MonadIO m, IsColorDialog a) => Maybe a -> m ColorDialogButton
- colorDialogButtonSetDialog :: (HasCallStack, MonadIO m, IsColorDialogButton a, IsColorDialog b) => a -> b -> m ()
- colorDialogButtonSetRgba :: (HasCallStack, MonadIO m, IsColorDialogButton a) => a -> RGBA -> m ()
- constructColorDialogButtonDialog :: (IsColorDialogButton o, MonadIO m, IsColorDialog a) => a -> m (GValueConstruct o)
- getColorDialogButtonDialog :: (MonadIO m, IsColorDialogButton o) => o -> m (Maybe ColorDialog)
- setColorDialogButtonDialog :: (MonadIO m, IsColorDialogButton o, IsColorDialog a) => o -> a -> m ()
- constructColorDialogButtonRgba :: (IsColorDialogButton o, MonadIO m) => RGBA -> m (GValueConstruct o)
- getColorDialogButtonRgba :: (MonadIO m, IsColorDialogButton o) => o -> m RGBA
- setColorDialogButtonRgba :: (MonadIO m, IsColorDialogButton o) => o -> RGBA -> m ()
- type ColorDialogButtonActivateCallback = IO ()
- afterColorDialogButtonActivate :: (IsColorDialogButton a, MonadIO m) => a -> ((?self :: a) => ColorDialogButtonActivateCallback) -> m SignalHandlerId
- onColorDialogButtonActivate :: (IsColorDialogButton a, MonadIO m) => a -> ((?self :: a) => ColorDialogButtonActivateCallback) -> m SignalHandlerId
Exported types
newtype ColorDialogButton Source #
Memory-managed wrapper type.
Constructors
ColorDialogButton (ManagedPtr ColorDialogButton) |
Instances
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
(GObject o, IsDescendantOf ColorDialogButton o) => IsColorDialogButton o Source # | |
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
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, 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, getBaseline, 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 |
|
-> m (Maybe ColorDialog) | Returns: the |
Returns the GtkColorDialog
of self
.
Since: 4.10
getRgba
colorDialogButtonGetRgba Source #
Arguments
:: (HasCallStack, MonadIO m, IsColorDialogButton a) | |
=> a |
|
-> 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 "notifyrgba".
Since: 4.10
new
Arguments
:: (HasCallStack, MonadIO m, IsColorDialog a) | |
=> Maybe a |
|
-> m ColorDialogButton | Returns: the new |
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 |
|
-> b |
|
-> 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 |
|
-> RGBA |
|
-> 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 ]
Signals
activate
type ColorDialogButtonActivateCallback = IO () Source #
Emitted when the color dialog button is activated.
The ::activate
signal on GtkColorDialogButton
is an action signal
and emitting it causes the button to pop up its dialog.
Since: 4.14
afterColorDialogButtonActivate :: (IsColorDialogButton a, MonadIO m) => a -> ((?self :: a) => ColorDialogButtonActivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the activate signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
colorDialogButton #activate callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onColorDialogButtonActivate :: (IsColorDialogButton a, MonadIO m) => a -> ((?self :: a) => ColorDialogButtonActivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the activate signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
colorDialogButton #activate callback