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 |
A ListBoxRow
with an embedded text entry.
<picture> <source srcset="entry-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="entry-row.png" alt="entry-row"> </picture>
AdwEntryRow
has a title that doubles as placeholder text. It shows an icon
indicating that it's editable and can receive additional widgets before or
after the editable part.
If [propertyentryRow
:show-apply-button] is set to TRUE
, AdwEntryRow
can
show an apply button when editing its contents. This can be useful if
changing its contents can result in an expensive operation, such as network
activity.
AdwEntryRow
provides only minimal API and should be used with the
Editable
API.
See also [classpasswordEntryRow
].
AdwEntryRow as GtkBuildable
The AdwEntryRow
implementation of the Buildable
interface
supports adding a child at its end by specifying “suffix” or omitting the
“type” attribute of a <child> element.
It also supports adding a child as a prefix widget by specifying “prefix” as the “type” attribute of a <child> element.
CSS nodes
AdwEntryRow
has a single CSS node with name row
and the .entry
style
class.
Since: 1.2
Synopsis
- newtype EntryRow = EntryRow (ManagedPtr EntryRow)
- class (GObject o, IsDescendantOf EntryRow o) => IsEntryRow o
- toEntryRow :: (MonadIO m, IsEntryRow o) => o -> m EntryRow
- entryRowAddPrefix :: (HasCallStack, MonadIO m, IsEntryRow a, IsWidget b) => a -> b -> m ()
- entryRowAddSuffix :: (HasCallStack, MonadIO m, IsEntryRow a, IsWidget b) => a -> b -> m ()
- entryRowGetActivatesDefault :: (HasCallStack, MonadIO m, IsEntryRow a) => a -> m Bool
- entryRowGetAttributes :: (HasCallStack, MonadIO m, IsEntryRow a) => a -> m (Maybe AttrList)
- entryRowGetEnableEmojiCompletion :: (HasCallStack, MonadIO m, IsEntryRow a) => a -> m Bool
- entryRowGetInputHints :: (HasCallStack, MonadIO m, IsEntryRow a) => a -> m [InputHints]
- entryRowGetInputPurpose :: (HasCallStack, MonadIO m, IsEntryRow a) => a -> m InputPurpose
- entryRowGetShowApplyButton :: (HasCallStack, MonadIO m, IsEntryRow a) => a -> m Bool
- entryRowGrabFocusWithoutSelecting :: (HasCallStack, MonadIO m, IsEntryRow a) => a -> m Bool
- entryRowNew :: (HasCallStack, MonadIO m) => m EntryRow
- entryRowRemove :: (HasCallStack, MonadIO m, IsEntryRow a, IsWidget b) => a -> b -> m ()
- entryRowSetActivatesDefault :: (HasCallStack, MonadIO m, IsEntryRow a) => a -> Bool -> m ()
- entryRowSetAttributes :: (HasCallStack, MonadIO m, IsEntryRow a) => a -> Maybe AttrList -> m ()
- entryRowSetEnableEmojiCompletion :: (HasCallStack, MonadIO m, IsEntryRow a) => a -> Bool -> m ()
- entryRowSetInputHints :: (HasCallStack, MonadIO m, IsEntryRow a) => a -> [InputHints] -> m ()
- entryRowSetInputPurpose :: (HasCallStack, MonadIO m, IsEntryRow a) => a -> InputPurpose -> m ()
- entryRowSetShowApplyButton :: (HasCallStack, MonadIO m, IsEntryRow a) => a -> Bool -> m ()
- constructEntryRowActivatesDefault :: (IsEntryRow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getEntryRowActivatesDefault :: (MonadIO m, IsEntryRow o) => o -> m Bool
- setEntryRowActivatesDefault :: (MonadIO m, IsEntryRow o) => o -> Bool -> m ()
- clearEntryRowAttributes :: (MonadIO m, IsEntryRow o) => o -> m ()
- constructEntryRowAttributes :: (IsEntryRow o, MonadIO m) => AttrList -> m (GValueConstruct o)
- getEntryRowAttributes :: (MonadIO m, IsEntryRow o) => o -> m (Maybe AttrList)
- setEntryRowAttributes :: (MonadIO m, IsEntryRow o) => o -> AttrList -> m ()
- constructEntryRowEnableEmojiCompletion :: (IsEntryRow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getEntryRowEnableEmojiCompletion :: (MonadIO m, IsEntryRow o) => o -> m Bool
- setEntryRowEnableEmojiCompletion :: (MonadIO m, IsEntryRow o) => o -> Bool -> m ()
- constructEntryRowInputHints :: (IsEntryRow o, MonadIO m) => [InputHints] -> m (GValueConstruct o)
- getEntryRowInputHints :: (MonadIO m, IsEntryRow o) => o -> m [InputHints]
- setEntryRowInputHints :: (MonadIO m, IsEntryRow o) => o -> [InputHints] -> m ()
- constructEntryRowInputPurpose :: (IsEntryRow o, MonadIO m) => InputPurpose -> m (GValueConstruct o)
- getEntryRowInputPurpose :: (MonadIO m, IsEntryRow o) => o -> m InputPurpose
- setEntryRowInputPurpose :: (MonadIO m, IsEntryRow o) => o -> InputPurpose -> m ()
- constructEntryRowShowApplyButton :: (IsEntryRow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getEntryRowShowApplyButton :: (MonadIO m, IsEntryRow o) => o -> m Bool
- setEntryRowShowApplyButton :: (MonadIO m, IsEntryRow o) => o -> Bool -> m ()
- type EntryRowApplyCallback = IO ()
- afterEntryRowApply :: (IsEntryRow a, MonadIO m) => a -> ((?self :: a) => EntryRowApplyCallback) -> m SignalHandlerId
- onEntryRowApply :: (IsEntryRow a, MonadIO m) => a -> ((?self :: a) => EntryRowApplyCallback) -> m SignalHandlerId
- type EntryRowEntryActivatedCallback = IO ()
- afterEntryRowEntryActivated :: (IsEntryRow a, MonadIO m) => a -> ((?self :: a) => EntryRowEntryActivatedCallback) -> m SignalHandlerId
- onEntryRowEntryActivated :: (IsEntryRow a, MonadIO m) => a -> ((?self :: a) => EntryRowEntryActivatedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq EntryRow Source # | |
GObject EntryRow Source # | |
Defined in GI.Adw.Objects.EntryRow | |
ManagedPtrNewtype EntryRow Source # | |
Defined in GI.Adw.Objects.EntryRow toManagedPtr :: EntryRow -> ManagedPtr EntryRow | |
TypedObject EntryRow Source # | |
Defined in GI.Adw.Objects.EntryRow | |
HasParentTypes EntryRow Source # | |
Defined in GI.Adw.Objects.EntryRow | |
IsGValue (Maybe EntryRow) Source # | Convert |
Defined in GI.Adw.Objects.EntryRow gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe EntryRow -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe EntryRow) | |
type ParentTypes EntryRow Source # | |
Defined in GI.Adw.Objects.EntryRow type ParentTypes EntryRow = '[PreferencesRow, ListBoxRow, Widget, Object, Accessible, Actionable, Buildable, ConstraintTarget, Editable] |
class (GObject o, IsDescendantOf EntryRow o) => IsEntryRow o Source #
Type class for types which can be safely cast to EntryRow
, for instance with toEntryRow
.
Instances
(GObject o, IsDescendantOf EntryRow o) => IsEntryRow o Source # | |
Defined in GI.Adw.Objects.EntryRow |
toEntryRow :: (MonadIO m, IsEntryRow o) => o -> m EntryRow Source #
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addPrefix, addSuffix, addTickCallback, allocate, bindProperty, bindPropertyFull, changed, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, delegateGetAccessiblePlatformState, deleteSelection, deleteText, disposeTemplate, dragCheckThreshold, errorBell, finishDelegate, forceFloating, freezeNotify, getv, grabFocus, grabFocusWithoutSelecting, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initDelegate, initTemplate, insertActionGroup, insertAfter, insertBefore, insertText, isAncestor, isDrawable, isFloating, isFocus, isSelected, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, remove, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, selectRegion, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleParent, getAccessibleRole, getActionName, getActionTargetValue, getActivatable, getActivatesDefault, getAlignment, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getAttributes, getBounds, getBuildableId, getCanFocus, getCanTarget, getChars, getChild, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDelegate, getDirection, getDisplay, getEditable, getEnableEmojiCompletion, getEnableUndo, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeader, getHeight, getHexpand, getHexpandSet, getIndex, getInputHints, getInputPurpose, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMaxWidthChars, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPosition, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSelectable, getSelectionBounds, getSensitive, getSettings, getShowApplyButton, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getText, getTitle, getTitleSelectable, getTooltipMarkup, getTooltipText, getUseMarkup, getUseUnderline, getValign, getVexpand, getVexpandSet, getVisible, getWidth, getWidthChars.
Setters
setAccessibleParent, setActionName, setActionTargetValue, setActivatable, setActivatesDefault, setAlignment, setAttributes, setCanFocus, setCanTarget, setChild, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDetailedActionName, setDirection, setEditable, setEnableEmojiCompletion, setEnableUndo, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHeader, setHexpand, setHexpandSet, setInputHints, setInputPurpose, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMaxWidthChars, setName, setOpacity, setOverflow, setParent, setPosition, setProperty, setReceivesDefault, setSelectable, setSensitive, setShowApplyButton, setSizeRequest, setStateFlags, setText, setTitle, setTitleSelectable, setTooltipMarkup, setTooltipText, setUseMarkup, setUseUnderline, setValign, setVexpand, setVexpandSet, setVisible, setWidthChars.
addPrefix
:: (HasCallStack, MonadIO m, IsEntryRow a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds a prefix widget to self
.
Since: 1.2
addSuffix
:: (HasCallStack, MonadIO m, IsEntryRow a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds a suffix widget to self
.
Since: 1.2
getActivatesDefault
entryRowGetActivatesDefault Source #
:: (HasCallStack, MonadIO m, IsEntryRow a) | |
=> a |
|
-> m Bool | Returns: whether to activate the default widget |
Gets whether activating the embedded entry can activate the default widget.
Since: 1.2
getAttributes
entryRowGetAttributes Source #
:: (HasCallStack, MonadIO m, IsEntryRow a) | |
=> a |
|
-> m (Maybe AttrList) | Returns: the list of attributes |
Gets Pango attributes applied to the text of the embedded entry.
Since: 1.2
getEnableEmojiCompletion
entryRowGetEnableEmojiCompletion Source #
:: (HasCallStack, MonadIO m, IsEntryRow a) | |
=> a |
|
-> m Bool | Returns: whether or not emoji completion is enabled |
Gets whether to suggest emoji replacements on self
.
Since: 1.2
getInputHints
entryRowGetInputHints Source #
:: (HasCallStack, MonadIO m, IsEntryRow a) | |
=> a |
|
-> m [InputHints] | Returns: The input hints |
Gets the additional input hints of self
.
Since: 1.2
getInputPurpose
entryRowGetInputPurpose Source #
:: (HasCallStack, MonadIO m, IsEntryRow a) | |
=> a |
|
-> m InputPurpose | Returns: the input purpose |
Gets the input purpose of self
.
Since: 1.2
getShowApplyButton
entryRowGetShowApplyButton Source #
:: (HasCallStack, MonadIO m, IsEntryRow a) | |
=> a |
|
-> m Bool | Returns: whether to show the apply button |
Gets whether self
can show the apply button.
Since: 1.2
grabFocusWithoutSelecting
entryRowGrabFocusWithoutSelecting Source #
:: (HasCallStack, MonadIO m, IsEntryRow a) | |
=> a |
|
-> m Bool | Returns: whether the focus is now inside |
Causes self
to have keyboard focus without selecting the text.
See textGrabFocusWithoutSelecting
for more information.
Since: 1.3
new
:: (HasCallStack, MonadIO m) | |
=> m EntryRow | Returns: the newly created |
Creates a new AdwEntryRow
.
Since: 1.2
remove
:: (HasCallStack, MonadIO m, IsEntryRow a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Removes a child from self
.
Since: 1.2
setActivatesDefault
entryRowSetActivatesDefault Source #
:: (HasCallStack, MonadIO m, IsEntryRow a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether activating the embedded entry can activate the default widget.
Since: 1.2
setAttributes
entryRowSetAttributes Source #
:: (HasCallStack, MonadIO m, IsEntryRow a) | |
=> a |
|
-> Maybe AttrList |
|
-> m () |
Sets Pango attributes to apply to the text of the embedded entry.
The [structpango
.Attribute]'s start_index
and end_index
must refer to
the EntryBuffer
text, i.e. without the preedit string.
Since: 1.2
setEnableEmojiCompletion
entryRowSetEnableEmojiCompletion Source #
:: (HasCallStack, MonadIO m, IsEntryRow a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether to suggest emoji replacements on self
.
Emoji replacement is done with :-delimited names, like :heart:
.
Since: 1.2
setInputHints
entryRowSetInputHints Source #
:: (HasCallStack, MonadIO m, IsEntryRow a) | |
=> a |
|
-> [InputHints] |
|
-> m () |
Set additional input hints for self
.
Input hints allow input methods to fine-tune their behavior.
See also: [propertyadwEntryRow
:input-purpose]
Since: 1.2
setInputPurpose
entryRowSetInputPurpose Source #
:: (HasCallStack, MonadIO m, IsEntryRow a) | |
=> a |
|
-> InputPurpose |
|
-> m () |
Sets the input purpose of self
.
The input purpose can be used by input methods to adjust their behavior.
Since: 1.2
setShowApplyButton
entryRowSetShowApplyButton Source #
:: (HasCallStack, MonadIO m, IsEntryRow a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether self
can show the apply button.
When set to TRUE
, typing text in the entry will reveal an apply button.
Clicking it or pressing the <kbd>Enter</kbd> key will hide the button and
emit the signalentryRow
[apply] signal.
This is useful if changing the entry contents can trigger an expensive operation, e.g. network activity, to avoid triggering it after typing every character.
Since: 1.2
Properties
activatesDefault
Whether activating the embedded entry can activate the default widget.
Since: 1.2
constructEntryRowActivatesDefault :: (IsEntryRow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “activates-default
” property. This is rarely needed directly, but it is used by new
.
getEntryRowActivatesDefault :: (MonadIO m, IsEntryRow o) => o -> m Bool Source #
Get the value of the “activates-default
” property.
When overloading is enabled, this is equivalent to
get
entryRow #activatesDefault
setEntryRowActivatesDefault :: (MonadIO m, IsEntryRow o) => o -> Bool -> m () Source #
Set the value of the “activates-default
” property.
When overloading is enabled, this is equivalent to
set
entryRow [ #activatesDefault:=
value ]
attributes
A list of Pango attributes to apply to the text of the embedded entry.
The [structpango
.Attribute]'s start_index
and end_index
must refer to
the EntryBuffer
text, i.e. without the preedit string.
Since: 1.2
clearEntryRowAttributes :: (MonadIO m, IsEntryRow o) => o -> m () Source #
Set the value of the “attributes
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#attributes
constructEntryRowAttributes :: (IsEntryRow o, MonadIO m) => AttrList -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “attributes
” property. This is rarely needed directly, but it is used by new
.
getEntryRowAttributes :: (MonadIO m, IsEntryRow o) => o -> m (Maybe AttrList) Source #
Get the value of the “attributes
” property.
When overloading is enabled, this is equivalent to
get
entryRow #attributes
setEntryRowAttributes :: (MonadIO m, IsEntryRow o) => o -> AttrList -> m () Source #
Set the value of the “attributes
” property.
When overloading is enabled, this is equivalent to
set
entryRow [ #attributes:=
value ]
enableEmojiCompletion
Whether to suggest emoji replacements on the entry row.
Emoji replacement is done with :-delimited names, like :heart:
.
Since: 1.2
constructEntryRowEnableEmojiCompletion :: (IsEntryRow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “enable-emoji-completion
” property. This is rarely needed directly, but it is used by new
.
getEntryRowEnableEmojiCompletion :: (MonadIO m, IsEntryRow o) => o -> m Bool Source #
Get the value of the “enable-emoji-completion
” property.
When overloading is enabled, this is equivalent to
get
entryRow #enableEmojiCompletion
setEntryRowEnableEmojiCompletion :: (MonadIO m, IsEntryRow o) => o -> Bool -> m () Source #
Set the value of the “enable-emoji-completion
” property.
When overloading is enabled, this is equivalent to
set
entryRow [ #enableEmojiCompletion:=
value ]
inputHints
Additional input hints for the entry row.
Input hints allow input methods to fine-tune their behavior.
See also: EntryRow:inputPurpose
Since: 1.2
constructEntryRowInputHints :: (IsEntryRow o, MonadIO m) => [InputHints] -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “input-hints
” property. This is rarely needed directly, but it is used by new
.
getEntryRowInputHints :: (MonadIO m, IsEntryRow o) => o -> m [InputHints] Source #
Get the value of the “input-hints
” property.
When overloading is enabled, this is equivalent to
get
entryRow #inputHints
setEntryRowInputHints :: (MonadIO m, IsEntryRow o) => o -> [InputHints] -> m () Source #
Set the value of the “input-hints
” property.
When overloading is enabled, this is equivalent to
set
entryRow [ #inputHints:=
value ]
inputPurpose
The input purpose of the entry row.
The input purpose can be used by input methods to adjust their behavior.
Since: 1.2
constructEntryRowInputPurpose :: (IsEntryRow o, MonadIO m) => InputPurpose -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “input-purpose
” property. This is rarely needed directly, but it is used by new
.
getEntryRowInputPurpose :: (MonadIO m, IsEntryRow o) => o -> m InputPurpose Source #
Get the value of the “input-purpose
” property.
When overloading is enabled, this is equivalent to
get
entryRow #inputPurpose
setEntryRowInputPurpose :: (MonadIO m, IsEntryRow o) => o -> InputPurpose -> m () Source #
Set the value of the “input-purpose
” property.
When overloading is enabled, this is equivalent to
set
entryRow [ #inputPurpose:=
value ]
showApplyButton
Whether to show the apply button.
When set to TRUE
, typing text in the entry will reveal an apply button.
Clicking it or pressing the <kbd>Enter</kbd> key will hide the button and
emit the signalentryRow
[apply] signal.
This is useful if changing the entry contents can trigger an expensive operation, e.g. network activity, to avoid triggering it after typing every character.
Since: 1.2
constructEntryRowShowApplyButton :: (IsEntryRow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “show-apply-button
” property. This is rarely needed directly, but it is used by new
.
getEntryRowShowApplyButton :: (MonadIO m, IsEntryRow o) => o -> m Bool Source #
Get the value of the “show-apply-button
” property.
When overloading is enabled, this is equivalent to
get
entryRow #showApplyButton
setEntryRowShowApplyButton :: (MonadIO m, IsEntryRow o) => o -> Bool -> m () Source #
Set the value of the “show-apply-button
” property.
When overloading is enabled, this is equivalent to
set
entryRow [ #showApplyButton:=
value ]
Signals
apply
type EntryRowApplyCallback = IO () Source #
Emitted when the apply button is pressed.
See [propertyentryRow
:show-apply-button].
Since: 1.2
afterEntryRowApply :: (IsEntryRow a, MonadIO m) => a -> ((?self :: a) => EntryRowApplyCallback) -> m SignalHandlerId Source #
Connect a signal handler for the apply signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
entryRow #apply 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.
onEntryRowApply :: (IsEntryRow a, MonadIO m) => a -> ((?self :: a) => EntryRowApplyCallback) -> m SignalHandlerId Source #
Connect a signal handler for the apply signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
entryRow #apply callback
entryActivated
type EntryRowEntryActivatedCallback = IO () Source #
Emitted when the embedded entry is activated.
Since: 1.2
afterEntryRowEntryActivated :: (IsEntryRow a, MonadIO m) => a -> ((?self :: a) => EntryRowEntryActivatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the entryActivated signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
entryRow #entryActivated 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.
onEntryRowEntryActivated :: (IsEntryRow a, MonadIO m) => a -> ((?self :: a) => EntryRowEntryActivatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the entryActivated signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
entryRow #entryActivated callback