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 |
GI.Gtk.Objects.EditableLabel
Description
A GtkEditableLabel is a Label
that allows users to
edit the text by switching the widget to an “edit mode”.
GtkEditableLabel does not have API of its own, but it
implements the Editable
interface.
The default bindings for activating the edit mode is to click or press the Enter key. The default bindings for leaving the edit mode are the Enter key (to save the results) or the Escape key (to cancel the editing).
CSS nodes
plain code
editablelabel[.editing] ╰── stack ├── label ╰── text
GtkEditableLabel has a main node with the name editablelabel. When the entry is in editing mode, it gets the .editing style class.
For all the subnodes added to the text node in various situations,
see Text
.
Synopsis
- newtype EditableLabel = EditableLabel (ManagedPtr EditableLabel)
- class (GObject o, IsDescendantOf EditableLabel o) => IsEditableLabel o
- toEditableLabel :: (MonadIO m, IsEditableLabel o) => o -> m EditableLabel
- editableLabelGetEditing :: (HasCallStack, MonadIO m, IsEditableLabel a) => a -> m Bool
- editableLabelNew :: (HasCallStack, MonadIO m) => Text -> m EditableLabel
- editableLabelStartEditing :: (HasCallStack, MonadIO m, IsEditableLabel a) => a -> m ()
- editableLabelStopEditing :: (HasCallStack, MonadIO m, IsEditableLabel a) => a -> Bool -> m ()
- getEditableLabelEditing :: (MonadIO m, IsEditableLabel o) => o -> m Bool
Exported types
newtype EditableLabel Source #
Memory-managed wrapper type.
Constructors
EditableLabel (ManagedPtr EditableLabel) |
Instances
class (GObject o, IsDescendantOf EditableLabel o) => IsEditableLabel o Source #
Type class for types which can be safely cast to EditableLabel
, for instance with toEditableLabel
.
Instances
(GObject o, IsDescendantOf EditableLabel o) => IsEditableLabel o Source # | |
Defined in GI.Gtk.Objects.EditableLabel |
toEditableLabel :: (MonadIO m, IsEditableLabel o) => o -> m EditableLabel Source #
Cast to EditableLabel
, 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, deleteSelection, deleteText, dragCheckThreshold, errorBell, finishDelegate, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initDelegate, initTemplate, insertActionGroup, insertAfter, insertBefore, insertText, 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, selectRegion, shouldLayout, show, sizeAllocate, snapshotChild, startEditing, stealData, stealQdata, stopEditing, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleRole, getAlignment, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBuildableId, getCanFocus, getCanTarget, getChars, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDelegate, getDirection, getDisplay, getEditable, getEditing, getEnableUndo, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMaxWidthChars, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPosition, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSelectionBounds, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getText, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth, getWidthChars.
Setters
setAlignment, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setEditable, setEnableUndo, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMaxWidthChars, setName, setOpacity, setOverflow, setParent, setPosition, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setText, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthChars.
getEditing
editableLabelGetEditing Source #
Arguments
:: (HasCallStack, MonadIO m, IsEditableLabel a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the label is currently in “editing mode”.
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m EditableLabel | Returns: the new |
Creates a new EditableLabel
widget.
startEditing
editableLabelStartEditing Source #
Arguments
:: (HasCallStack, MonadIO m, IsEditableLabel a) | |
=> a |
|
-> m () |
Switches the label into “editing mode”.
stopEditing
editableLabelStopEditing Source #
Arguments
:: (HasCallStack, MonadIO m, IsEditableLabel a) | |
=> a |
|
-> Bool |
|
-> m () |
Properties
editing
This property is True
while the widget is in edit mode.
getEditableLabelEditing :: (MonadIO m, IsEditableLabel o) => o -> m Bool Source #
Get the value of the “editing
” property.
When overloading is enabled, this is equivalent to
get
editableLabel #editing