This module provides a one-line editing interface.
- data Edit
- editWidget :: IO (Widget Edit)
- getEditText :: Widget Edit -> IO String
- setEditText :: Widget Edit -> String -> IO ()
- setEditCursorPosition :: Widget Edit -> Int -> IO ()
- getEditCursorPosition :: Widget Edit -> IO Int
- setEditMaxLength :: Widget Edit -> Int -> IO ()
- onActivate :: Widget Edit -> (Widget Edit -> IO ()) -> IO ()
- onChange :: Widget Edit -> (String -> IO ()) -> IO ()
- onCursorMove :: Widget Edit -> (Int -> IO ()) -> IO ()
Documentation
editWidget :: IO (Widget Edit)Source
Create a new editing widget.
setEditCursorPosition :: Widget Edit -> Int -> IO ()Source
Set the current edit widget cursor position. Invalid cursor positions will be ignored.
setEditMaxLength :: Widget Edit -> Int -> IO ()Source
Set the maximum length of the edit widget's content.
onActivate :: Widget Edit -> (Widget Edit -> IO ()) -> IO ()Source
Register handlers to be invoked when the edit widget has been ''activated'' (when the user presses Enter while the widget is focused).