| 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.Text
Contents
- Exported types
- Methods
- computeCursorExtents
- getActivatesDefault
- getAttributes
- getBuffer
- getEnableEmojiCompletion
- getExtraMenu
- getInputHints
- getInputPurpose
- getInvisibleChar
- getMaxLength
- getOverwriteMode
- getPlaceholderText
- getPropagateTextWidth
- getTabs
- getTextLength
- getTruncateMultiline
- getVisibility
- grabFocusWithoutSelecting
- new
- newWithBuffer
- setActivatesDefault
- setAttributes
- setBuffer
- setEnableEmojiCompletion
- setExtraMenu
- setInputHints
- setInputPurpose
- setInvisibleChar
- setMaxLength
- setOverwriteMode
- setPlaceholderText
- setPropagateTextWidth
- setTabs
- setTruncateMultiline
- setVisibility
- unsetInvisibleChar
- Properties
- Signals
Description
The GtkText widget is a single-line text entry widget.
GtkText is the common implementation of single-line text editing
that is shared between GtkEntry, GtkPasswordEntry, GtkSpinButton
and other widgets. In all of these, GtkText is used as the delegate
for the Editable implementation.
A fairly large set of key bindings are supported by default. If the entered text is longer than the allocation of the widget, the widget will scroll so that the cursor position is visible.
When using an entry for passwords and other sensitive information,
it can be put into “password mode” using textSetVisibility.
In this mode, entered text is displayed using a “invisible” character.
By default, GTK picks the best invisible character that is available
in the current font, but it can be changed with
textSetInvisibleChar.
If you are looking to add icons or progress display in an entry, look
at GtkEntry. There other alternatives for more specialized use cases,
such as GtkSearchEntry.
If you need multi-line editable text, look at GtkTextView.
CSS nodes
text[.read-only] ├── placeholder ├── undershoot.left ├── undershoot.right ├── [selection] ├── [block-cursor] ╰── [window.popup]
GtkText has a main node with the name text. Depending on the properties
of the widget, the .read-only style class may appear.
When the entry has a selection, it adds a subnode with the name selection.
When the entry is in overwrite mode, it adds a subnode with the name block-cursor that determines how the block cursor is drawn.
The CSS node for a context menu is added as a subnode below text as well.
The undershoot nodes are used to draw the underflow indication when content is scrolled out of view. These nodes get the .left and .right style classes added depending on where the indication is drawn.
When touch is used and touch selection handles are shown, they are using CSS nodes with name cursor-handle. They get the .top or .bottom style class depending on where they are shown in relation to the selection. If there is just a single handle for the text cursor, it gets the style class .insertion-cursor.
Accessibility
GtkText uses the AccessibleRoleNone role, which causes it to be
skipped for accessibility. This is because GtkText is expected to be used
as a delegate for a GtkEditable implementation that will be represented
to accessibility.
Synopsis
- newtype Text = Text (ManagedPtr Text)
- class (GObject o, IsDescendantOf Text o) => IsText o
- toText :: (MonadIO m, IsText o) => o -> m Text
- textComputeCursorExtents :: (HasCallStack, MonadIO m, IsText a) => a -> Word64 -> m (Rect, Rect)
- textGetActivatesDefault :: (HasCallStack, MonadIO m, IsText a) => a -> m Bool
- textGetAttributes :: (HasCallStack, MonadIO m, IsText a) => a -> m (Maybe AttrList)
- textGetBuffer :: (HasCallStack, MonadIO m, IsText a) => a -> m EntryBuffer
- textGetEnableEmojiCompletion :: (HasCallStack, MonadIO m, IsText a) => a -> m Bool
- textGetExtraMenu :: (HasCallStack, MonadIO m, IsText a) => a -> m (Maybe MenuModel)
- textGetInputHints :: (HasCallStack, MonadIO m, IsText a) => a -> m [InputHints]
- textGetInputPurpose :: (HasCallStack, MonadIO m, IsText a) => a -> m InputPurpose
- textGetInvisibleChar :: (HasCallStack, MonadIO m, IsText a) => a -> m Char
- textGetMaxLength :: (HasCallStack, MonadIO m, IsText a) => a -> m Int32
- textGetOverwriteMode :: (HasCallStack, MonadIO m, IsText a) => a -> m Bool
- textGetPlaceholderText :: (HasCallStack, MonadIO m, IsText a) => a -> m (Maybe Text)
- textGetPropagateTextWidth :: (HasCallStack, MonadIO m, IsText a) => a -> m Bool
- textGetTabs :: (HasCallStack, MonadIO m, IsText a) => a -> m (Maybe TabArray)
- textGetTextLength :: (HasCallStack, MonadIO m, IsText a) => a -> m Word16
- textGetTruncateMultiline :: (HasCallStack, MonadIO m, IsText a) => a -> m Bool
- textGetVisibility :: (HasCallStack, MonadIO m, IsText a) => a -> m Bool
- textGrabFocusWithoutSelecting :: (HasCallStack, MonadIO m, IsText a) => a -> m Bool
- textNew :: (HasCallStack, MonadIO m) => m Text
- textNewWithBuffer :: (HasCallStack, MonadIO m, IsEntryBuffer a) => a -> m Text
- textSetActivatesDefault :: (HasCallStack, MonadIO m, IsText a) => a -> Bool -> m ()
- textSetAttributes :: (HasCallStack, MonadIO m, IsText a) => a -> Maybe AttrList -> m ()
- textSetBuffer :: (HasCallStack, MonadIO m, IsText a, IsEntryBuffer b) => a -> b -> m ()
- textSetEnableEmojiCompletion :: (HasCallStack, MonadIO m, IsText a) => a -> Bool -> m ()
- textSetExtraMenu :: (HasCallStack, MonadIO m, IsText a, IsMenuModel b) => a -> Maybe b -> m ()
- textSetInputHints :: (HasCallStack, MonadIO m, IsText a) => a -> [InputHints] -> m ()
- textSetInputPurpose :: (HasCallStack, MonadIO m, IsText a) => a -> InputPurpose -> m ()
- textSetInvisibleChar :: (HasCallStack, MonadIO m, IsText a) => a -> Char -> m ()
- textSetMaxLength :: (HasCallStack, MonadIO m, IsText a) => a -> Int32 -> m ()
- textSetOverwriteMode :: (HasCallStack, MonadIO m, IsText a) => a -> Bool -> m ()
- textSetPlaceholderText :: (HasCallStack, MonadIO m, IsText a) => a -> Maybe Text -> m ()
- textSetPropagateTextWidth :: (HasCallStack, MonadIO m, IsText a) => a -> Bool -> m ()
- textSetTabs :: (HasCallStack, MonadIO m, IsText a) => a -> Maybe TabArray -> m ()
- textSetTruncateMultiline :: (HasCallStack, MonadIO m, IsText a) => a -> Bool -> m ()
- textSetVisibility :: (HasCallStack, MonadIO m, IsText a) => a -> Bool -> m ()
- textUnsetInvisibleChar :: (HasCallStack, MonadIO m, IsText a) => a -> m ()
- constructTextActivatesDefault :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTextActivatesDefault :: (MonadIO m, IsText o) => o -> m Bool
- setTextActivatesDefault :: (MonadIO m, IsText o) => o -> Bool -> m ()
- clearTextAttributes :: (MonadIO m, IsText o) => o -> m ()
- constructTextAttributes :: (IsText o, MonadIO m) => AttrList -> m (GValueConstruct o)
- getTextAttributes :: (MonadIO m, IsText o) => o -> m (Maybe AttrList)
- setTextAttributes :: (MonadIO m, IsText o) => o -> AttrList -> m ()
- constructTextBuffer :: (IsText o, MonadIO m, IsEntryBuffer a) => a -> m (GValueConstruct o)
- getTextBuffer :: (MonadIO m, IsText o) => o -> m EntryBuffer
- setTextBuffer :: (MonadIO m, IsText o, IsEntryBuffer a) => o -> a -> m ()
- constructTextEnableEmojiCompletion :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTextEnableEmojiCompletion :: (MonadIO m, IsText o) => o -> m Bool
- setTextEnableEmojiCompletion :: (MonadIO m, IsText o) => o -> Bool -> m ()
- clearTextExtraMenu :: (MonadIO m, IsText o) => o -> m ()
- constructTextExtraMenu :: (IsText o, MonadIO m, IsMenuModel a) => a -> m (GValueConstruct o)
- getTextExtraMenu :: (MonadIO m, IsText o) => o -> m (Maybe MenuModel)
- setTextExtraMenu :: (MonadIO m, IsText o, IsMenuModel a) => o -> a -> m ()
- clearTextImModule :: (MonadIO m, IsText o) => o -> m ()
- constructTextImModule :: (IsText o, MonadIO m) => Text -> m (GValueConstruct o)
- getTextImModule :: (MonadIO m, IsText o) => o -> m (Maybe Text)
- setTextImModule :: (MonadIO m, IsText o) => o -> Text -> m ()
- constructTextInputHints :: (IsText o, MonadIO m) => [InputHints] -> m (GValueConstruct o)
- getTextInputHints :: (MonadIO m, IsText o) => o -> m [InputHints]
- setTextInputHints :: (MonadIO m, IsText o) => o -> [InputHints] -> m ()
- constructTextInputPurpose :: (IsText o, MonadIO m) => InputPurpose -> m (GValueConstruct o)
- getTextInputPurpose :: (MonadIO m, IsText o) => o -> m InputPurpose
- setTextInputPurpose :: (MonadIO m, IsText o) => o -> InputPurpose -> m ()
- constructTextInvisibleChar :: (IsText o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getTextInvisibleChar :: (MonadIO m, IsText o) => o -> m Word32
- setTextInvisibleChar :: (MonadIO m, IsText o) => o -> Word32 -> m ()
- constructTextInvisibleCharSet :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTextInvisibleCharSet :: (MonadIO m, IsText o) => o -> m Bool
- setTextInvisibleCharSet :: (MonadIO m, IsText o) => o -> Bool -> m ()
- constructTextMaxLength :: (IsText o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getTextMaxLength :: (MonadIO m, IsText o) => o -> m Int32
- setTextMaxLength :: (MonadIO m, IsText o) => o -> Int32 -> m ()
- constructTextOverwriteMode :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTextOverwriteMode :: (MonadIO m, IsText o) => o -> m Bool
- setTextOverwriteMode :: (MonadIO m, IsText o) => o -> Bool -> m ()
- clearTextPlaceholderText :: (MonadIO m, IsText o) => o -> m ()
- constructTextPlaceholderText :: (IsText o, MonadIO m) => Text -> m (GValueConstruct o)
- getTextPlaceholderText :: (MonadIO m, IsText o) => o -> m (Maybe Text)
- setTextPlaceholderText :: (MonadIO m, IsText o) => o -> Text -> m ()
- constructTextPropagateTextWidth :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTextPropagateTextWidth :: (MonadIO m, IsText o) => o -> m Bool
- setTextPropagateTextWidth :: (MonadIO m, IsText o) => o -> Bool -> m ()
- getTextScrollOffset :: (MonadIO m, IsText o) => o -> m Int32
- clearTextTabs :: (MonadIO m, IsText o) => o -> m ()
- constructTextTabs :: (IsText o, MonadIO m) => TabArray -> m (GValueConstruct o)
- getTextTabs :: (MonadIO m, IsText o) => o -> m (Maybe TabArray)
- setTextTabs :: (MonadIO m, IsText o) => o -> TabArray -> m ()
- constructTextTruncateMultiline :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTextTruncateMultiline :: (MonadIO m, IsText o) => o -> m Bool
- setTextTruncateMultiline :: (MonadIO m, IsText o) => o -> Bool -> m ()
- constructTextVisibility :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTextVisibility :: (MonadIO m, IsText o) => o -> m Bool
- setTextVisibility :: (MonadIO m, IsText o) => o -> Bool -> m ()
- type TextActivateCallback = IO ()
- afterTextActivate :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextActivateCallback) -> m SignalHandlerId
- onTextActivate :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextActivateCallback) -> m SignalHandlerId
- type TextBackspaceCallback = IO ()
- afterTextBackspace :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextBackspaceCallback) -> m SignalHandlerId
- onTextBackspace :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextBackspaceCallback) -> m SignalHandlerId
- type TextCopyClipboardCallback = IO ()
- afterTextCopyClipboard :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextCopyClipboardCallback) -> m SignalHandlerId
- onTextCopyClipboard :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextCopyClipboardCallback) -> m SignalHandlerId
- type TextCutClipboardCallback = IO ()
- afterTextCutClipboard :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextCutClipboardCallback) -> m SignalHandlerId
- onTextCutClipboard :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextCutClipboardCallback) -> m SignalHandlerId
- type TextDeleteFromCursorCallback = DeleteType -> Int32 -> IO ()
- afterTextDeleteFromCursor :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextDeleteFromCursorCallback) -> m SignalHandlerId
- onTextDeleteFromCursor :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextDeleteFromCursorCallback) -> m SignalHandlerId
- type TextInsertAtCursorCallback = Text -> IO ()
- afterTextInsertAtCursor :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextInsertAtCursorCallback) -> m SignalHandlerId
- onTextInsertAtCursor :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextInsertAtCursorCallback) -> m SignalHandlerId
- type TextInsertEmojiCallback = IO ()
- afterTextInsertEmoji :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextInsertEmojiCallback) -> m SignalHandlerId
- onTextInsertEmoji :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextInsertEmojiCallback) -> m SignalHandlerId
- type TextMoveCursorCallback = MovementStep -> Int32 -> Bool -> IO ()
- afterTextMoveCursor :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextMoveCursorCallback) -> m SignalHandlerId
- onTextMoveCursor :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextMoveCursorCallback) -> m SignalHandlerId
- type TextPasteClipboardCallback = IO ()
- afterTextPasteClipboard :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextPasteClipboardCallback) -> m SignalHandlerId
- onTextPasteClipboard :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextPasteClipboardCallback) -> m SignalHandlerId
- type TextPreeditChangedCallback = Text -> IO ()
- afterTextPreeditChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextPreeditChangedCallback) -> m SignalHandlerId
- onTextPreeditChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextPreeditChangedCallback) -> m SignalHandlerId
- type TextToggleOverwriteCallback = IO ()
- afterTextToggleOverwrite :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextToggleOverwriteCallback) -> m SignalHandlerId
- onTextToggleOverwrite :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextToggleOverwriteCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
| Eq Text Source # | |
| GObject Text Source # | |
Defined in GI.Gtk.Objects.Text | |
| ManagedPtrNewtype Text Source # | |
Defined in GI.Gtk.Objects.Text Methods toManagedPtr :: Text -> ManagedPtr Text | |
| TypedObject Text Source # | |
Defined in GI.Gtk.Objects.Text | |
| HasParentTypes Text Source # | |
Defined in GI.Gtk.Objects.Text | |
| IsGValue (Maybe Text) Source # | Convert |
Defined in GI.Gtk.Objects.Text Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Text -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Text) | |
| type ParentTypes Text Source # | |
Defined in GI.Gtk.Objects.Text | |
class (GObject o, IsDescendantOf Text o) => IsText o Source #
Instances
| (GObject o, IsDescendantOf Text o) => IsText o Source # | |
Defined in GI.Gtk.Objects.Text | |
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeCursorExtents, 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, 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, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetInvisibleChar, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleParent, getAccessibleRole, getActivatesDefault, getAlignment, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getAttributes, getBounds, getBuffer, getBuildableId, getCanFocus, getCanTarget, getChars, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDelegate, getDirection, getDisplay, getEditable, getEnableEmojiCompletion, getEnableUndo, getExtraMenu, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getInputHints, getInputPurpose, getInvisibleChar, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMaxLength, getMaxWidthChars, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getOverwriteMode, getPangoContext, getParent, getPlaceholderText, getPlatformState, getPosition, getPreferredSize, getPrevSibling, getPrimaryClipboard, getPropagateTextWidth, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSelectionBounds, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTabs, getTemplateChild, getText, getTextLength, getTooltipMarkup, getTooltipText, getTruncateMultiline, getValign, getVexpand, getVexpandSet, getVisibility, getVisible, getWidth, getWidthChars.
Setters
setAccessibleParent, setActivatesDefault, setAlignment, setAttributes, setBuffer, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setEditable, setEnableEmojiCompletion, setEnableUndo, setExtraMenu, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setInputHints, setInputPurpose, setInvisibleChar, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMaxLength, setMaxWidthChars, setName, setOpacity, setOverflow, setOverwriteMode, setParent, setPlaceholderText, setPosition, setPropagateTextWidth, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTabs, setText, setTooltipMarkup, setTooltipText, setTruncateMultiline, setValign, setVexpand, setVexpandSet, setVisibility, setVisible, setWidthChars.
computeCursorExtents
textComputeCursorExtents Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Word64 |
|
| -> m (Rect, Rect) |
Determine the positions of the strong and weak cursors if the
insertion point in the layout is at position.
The position of each cursor is stored as a zero-width rectangle. The strong cursor location is the location where characters of the directionality equal to the base direction are inserted. The weak cursor location is the location where characters of the directionality opposite to the base direction are inserted.
The rectangle positions are in widget coordinates.
Since: 4.4
getActivatesDefault
textGetActivatesDefault Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Bool | Returns: |
Returns whether pressing Enter will activate
the default widget for the window containing self.
getAttributes
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m (Maybe AttrList) | Returns: the attribute list |
Gets the attribute list that was set on the GtkText.
See textSetAttributes.
getBuffer
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m EntryBuffer | Returns: A |
Get the GtkEntryBuffer object which holds the text for
this widget.
getEnableEmojiCompletion
textGetEnableEmojiCompletion Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Bool | Returns: |
Returns whether Emoji completion is enabled for this
GtkText widget.
getExtraMenu
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m (Maybe MenuModel) | Returns: the menu model |
Gets the menu model for extra items in the context menu.
See textSetExtraMenu.
getInputHints
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m [InputHints] |
Gets the input hints of the GtkText.
getInputPurpose
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m InputPurpose |
Gets the input purpose of the GtkText.
getInvisibleChar
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Char | Returns: the current invisible char, or 0, if |
Retrieves the character displayed when visibility is set to false.
Note that GTK does not compute this value unless it needs it,
so the value returned by this function is not very useful unless
it has been explicitly set with textSetInvisibleChar.
getMaxLength
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Int32 | Returns: the maximum allowed number of characters
in |
Retrieves the maximum allowed length of the text in self.
See textSetMaxLength.
This is equivalent to getting self's GtkEntryBuffer and
calling entryBufferGetMaxLength on it.
getOverwriteMode
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Bool | Returns: whether the text is overwritten when typing |
Gets whether text is overwritten when typing in the GtkText.
See textSetOverwriteMode.
getPlaceholderText
textGetPlaceholderText Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m (Maybe Text) | Returns: the placeholder text |
Retrieves the text that will be displayed when
self is empty and unfocused
If no placeholder text has been set, Nothing will be returned.
getPropagateTextWidth
textGetPropagateTextWidth Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Bool | Returns: |
Returns whether the GtkText will grow and shrink
with the content.
getTabs
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m (Maybe TabArray) | Returns: the tabstops |
Gets the tabstops that were set on the GtkText.
See textSetTabs.
getTextLength
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Word16 | Returns: the current number of characters
in |
Retrieves the current length of the text in self.
This is equivalent to getting self's GtkEntryBuffer
and calling entryBufferGetLength on it.
getTruncateMultiline
textGetTruncateMultiline Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Bool | Returns: |
Returns whether the GtkText will truncate multi-line text
that is pasted into the widget
getVisibility
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Bool | Returns: |
Retrieves whether the text in self is visible.
grabFocusWithoutSelecting
textGrabFocusWithoutSelecting Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m Bool | Returns: |
Causes self to have keyboard focus.
It behaves like widgetGrabFocus,
except that it doesn't select the contents of self.
You only want to call this on some special entries
which the user usually doesn't want to replace all text in,
such as search-as-you-type entries.
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m Text | Returns: a new |
Creates a new GtkText.
newWithBuffer
Arguments
| :: (HasCallStack, MonadIO m, IsEntryBuffer a) | |
| => a |
|
| -> m Text | Returns: a new |
Creates a new GtkText with the specified text buffer.
setActivatesDefault
textSetActivatesDefault Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Bool |
|
| -> m () |
If activates is True, pressing Enter will activate
the default widget for the window containing self.
This usually means that the dialog containing the GtkText
will be closed, since the default widget is usually one of
the dialog buttons.
setAttributes
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Maybe AttrList |
|
| -> m () |
Sets attributes that are applied to the text.
setBuffer
Arguments
| :: (HasCallStack, MonadIO m, IsText a, IsEntryBuffer b) | |
| => a |
|
| -> b |
|
| -> m () |
Set the GtkEntryBuffer object which holds the text for
this widget.
setEnableEmojiCompletion
textSetEnableEmojiCompletion Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether Emoji completion is enabled.
If it is, typing ':', followed by a recognized keyword, will pop up a window with suggested Emojis matching the keyword.
setExtraMenu
Arguments
| :: (HasCallStack, MonadIO m, IsText a, IsMenuModel b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Sets a menu model to add when constructing
the context menu for self.
setInputHints
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> [InputHints] |
|
| -> m () |
Sets input hints that allow input methods to fine-tune their behaviour.
setInputPurpose
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> InputPurpose |
|
| -> m () |
Sets the input purpose of the GtkText.
This can be used by on-screen keyboards and other input methods to adjust their behaviour.
setInvisibleChar
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Char |
|
| -> m () |
Sets the character to use when in “password mode”.
By default, GTK picks the best invisible char available in the current font. If you set the invisible char to 0, then the user will get no feedback at all; there will be no text on the screen as they type.
setMaxLength
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Int32 |
|
| -> m () |
Sets the maximum allowed length of the contents of the widget.
If the current contents are longer than the given length, then they will be truncated to fit.
This is equivalent to getting self's GtkEntryBuffer and
calling entryBufferSetMaxLength on it.
setOverwriteMode
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether the text is overwritten when typing
in the GtkText.
setPlaceholderText
textSetPlaceholderText Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Maybe Text |
|
| -> m () |
Sets text to be displayed in self when it is empty.
This can be used to give a visual hint of the expected
contents of the GtkText.
setPropagateTextWidth
textSetPropagateTextWidth Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether the GtkText should grow and shrink with the content.
setTabs
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Maybe TabArray |
|
| -> m () |
Sets tabstops that are applied to the text.
setTruncateMultiline
textSetTruncateMultiline Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether the GtkText should truncate multi-line text
that is pasted into the widget.
setVisibility
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether the contents of the GtkText are visible or not.
When visibility is set to False, characters are displayed
as the invisible char, and will also appear that way when
the text in the widget is copied to the clipboard.
By default, GTK picks the best invisible character available
in the current font, but it can be changed with
textSetInvisibleChar.
Note that you probably want to set Text:inputPurpose
to InputPurposePassword or InputPurposePin to
inform input methods about the purpose of this self,
in addition to setting visibility to False.
unsetInvisibleChar
textUnsetInvisibleChar Source #
Arguments
| :: (HasCallStack, MonadIO m, IsText a) | |
| => a |
|
| -> m () |
Unsets the invisible char.
After calling this, the default invisible char is used again.
Properties
activatesDefault
Whether to activate the default widget when Enter is pressed.
constructTextActivatesDefault :: (IsText 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.
getTextActivatesDefault :: (MonadIO m, IsText o) => o -> m Bool Source #
Get the value of the “activates-default” property.
When overloading is enabled, this is equivalent to
get text #activatesDefault
setTextActivatesDefault :: (MonadIO m, IsText o) => o -> Bool -> m () Source #
Set the value of the “activates-default” property.
When overloading is enabled, this is equivalent to
settext [ #activatesDefault:=value ]
attributes
A list of Pango attributes to apply to the text of the GtkText.
This is mainly useful to change the size or weight of the text.
The PangoAttribute's startIndex and endIndex must refer to the
GtkEntryBuffer text, i.e. without the preedit string.
clearTextAttributes :: (MonadIO m, IsText o) => o -> m () Source #
Set the value of the “attributes” property to Nothing.
When overloading is enabled, this is equivalent to
clear #attributes
constructTextAttributes :: (IsText 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.
getTextAttributes :: (MonadIO m, IsText o) => o -> m (Maybe AttrList) Source #
Get the value of the “attributes” property.
When overloading is enabled, this is equivalent to
get text #attributes
setTextAttributes :: (MonadIO m, IsText o) => o -> AttrList -> m () Source #
Set the value of the “attributes” property.
When overloading is enabled, this is equivalent to
settext [ #attributes:=value ]
buffer
The GtkEntryBuffer object which stores the text.
constructTextBuffer :: (IsText o, MonadIO m, IsEntryBuffer a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “buffer” property. This is rarely needed directly, but it is used by new.
getTextBuffer :: (MonadIO m, IsText o) => o -> m EntryBuffer Source #
Get the value of the “buffer” property.
When overloading is enabled, this is equivalent to
get text #buffer
setTextBuffer :: (MonadIO m, IsText o, IsEntryBuffer a) => o -> a -> m () Source #
Set the value of the “buffer” property.
When overloading is enabled, this is equivalent to
settext [ #buffer:=value ]
enableEmojiCompletion
Whether to suggest Emoji replacements.
constructTextEnableEmojiCompletion :: (IsText 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.
getTextEnableEmojiCompletion :: (MonadIO m, IsText o) => o -> m Bool Source #
Get the value of the “enable-emoji-completion” property.
When overloading is enabled, this is equivalent to
get text #enableEmojiCompletion
setTextEnableEmojiCompletion :: (MonadIO m, IsText o) => o -> Bool -> m () Source #
Set the value of the “enable-emoji-completion” property.
When overloading is enabled, this is equivalent to
settext [ #enableEmojiCompletion:=value ]
extraMenu
A menu model whose contents will be appended to the context menu.
clearTextExtraMenu :: (MonadIO m, IsText o) => o -> m () Source #
Set the value of the “extra-menu” property to Nothing.
When overloading is enabled, this is equivalent to
clear #extraMenu
constructTextExtraMenu :: (IsText o, MonadIO m, IsMenuModel a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “extra-menu” property. This is rarely needed directly, but it is used by new.
getTextExtraMenu :: (MonadIO m, IsText o) => o -> m (Maybe MenuModel) Source #
Get the value of the “extra-menu” property.
When overloading is enabled, this is equivalent to
get text #extraMenu
setTextExtraMenu :: (MonadIO m, IsText o, IsMenuModel a) => o -> a -> m () Source #
Set the value of the “extra-menu” property.
When overloading is enabled, this is equivalent to
settext [ #extraMenu:=value ]
imModule
Which IM (input method) module should be used for this self.
See IMMulticontext.
Setting this to a non-Nothing value overrides the system-wide
IM module setting. See the Settings:gtkImModule
property.
clearTextImModule :: (MonadIO m, IsText o) => o -> m () Source #
Set the value of the “im-module” property to Nothing.
When overloading is enabled, this is equivalent to
clear #imModule
constructTextImModule :: (IsText o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “im-module” property. This is rarely needed directly, but it is used by new.
getTextImModule :: (MonadIO m, IsText o) => o -> m (Maybe Text) Source #
Get the value of the “im-module” property.
When overloading is enabled, this is equivalent to
get text #imModule
setTextImModule :: (MonadIO m, IsText o) => o -> Text -> m () Source #
Set the value of the “im-module” property.
When overloading is enabled, this is equivalent to
settext [ #imModule:=value ]
inputHints
Additional hints that allow input methods to fine-tune their behaviour.
constructTextInputHints :: (IsText 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.
getTextInputHints :: (MonadIO m, IsText o) => o -> m [InputHints] Source #
Get the value of the “input-hints” property.
When overloading is enabled, this is equivalent to
get text #inputHints
setTextInputHints :: (MonadIO m, IsText o) => o -> [InputHints] -> m () Source #
Set the value of the “input-hints” property.
When overloading is enabled, this is equivalent to
settext [ #inputHints:=value ]
inputPurpose
The purpose of this text field.
This property can be used by on-screen keyboards and other input methods to adjust their behaviour.
Note that setting the purpose to InputPurposePassword or
InputPurposePin is independent from setting
Text:visibility.
constructTextInputPurpose :: (IsText 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.
getTextInputPurpose :: (MonadIO m, IsText o) => o -> m InputPurpose Source #
Get the value of the “input-purpose” property.
When overloading is enabled, this is equivalent to
get text #inputPurpose
setTextInputPurpose :: (MonadIO m, IsText o) => o -> InputPurpose -> m () Source #
Set the value of the “input-purpose” property.
When overloading is enabled, this is equivalent to
settext [ #inputPurpose:=value ]
invisibleChar
The character to used when masking contents (in “password mode”).
constructTextInvisibleChar :: (IsText o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “invisible-char” property. This is rarely needed directly, but it is used by new.
getTextInvisibleChar :: (MonadIO m, IsText o) => o -> m Word32 Source #
Get the value of the “invisible-char” property.
When overloading is enabled, this is equivalent to
get text #invisibleChar
setTextInvisibleChar :: (MonadIO m, IsText o) => o -> Word32 -> m () Source #
Set the value of the “invisible-char” property.
When overloading is enabled, this is equivalent to
settext [ #invisibleChar:=value ]
invisibleCharSet
Whether the invisible char has been set for the GtkText.
constructTextInvisibleCharSet :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “invisible-char-set” property. This is rarely needed directly, but it is used by new.
getTextInvisibleCharSet :: (MonadIO m, IsText o) => o -> m Bool Source #
Get the value of the “invisible-char-set” property.
When overloading is enabled, this is equivalent to
get text #invisibleCharSet
setTextInvisibleCharSet :: (MonadIO m, IsText o) => o -> Bool -> m () Source #
Set the value of the “invisible-char-set” property.
When overloading is enabled, this is equivalent to
settext [ #invisibleCharSet:=value ]
maxLength
Maximum number of characters that are allowed.
Zero indicates no limit.
constructTextMaxLength :: (IsText o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “max-length” property. This is rarely needed directly, but it is used by new.
getTextMaxLength :: (MonadIO m, IsText o) => o -> m Int32 Source #
Get the value of the “max-length” property.
When overloading is enabled, this is equivalent to
get text #maxLength
setTextMaxLength :: (MonadIO m, IsText o) => o -> Int32 -> m () Source #
Set the value of the “max-length” property.
When overloading is enabled, this is equivalent to
settext [ #maxLength:=value ]
overwriteMode
If text is overwritten when typing in the GtkText.
constructTextOverwriteMode :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “overwrite-mode” property. This is rarely needed directly, but it is used by new.
getTextOverwriteMode :: (MonadIO m, IsText o) => o -> m Bool Source #
Get the value of the “overwrite-mode” property.
When overloading is enabled, this is equivalent to
get text #overwriteMode
setTextOverwriteMode :: (MonadIO m, IsText o) => o -> Bool -> m () Source #
Set the value of the “overwrite-mode” property.
When overloading is enabled, this is equivalent to
settext [ #overwriteMode:=value ]
placeholderText
The text that will be displayed in the GtkText when it is empty
and unfocused.
clearTextPlaceholderText :: (MonadIO m, IsText o) => o -> m () Source #
Set the value of the “placeholder-text” property to Nothing.
When overloading is enabled, this is equivalent to
clear #placeholderText
constructTextPlaceholderText :: (IsText o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “placeholder-text” property. This is rarely needed directly, but it is used by new.
getTextPlaceholderText :: (MonadIO m, IsText o) => o -> m (Maybe Text) Source #
Get the value of the “placeholder-text” property.
When overloading is enabled, this is equivalent to
get text #placeholderText
setTextPlaceholderText :: (MonadIO m, IsText o) => o -> Text -> m () Source #
Set the value of the “placeholder-text” property.
When overloading is enabled, this is equivalent to
settext [ #placeholderText:=value ]
propagateTextWidth
Whether the widget should grow and shrink with the content.
constructTextPropagateTextWidth :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “propagate-text-width” property. This is rarely needed directly, but it is used by new.
getTextPropagateTextWidth :: (MonadIO m, IsText o) => o -> m Bool Source #
Get the value of the “propagate-text-width” property.
When overloading is enabled, this is equivalent to
get text #propagateTextWidth
setTextPropagateTextWidth :: (MonadIO m, IsText o) => o -> Bool -> m () Source #
Set the value of the “propagate-text-width” property.
When overloading is enabled, this is equivalent to
settext [ #propagateTextWidth:=value ]
scrollOffset
Number of pixels scrolled of the screen to the left.
getTextScrollOffset :: (MonadIO m, IsText o) => o -> m Int32 Source #
Get the value of the “scroll-offset” property.
When overloading is enabled, this is equivalent to
get text #scrollOffset
tabs
A list of tabstops to apply to the text of the GtkText.
clearTextTabs :: (MonadIO m, IsText o) => o -> m () Source #
Set the value of the “tabs” property to Nothing.
When overloading is enabled, this is equivalent to
clear #tabs
constructTextTabs :: (IsText o, MonadIO m) => TabArray -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “tabs” property. This is rarely needed directly, but it is used by new.
getTextTabs :: (MonadIO m, IsText o) => o -> m (Maybe TabArray) Source #
Get the value of the “tabs” property.
When overloading is enabled, this is equivalent to
get text #tabs
setTextTabs :: (MonadIO m, IsText o) => o -> TabArray -> m () Source #
Set the value of the “tabs” property.
When overloading is enabled, this is equivalent to
settext [ #tabs:=value ]
truncateMultiline
When True, pasted multi-line text is truncated to the first line.
constructTextTruncateMultiline :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “truncate-multiline” property. This is rarely needed directly, but it is used by new.
getTextTruncateMultiline :: (MonadIO m, IsText o) => o -> m Bool Source #
Get the value of the “truncate-multiline” property.
When overloading is enabled, this is equivalent to
get text #truncateMultiline
setTextTruncateMultiline :: (MonadIO m, IsText o) => o -> Bool -> m () Source #
Set the value of the “truncate-multiline” property.
When overloading is enabled, this is equivalent to
settext [ #truncateMultiline:=value ]
visibility
If False, the text is masked with the “invisible char”.
constructTextVisibility :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “visibility” property. This is rarely needed directly, but it is used by new.
getTextVisibility :: (MonadIO m, IsText o) => o -> m Bool Source #
Get the value of the “visibility” property.
When overloading is enabled, this is equivalent to
get text #visibility
setTextVisibility :: (MonadIO m, IsText o) => o -> Bool -> m () Source #
Set the value of the “visibility” property.
When overloading is enabled, this is equivalent to
settext [ #visibility:=value ]
Signals
activate
type TextActivateCallback = IO () Source #
Emitted when the user hits the <kbd>Enter</kbd> key.
The default bindings for this signal are all forms of the <kbd>Enter</kbd> key.
afterTextActivate :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextActivateCallback) -> 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 text #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.
onTextActivate :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextActivateCallback) -> 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 text #activate callback
backspace
type TextBackspaceCallback = IO () Source #
Emitted when the user asks for it.
This is a keybinding signal.
The default bindings for this signal are <kbd>Backspace</kbd> and <kbd>Shift</kbd>+<kbd>Backspace</kbd>.
afterTextBackspace :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextBackspaceCallback) -> m SignalHandlerId Source #
Connect a signal handler for the backspace signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #backspace 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.
onTextBackspace :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextBackspaceCallback) -> m SignalHandlerId Source #
Connect a signal handler for the backspace signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #backspace callback
copyClipboard
type TextCopyClipboardCallback = IO () Source #
Emitted to copy the selection to the clipboard.
This is a keybinding signal.
The default bindings for this signal are <kbd>Ctrl</kbd>+<kbd>c</kbd> and <kbd>Ctrl</kbd>+<kbd>Insert</kbd>.
afterTextCopyClipboard :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextCopyClipboardCallback) -> m SignalHandlerId Source #
Connect a signal handler for the copyClipboard signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #copyClipboard 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.
onTextCopyClipboard :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextCopyClipboardCallback) -> m SignalHandlerId Source #
Connect a signal handler for the copyClipboard signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #copyClipboard callback
cutClipboard
type TextCutClipboardCallback = IO () Source #
Emitted to cut the selection to the clipboard.
This is a keybinding signal.
The default bindings for this signal are <kbd>Ctrl</kbd>+<kbd>x</kbd> and <kbd>Shift</kbd>+<kbd>Delete</kbd>.
afterTextCutClipboard :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextCutClipboardCallback) -> m SignalHandlerId Source #
Connect a signal handler for the cutClipboard signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #cutClipboard 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.
onTextCutClipboard :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextCutClipboardCallback) -> m SignalHandlerId Source #
Connect a signal handler for the cutClipboard signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #cutClipboard callback
deleteFromCursor
type TextDeleteFromCursorCallback Source #
Arguments
| = DeleteType |
|
| -> Int32 |
|
| -> IO () |
Emitted when the user initiates a text deletion.
This is a keybinding signal.
If the type is DeleteTypeChars, GTK deletes the selection
if there is one, otherwise it deletes the requested number
of characters.
The default bindings for this signal are <kbd>Delete</kbd> for deleting a character and <kbd>Ctrl</kbd>+<kbd>Delete</kbd> for deleting a word.
afterTextDeleteFromCursor :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextDeleteFromCursorCallback) -> m SignalHandlerId Source #
Connect a signal handler for the deleteFromCursor signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #deleteFromCursor 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.
onTextDeleteFromCursor :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextDeleteFromCursorCallback) -> m SignalHandlerId Source #
Connect a signal handler for the deleteFromCursor signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #deleteFromCursor callback
insertAtCursor
type TextInsertAtCursorCallback Source #
Emitted when the user initiates the insertion of a fixed string at the cursor.
This is a keybinding signal.
This signal has no default bindings.
afterTextInsertAtCursor :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextInsertAtCursorCallback) -> m SignalHandlerId Source #
Connect a signal handler for the insertAtCursor signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #insertAtCursor 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.
onTextInsertAtCursor :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextInsertAtCursorCallback) -> m SignalHandlerId Source #
Connect a signal handler for the insertAtCursor signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #insertAtCursor callback
insertEmoji
type TextInsertEmojiCallback = IO () Source #
Emitted to present the Emoji chooser for the widget.
This is a keybinding signal.
The default bindings for this signal are <kbd>Ctrl</kbd>+<kbd>.</kbd> and <kbd>Ctrl</kbd>+<kbd>;</kbd>
afterTextInsertEmoji :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextInsertEmojiCallback) -> m SignalHandlerId Source #
Connect a signal handler for the insertEmoji signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #insertEmoji 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.
onTextInsertEmoji :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextInsertEmojiCallback) -> m SignalHandlerId Source #
Connect a signal handler for the insertEmoji signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #insertEmoji callback
moveCursor
type TextMoveCursorCallback Source #
Arguments
| = MovementStep |
|
| -> Int32 |
|
| -> Bool |
|
| -> IO () |
Emitted when the user initiates a cursor movement.
If the cursor is not visible in self, this signal causes
the viewport to be moved instead.
This is a keybinding signal.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the cursor
programmatically.
The default bindings for this signal come in two variants, the variant with the <kbd>Shift</kbd> modifier extends the selection, the variant without it does not. There are too many key combinations to list them all here.
- <kbd>←</kbd>, <kbd>→</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd> move by individual characters/lines
- <kbd>Ctrl</kbd>+<kbd>←</kbd>, etc. move by words/paragraphs
- <kbd>Home</kbd> and <kbd>End</kbd> move to the ends of the buffer
afterTextMoveCursor :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextMoveCursorCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveCursor signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #moveCursor 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.
onTextMoveCursor :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextMoveCursorCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveCursor signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #moveCursor callback
pasteClipboard
type TextPasteClipboardCallback = IO () Source #
Emitted to paste the contents of the clipboard.
This is a keybinding signal.
The default bindings for this signal are <kbd>Ctrl</kbd>+<kbd>v</kbd> and <kbd>Shift</kbd>+<kbd>Insert</kbd>.
afterTextPasteClipboard :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextPasteClipboardCallback) -> m SignalHandlerId Source #
Connect a signal handler for the pasteClipboard signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #pasteClipboard 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.
onTextPasteClipboard :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextPasteClipboardCallback) -> m SignalHandlerId Source #
Connect a signal handler for the pasteClipboard signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #pasteClipboard callback
preeditChanged
type TextPreeditChangedCallback Source #
Emitted when the preedit text changes.
If an input method is used, the typed text will not immediately be committed to the buffer. So if you are interested in the text, connect to this signal.
afterTextPreeditChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextPreeditChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the preeditChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #preeditChanged 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.
onTextPreeditChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextPreeditChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the preeditChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #preeditChanged callback
toggleOverwrite
type TextToggleOverwriteCallback = IO () Source #
Emitted to toggle the overwrite mode of the GtkText.
This is a keybinding signal.
The default bindings for this signal is <kbd>Insert</kbd>.
afterTextToggleOverwrite :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextToggleOverwriteCallback) -> m SignalHandlerId Source #
Connect a signal handler for the toggleOverwrite signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after text #toggleOverwrite 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.
onTextToggleOverwrite :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextToggleOverwriteCallback) -> m SignalHandlerId Source #
Connect a signal handler for the toggleOverwrite signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on text #toggleOverwrite callback