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 |
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 ()
Exported types
newtype ColorDialogButton Source #
Memory-managed wrapper type.
ColorDialogButton (ManagedPtr ColorDialogButton) |
Instances
Eq ColorDialogButton Source # | |
Defined in GI.Gtk.Objects.ColorDialogButton (==) :: ColorDialogButton -> ColorDialogButton -> Bool # (/=) :: ColorDialogButton -> ColorDialogButton -> Bool # | |
GObject ColorDialogButton Source # | |
Defined in GI.Gtk.Objects.ColorDialogButton | |
ManagedPtrNewtype ColorDialogButton Source # | |
Defined in GI.Gtk.Objects.ColorDialogButton toManagedPtr :: ColorDialogButton -> ManagedPtr ColorDialogButton | |
TypedObject ColorDialogButton Source # | |
Defined in GI.Gtk.Objects.ColorDialogButton | |
HasParentTypes ColorDialogButton Source # | |
Defined in GI.Gtk.Objects.ColorDialogButton | |
IsGValue (Maybe ColorDialogButton) Source # | Convert |
Defined in GI.Gtk.Objects.ColorDialogButton gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe ColorDialogButton -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe ColorDialogButton) | |
type ParentTypes ColorDialogButton Source # | |
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
(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, 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 #
:: (HasCallStack, MonadIO m, IsColorDialogButton a) | |
=> a |
|
-> m (Maybe ColorDialog) | Returns: the |
Returns the GtkColorDialog
of self
.
Since: 4.10
getRgba
colorDialogButtonGetRgba Source #
:: (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 "notifycolor".
Since: 4.10
new
:: (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 #
:: (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 #
:: (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 ]