glirc2

Copyright(c) Eric Mertens, 2016
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Client.EditBox

Description

This module provides support for the text operations important for providing a text input in the IRC client. It tracks user input history, tab completion history, and provides many update operations which are mapped to the keyboard in Client.EventLoop.

Synopsis

Documentation

delete :: EditBox -> EditBox Source #

Delete the character after the cursor.

backspace :: EditBox -> EditBox Source #

Delete the character before the cursor.

home :: EditBox -> EditBox Source #

Jump the cursor to the beginning of the input.

end :: EditBox -> EditBox Source #

Jump the cursor to the end of the input.

killHome :: EditBox -> EditBox Source #

Delete all text from the cursor to the beginning and store it in the yank buffer.

killEnd :: EditBox -> EditBox Source #

Delete all text from the cursor to the end and store it in the yank buffer.

killWord Source #

Arguments

:: Bool

yank

-> EditBox 
-> EditBox 

Kill the content from the cursor back to the previous word boundary. When yank is set the yank buffer will be updated.

paste :: EditBox -> EditBox Source #

Insert the yank buffer at the cursor.

left :: EditBox -> EditBox Source #

Move the cursor left.

right :: EditBox -> EditBox Source #

Move the cursor right.

leftWord :: EditBox -> EditBox Source #

Move the cursor left to the previous word boundary.

rightWord :: EditBox -> EditBox Source #

Move the cursor right to the next word boundary.

insert :: Char -> EditBox -> EditBox Source #

Insert a character at the cursor and advance the cursor.

insertString :: String -> EditBox -> EditBox Source #

Insert a string at the cursor and advance the cursor.

empty :: EditBox Source #

Default 'EditBox value

earlier :: EditBox -> Maybe EditBox Source #

Update the editbox to reflect the earlier element in the history.

later :: EditBox -> Maybe EditBox Source #

Update the editbox to reflect the later element in the history.

success :: EditBox -> EditBox Source #

Indicate that the contents of the text box were successfully used by the program. This clears the contents and cursor and updates the history.