module TextUi

Overview

Wrapper module around termbox to make terminal UIs testable.

Defined in:

textui.cr
textui/box.cr
textui/color.cr
textui/constants.cr
textui/dialog.cr
textui/event.cr
textui/format.cr
textui/label.cr
textui/list.cr
textui/stacked_widget.cr
textui/status_bar.cr
textui/syntaxhighlighter.cr
textui/table.cr
textui/terminal.cr
textui/text_cursor.cr
textui/text_document.cr
textui/text_editor.cr
textui/text_editor_commands.cr
textui/text_input.cr
textui/ui.cr
textui/undo_command.cr
textui/undo_stack.cr
textui/widget.cr

Constant Summary

EOF = -1
HIDE_CURSOR = -1

Misc

KEY_ARROW_DOWN = (65535_u16 - 19)
KEY_ARROW_LEFT = (65535_u16 - 20)
KEY_ARROW_RIGHT = (65535_u16 - 21)
KEY_ARROW_UP = (65535_u16 - 18)
KEY_BACKSPACE = 8_u16
KEY_BACKSPACE2 = 127_u16
KEY_CTRL_2 = 0_u16
KEY_CTRL_3 = 27_u16
KEY_CTRL_4 = 28_u16
KEY_CTRL_5 = 29_u16
KEY_CTRL_6 = 30_u16
KEY_CTRL_7 = 31_u16
KEY_CTRL_A = 1_u16
KEY_CTRL_B = 2_u16
KEY_CTRL_BACKSLASH = 28_u16
KEY_CTRL_C = 3_u16
KEY_CTRL_D = 4_u16
KEY_CTRL_E = 5_u16
KEY_CTRL_F = 6_u16
KEY_CTRL_G = 7_u16
KEY_CTRL_H = 8_u16
KEY_CTRL_I = 9_u16
KEY_CTRL_J = 10_u16
KEY_CTRL_K = 11_u16
KEY_CTRL_L = 12_u16
KEY_CTRL_LSQ_BRACKET = 27_u16
KEY_CTRL_M = 13_u16
KEY_CTRL_N = 14_u16
KEY_CTRL_O = 15_u16
KEY_CTRL_P = 16_u16
KEY_CTRL_Q = 17_u16
KEY_CTRL_R = 18_u16
KEY_CTRL_RSQ_BRACKET = 29_u16
KEY_CTRL_S = 19_u16
KEY_CTRL_SLASH = 31_u16
KEY_CTRL_T = 20_u16
KEY_CTRL_TILDE = 0_u16

Control keys

KEY_CTRL_U = 21_u16
KEY_CTRL_UNDERSCORE = 31_u16
KEY_CTRL_V = 22_u16
KEY_CTRL_W = 23_u16
KEY_CTRL_X = 24_u16
KEY_CTRL_Y = 25_u16
KEY_CTRL_Z = 26_u16
KEY_DELETE = (65535_u16 - 13)
KEY_END = (65535_u16 - 15)
KEY_ENTER = 13_u16
KEY_ESC = 27_u16
KEY_F1 = (65535_u16 - 0)

Special Keys

KEY_F10 = (65535_u16 - 9)
KEY_F11 = (65535_u16 - 10)
KEY_F12 = (65535_u16 - 11)
KEY_F2 = (65535_u16 - 1)
KEY_F3 = (65535_u16 - 2)
KEY_F4 = (65535_u16 - 3)
KEY_F5 = (65535_u16 - 4)
KEY_F6 = (65535_u16 - 5)
KEY_F7 = (65535_u16 - 6)
KEY_F8 = (65535_u16 - 7)
KEY_F9 = (65535_u16 - 8)
KEY_HOME = (65535_u16 - 14)
KEY_INSERT = (65535_u16 - 12)
KEY_MOUSE_LEFT = (65535_u16 - 22)
KEY_MOUSE_MIDDLE = (65535_u16 - 24)
KEY_MOUSE_RELEASE = (65535_u16 - 25)
KEY_MOUSE_RIGHT = (65535_u16 - 23)
KEY_MOUSE_WHEEL_DOWN = (65535_u16 - 27)
KEY_MOUSE_WHEEL_UP = (65535_u16 - 26)
KEY_PGDN = (65535_u16 - 17)
KEY_PGUP = (65535_u16 - 16)
KEY_SPACE = 32_u16
KEY_TAB = 9_u16
MOD_ALT = 1

Modifiers

VERSION = "0.3.3"