Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The ColorChooserWidget
widget lets the user select a
color. By default, the chooser presents a predefined palette
of colors, plus a small number of settable custom colors.
It is also possible to select a different color with the
single-color editor. To enter the single-color editing mode,
use the context menu of any color of the palette, or use the
'+' button to add a new custom color.
The chooser automatically remembers the last selection, as well as custom colors.
To change the initially selected color, use colorChooserSetRgba
.
To get the selected color use colorChooserGetRgba
.
The ColorChooserWidget
is used in the ColorChooserDialog
to provide a dialog for selecting colors.
CSS names
GtkColorChooserWidget has a single CSS node with name colorchooser.
Since: 3.4
Synopsis
- newtype ColorChooserWidget = ColorChooserWidget (ManagedPtr ColorChooserWidget)
- class (GObject o, IsDescendantOf ColorChooserWidget o) => IsColorChooserWidget o
- toColorChooserWidget :: (MonadIO m, IsColorChooserWidget o) => o -> m ColorChooserWidget
- colorChooserWidgetNew :: (HasCallStack, MonadIO m) => m ColorChooserWidget
- constructColorChooserWidgetShowEditor :: (IsColorChooserWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColorChooserWidgetShowEditor :: (MonadIO m, IsColorChooserWidget o) => o -> m Bool
- setColorChooserWidgetShowEditor :: (MonadIO m, IsColorChooserWidget o) => o -> Bool -> m ()
Exported types
newtype ColorChooserWidget Source #
Memory-managed wrapper type.
ColorChooserWidget (ManagedPtr ColorChooserWidget) |
Instances
class (GObject o, IsDescendantOf ColorChooserWidget o) => IsColorChooserWidget o Source #
Type class for types which can be safely cast to ColorChooserWidget
, for instance with toColorChooserWidget
.
Instances
(GObject o, IsDescendantOf ColorChooserWidget o) => IsColorChooserWidget o Source # | |
Defined in GI.Gtk.Objects.ColorChooserWidget |
toColorChooserWidget :: (MonadIO m, IsColorChooserWidget o) => o -> m ColorChooserWidget Source #
Cast to ColorChooserWidget
, 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
activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addPalette, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, packEnd, packStart, parserFinished, path, propagateDraw, queryChildPacking, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reorderChild, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBaselinePosition, getBorderWidth, getCanDefault, getCanFocus, getCenterWidget, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getHomogeneous, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getOrientation, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRgba, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getSpacing, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getUseAlpha, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setAllocation, setAppPaintable, setBaselinePosition, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setCenterWidget, setChildPacking, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setHomogeneous, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setOrientation, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setRgba, setSensitive, setSizeRequest, setSpacing, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setUseAlpha, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
new
colorChooserWidgetNew Source #
:: (HasCallStack, MonadIO m) | |
=> m ColorChooserWidget | Returns: a new |
Creates a new ColorChooserWidget
.
Since: 3.4
Properties
showEditor
The showEditor property is True
when the color chooser
is showing the single-color editor. It can be set to switch
the color chooser into single-color editing mode.
Since: 3.4
constructColorChooserWidgetShowEditor :: (IsColorChooserWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “show-editor
” property. This is rarely needed directly, but it is used by new
.
getColorChooserWidgetShowEditor :: (MonadIO m, IsColorChooserWidget o) => o -> m Bool Source #
Get the value of the “show-editor
” property.
When overloading is enabled, this is equivalent to
get
colorChooserWidget #showEditor
setColorChooserWidgetShowEditor :: (MonadIO m, IsColorChooserWidget o) => o -> Bool -> m () Source #
Set the value of the “show-editor
” property.
When overloading is enabled, this is equivalent to
set
colorChooserWidget [ #showEditor:=
value ]