| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
NanoUI.Widgets.TextCommand
Description
The commands text fields run: the same ones for keys, context menus and app code.
Synopsis
- data TextCommand
- data TextMotion
Documentation
data TextCommand Source #
Something done to a text field. Commands that change text are undoable and replace the selection where one exists.
Constructors
| InsertText !Text | Replace the selection with text (typing, a snippet). |
| Delete !TextMotion | Delete the selection, or from the cursor to where the motion lands:
|
| Move !TextMotion !Bool | Move the cursor, extending the selection when the flag is set. |
| SelectAll | |
| Select !Cursor !Cursor | Select from the first position (the anchor) to the second (the cursor), clamped into the document. |
| Replace !Cursor !Cursor !Text | Replace the text between two positions, leaving the cursor after it. |
| ReplaceAll !Text | Replace the whole document as one undoable edit. |
| Undo | |
| Redo | |
| Cut | |
| Copy | |
| Paste |
Instances
| Eq TextCommand Source # | |
Defined in NanoUI.Widgets.TextCommand | |
| Show TextCommand Source # | |
Defined in NanoUI.Widgets.TextCommand Methods showsPrec :: Int -> TextCommand -> ShowS # show :: TextCommand -> String # showList :: [TextCommand] -> ShowS # | |
data TextMotion Source #
Where a motion takes the cursor.
Constructors
| CharLeft | |
| CharRight | |
| WordLeft | |
| WordRight | |
| LineStart | |
| LineEnd | |
| LineUp | |
| LineDown | |
| DocumentStart | |
| DocumentEnd |
Instances
| Eq TextMotion Source # | |
Defined in NanoUI.Widgets.TextCommand | |
| Bounded TextMotion Source # | |
Defined in NanoUI.Widgets.TextCommand | |
| Enum TextMotion Source # | |
Defined in NanoUI.Widgets.TextCommand Methods succ :: TextMotion -> TextMotion # pred :: TextMotion -> TextMotion # toEnum :: Int -> TextMotion # fromEnum :: TextMotion -> Int # enumFrom :: TextMotion -> [TextMotion] # enumFromThen :: TextMotion -> TextMotion -> [TextMotion] # enumFromTo :: TextMotion -> TextMotion -> [TextMotion] # enumFromThenTo :: TextMotion -> TextMotion -> TextMotion -> [TextMotion] # | |
| Show TextMotion Source # | |
Defined in NanoUI.Widgets.TextCommand Methods showsPrec :: Int -> TextMotion -> ShowS # show :: TextMotion -> String # showList :: [TextMotion] -> ShowS # | |