Entry —
This widget lets the user enter a single line of text.
newtype
Editable |
entryNew:: IO Entry |
entryAppendText:: EntryClass ec => ec -> String -> IO () |
entryCopyClipboard:: EntryClass ed => ed -> IO () |
entryCutClipboard:: EntryClass ed => ed -> IO () |
entryDeleteSelection:: EntryClass ed => ed -> IO () |
entryDeleteText:: EntryClass ed => ed -> Int -> Int -> IO () |
entryGetActivatesDefault:: EntryClass ec => ec -> IO Bool |
entryGetChars:: EntryClass ed => ed -> Int -> Int -> IO String |
entryGetHasFrame:: EntryClass ec => ec -> IO Bool |
entryGetPosition:: EntryClass ed => ed -> IO Int |
entryGetSelectionBounds:: EntryClass ed => ed -> IO (Int,Int) |
entryGetText:: EntryClass ec => ec -> IO String |
entryGetWidthChars:: EntryClass ec => ec -> IO Int |
entryInsertText:: EntryClass ed => ed -> String -> Int -> IO Int |
entryPasteClipboard:: EntryClass ed => ed -> IO () |
entryPrependText:: EntryClass ec => ec -> String -> IO () |
entrySelectRegion:: EntryClass ed => ed -> Int -> Int -> IO () |
entrySetActivatesDefault:: EntryClass ec => ec -> Bool -> IO () |
entrySetEditable:: EntryClass ed => ed -> Bool -> IO () |
entrySetHasFrame:: EntryClass ec => ec -> Bool -> IO () |
entrySetInvisibleChar:: EntryClass ec => ec -> Char -> IO () |
entrySetMaxLength:: EntryClass ec => ec -> Int -> IO () |
entrySetPosition:: EntryClass ed => ed -> Int -> IO () |
entrySetText:: EntryClass ec => ec -> String -> IO () |
entrySetVisibility:: EntryClass ec => ec -> Bool -> IO () |
entrySetWidthChars:: EntryClass ec => ec -> Int -> IO () |
onCopyClipboard:: EntryClass ec => ec -> IO () -> IO (ConnectId ec) |
onCutClipboard:: EntryClass ec => ec -> IO () -> IO (ConnectId ec) |
onDeleteText:: EntryClass ec => ec -> (Int -> Int -> IO ()) -> IO (ConnectId ec) |
onEntryActivate:: EntryClass ec => ec -> IO () -> IO (ConnectId ec) |
onEntryChanged:: EntryClass ec => ec -> IO () -> IO (ConnectId ec) |
onInsertAtCursor:: EntryClass ec => ec -> (String -> IO ()) -> IO (ConnectId ec) |
onPasteClipboard:: EntryClass ec => ec -> IO () -> IO (ConnectId ec) |
onToggleOverwrite:: EntryClass ec => ec -> IO () -> IO (ConnectId ec) |
A couple of signals are not bound because I could not figure out what they mean. Some of them do not seem to be emitted at all.
Delete a given range of text.
| entryDeleteText | :: ed | :: Int | :: Int | :: IO () |
| ed | start | end |
If the end position is invalid, it is set to the lenght of the buffer.
start is restricted to 0.. end.
Query whether pressing return will activate the default widget.
| entryGetActivatesDefault | :: ec | :: IO Bool |
| ec |
Retrieve a range of characters.
| entryGetChars | :: ed | :: Int | :: Int | :: IO String |
| ed | start | end |
Set end to a negative value to reach the end of the buffer.
Query if the text Entry is displayed with a frame around it.
| entryGetHasFrame | :: ec | :: IO Bool |
| ec |
Get the span of the current selection.
| entryGetSelectionBounds | :: ed | :: IO (Int,Int) |
| ed |
The returned tuple is not ordered. The second index represents the position of the cursor. The first index is the other end of the selection. If both numbers are equal there is in fact no selection.
Retrieve the number of characters the widget should ask for.
| entryGetWidthChars | :: ec | :: IO Int |
| ec |
Insert new text at the specified position.
| entryInsertText | :: ed | :: String | :: Int | :: IO Int |
| ed | str | pos |
If the position is invalid the text will be inserted at the end of the buffer. The returned value reflects the actual insertion point.
Select a span of text.
| entrySelectRegion | :: ed | :: Int | :: Int | :: IO () |
| ed | start | end |
A negative end position will make the selection extend to the end of the buffer.
Calling this function with start=1 and end=4 it will mark "ask" in the string "Haskell". (FIXME: verify)
Specify if pressing return will activate the default widget.
| entrySetActivatesDefault | :: ec | :: Bool | :: IO () |
| ec | setting |
This setting is useful in Dialog boxes where enter should press the default button.
Make an Entry insensitive.
| entrySetEditable | :: ed | :: Bool | :: IO () |
| ed | isEditable |
Called with False will make the text uneditable.
Specifies whehter the Entry should be in an etched-in frame.
| entrySetHasFrame | :: ec | :: Bool | :: IO () |
| ec | setting |
Set the replacement character for invisible text.
| entrySetInvisibleChar | :: ec | :: Char | :: IO () |
| ec | ch |
Sets a maximum length the text may grow to.
| entrySetMaxLength | :: ec | :: Int | :: IO () |
| ec | max |
A negative number resets the restriction.
Set whether to use password mode (display stars instead of the text).
| entrySetVisibility | :: ec | :: Bool | :: IO () |
| ec | visible |
The replacement character can be changed with entrySetInvisibleChar.
Specifies how large the Entry should be in characters.
| entrySetWidthChars | :: ec | :: Int | :: IO () |
| ec | setting |
This setting is only considered when the widget formulates its size request. Make sure that it is not mapped (shown) before you change this value.
Emitted when the current selection has been copied to the clipboard.
| onCopyClipboard | :: ec | :: IO () | :: IO (ConnectId ec) |
Emitted when the current selection has been cut to the clipboard.
| onCutClipboard | :: ec | :: IO () | :: IO (ConnectId ec) |
Emitted when a piece of text is deleted from the Entry.
| onDeleteText | :: ec | :: (Int -> Int -> IO ()) | :: IO (ConnectId ec) |
Emitted when the user presses return within the Entry field.
| onEntryActivate | :: ec | :: IO () | :: IO (ConnectId ec) |
Emitted when the settings of the Entry widget changes.
| onEntryChanged | :: ec | :: IO () | :: IO (ConnectId ec) |
Emitted when a piece of text is inserted at the cursor position.
| onInsertAtCursor | :: ec | :: (String -> IO ()) | :: IO (ConnectId ec) |