Repository navigation
Functions Console
Home › Function Finder › Console and terminal
The functions to print, read the keyboard, colour text, build full-screen text UIs, grouped by what you want to do. The From column says what a program needs before it can call one:
- built-in: nothing; it is always available.
-
std/tui:#import "std/tui", thenusing tuito call it by its bare name.
Jump to: Print text to the console · Ask the user to type a line or values · Read single keys · Clear, position and colour console text · Write a full-screen TUI app · Handle keys and the mouse in a TUI · Redraw, quit and run timers · Show boxes, text, tabs and progress · Show lists, tables and trees · Build forms and move focus between fields · Show pop-ups, dialogs, menus and status bars · Draw graphs, charts and braille dots · Split the screen into panels · Rectangles, sizes and margins · Style text: attributes and themes · Pick colours · Measure, cut and wrap text by columns · Draw on the frame and write your own widgets · Render frames and test without a terminal · Drive the terminal and parse input yourself
| Function | What it does | From |
|---|---|---|
| Writes values to the console, then a new line unless it ends with a comma or semicolon. | built-in | |
| Print Using | Writes values formatted by a template such as "##.##" or "&". | built-in |
| Write | Writes values separated by commas, with strings in double quotes. | built-in |
| Spc | Skips a number of columns inside a Print, leaving those cells unchanged. | built-in |
| Tab | Moves to a column inside a Print, on the next line if already past it. | built-in |
| Function | What it does | From |
|---|---|---|
| Input | Reads values the user types, up to Enter, after an optional prompt. | built-in |
| Line Input | Reads a whole typed line into a string, commas included, after an optional prompt. | built-in |
| Function | What it does | From |
|---|---|---|
| Inkey | Returns the next key waiting, or an empty string at once if there is none. | built-in |
| GetKey | Waits for a key and returns its code; the key is not shown on screen. | built-in |
| Input (function) | Waits for a number of characters from the keyboard or a file and returns them. | built-in |
| WInput | Reads a number of wide characters from a file or device and returns them. | built-in |
| Function | What it does | From |
|---|---|---|
| Cls | Clears the screen, or only the text or graphics viewport. | built-in |
| Locate | Moves the text cursor to a row and column, and can show or hide it. | built-in |
| CsrLin | Returns the row the cursor is on, counting from 1 at the top. | built-in |
| Pos | Returns the column the cursor is in, counting from 1 at the left. | built-in |
| Color | Sets the colours for text printed from now on, and returns the previous ones. | built-in |
| Width | Sets or returns the number of columns and rows of the console. | built-in |
| View Print | Limits printing and scrolling to a range of rows, or to the whole screen again. | built-in |
| Screen | Returns the character, or its colour, at a row and column of the console. | built-in |
| Function | What it does | From |
|---|---|---|
| TuiApp | Holds your app: you write Init to set up, Update to react and View to draw. | std/tui |
| TuiApp.Init | Sets up your app and returns its first command, such as a tick to start animating. | std/tui |
| TuiApp.Update | Reacts to one event and returns what the loop should do next; it never draws. | std/tui |
| TuiApp.View | Draws the whole screen from your app's state, changing nothing. | std/tui |
| TuiApp.Shutdown | Runs once as the loop ends, while the terminal is still taken. | std/tui |
| TuiRun | Runs your app full-screen and restores the terminal; returns the exit code or an error. | std/tui |
| TuiRunOptions | Holds loop settings: frames per second and whether Ctrl+C quits. | std/tui |
| TuiRunOptionsDefault | Returns the default loop settings: 60 frames per second, quit on Ctrl+C. | std/tui |
| TuiTermOptions | Holds which terminal features to take: alternate screen, raw keys, mouse and more. | std/tui |
| TuiTermOptionsDefault | Returns the usual terminal settings, with the mouse and focus events left off. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiEvent | Holds one event: a key, mouse action, resize, paste, focus change or tick. | std/tui |
| TuiKey | Holds a key press: a character or a named key, plus Shift, Ctrl and Alt. | std/tui |
| TuiKey.IsChar | Returns true if the key is a typed character rather than a named key. | std/tui |
| TuiKey.HasMod | Returns true if the given modifier, Shift, Alt or Ctrl, was held. | std/tui |
| TuiKeyName | Returns a readable name for a key, such as "Ctrl+Shift+F5". | std/tui |
| TuiMouse | Holds a mouse event: press, release, move or wheel, the button, and the cell. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiCmd | Holds a command for the loop: what to do, plus a delay or an exit code. | std/tui |
| TuiNone | Returns a command that does nothing, for events your app ignores. | std/tui |
| TuiRedraw | Returns a command that draws the next frame; only the cells that changed are sent. | std/tui |
| TuiQuit | Returns a command that ends the loop, so TuiRun returns the given exit code. | std/tui |
| TuiTick | Returns a command that sends one tick event after a delay; return another to repeat. | std/tui |
| TuiInvalidate | Returns a command that repaints the whole screen instead of only the changes. | std/tui |
| TuiSuspend | Returns a command that leaves the terminal, suspends the program, then comes back. | std/tui |
| TuiClockMs | Returns a clock in milliseconds that never goes backwards, the one the loop uses. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiBlock | Draws a border with titles and an optional fill; Inner gives the space inside. | std/tui |
| TuiBlock.AddTitle | Adds a title to one side of the border, aligned left, centre or right. | std/tui |
| TuiBlock.Inner | Returns the space inside the border, which is empty for a very small block. | std/tui |
| TuiTitle | Holds one title on a block's border: its text, style and alignment. | std/tui |
| TuiTitleOf | Returns a title value; the side argument comes before the alignment. | std/tui |
| TuiBorderGlyphs | Returns the characters for a border kind, such as plain ASCII for older consoles. | std/tui |
| TuiBorderSet | Holds the six characters a border is drawn from: two lines and four corners. | std/tui |
| TuiParagraph | Draws text, wrapped or not, aligned left, centre or right, and scrollable. | std/tui |
| TuiTabs | Draws a one-row strip of tab titles with the selected one highlighted. | std/tui |
| TuiGauge | Draws a progress bar for a ratio from 0 to 1, labelled with the percentage. | std/tui |
| TuiMeter | Draws a bar filled to a ratio whose colour shades from one end to the other. | std/tui |
| TuiSpinner | Draws a busy indicator that moves on one step each time you call Advance. | std/tui |
| TuiSpinner.Advance | Moves the spinner to its next frame, wrapping at the end. | std/tui |
| TuiSpinnerDefaultFrames | Fills an array with the default braille spinner frames. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiList | Draws a scrolling list the user moves through with the arrow keys. | std/tui |
| TuiListState | Holds a list's selected item and scroll position; -1 means nothing is selected. | std/tui |
| TuiTable | Draws a scrolling table with headers, its columns sized like a layout. | std/tui |
| TuiTableState | Holds a table's selected row and scroll position. | std/tui |
| TuiRow | Holds one table row: its cell texts in column order. | std/tui |
| TuiTree | Draws a tree of nodes that the user expands and collapses with the arrow keys. | std/tui |
| TuiTree.Add | Appends a node at a depth; the deeper nodes after it become its children. | std/tui |
| TuiTree.VisibleCount | Counts the nodes currently shown, leaving out those inside collapsed nodes. | std/tui |
| TuiTreeNode | Holds one tree node: its label, depth, whether it has children, and your own id. | std/tui |
| TuiTreeState | Holds a tree's selected node and scroll position. | std/tui |
| TuiScrollbar | Draws a scrollbar from a total, the number visible and the current position. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiTextInput | Draws a one-line text box with a cursor, selection and optional password masking. | std/tui |
| TuiTextInputState | Holds a text box's text, cursor, selection and scroll position. | std/tui |
| TuiTextInputStateInit | Sets a text box's state to empty with nothing selected; call it before first use. | std/tui |
| TuiTextInput.Insert | Inserts text at the cursor, replacing any selection first. | std/tui |
| TuiTextInput.DeleteSelection | Removes the selected text, or does nothing if none is selected. | std/tui |
| TuiTextInput.SelectionStart | Returns where the selection starts, or the cursor position if nothing is selected. | std/tui |
| TuiTextInput.SelectionEnd | Returns where the selection ends, or the cursor position if nothing is selected. | std/tui |
| TuiTextArea | Draws a multi-line text editor with optional line numbers. | std/tui |
| TuiTextAreaState | Holds a text area's lines, cursor line and column, and scroll position. | std/tui |
| TuiTextAreaStateInit | Sets a text area's state to one empty line; call it before first use. | std/tui |
| TuiCheckbox | Draws a labelled checkbox that Space or Enter toggles, changing your own boolean. | std/tui |
| TuiRadioGroup | Draws a set of options where one is chosen, stored in your own variable. | std/tui |
| TuiSelect | Draws a dropdown list of options that opens over whatever is below it. | std/tui |
| TuiSelect.IsOpen | Returns true if the dropdown's list is showing. | std/tui |
| TuiSelectState | Holds a dropdown's chosen option, whether it is open, and the highlighted entry. | std/tui |
| TuiButton | Draws a button that calls your procedure when the user presses Enter on it. | std/tui |
| TuiButtonOf | Draws a button whose handler is a lambda that captures variables. | std/tui |
| TuiFocusRing | Holds the Tab order of your widgets and tells each one when it has focus. | std/tui |
| TuiFocusRing.Add | Adds a widget to the end of the Tab order; the widget must outlive the frame. | std/tui |
| TuiFocusRing.Next_ | Moves focus to the next widget, wrapping at the end, as Tab does. | std/tui |
| TuiFocusRing.Prev | Moves focus to the previous widget, wrapping at the start, as Shift+Tab does. | std/tui |
| TuiFocusRing.Focus | Focuses a given widget, or returns false if it is not in the ring. | std/tui |
| TuiFocusRing.Current | Returns the focused widget, or no value if the ring is empty. | std/tui |
| TuiFocusRing.Count | Counts the widgets in the Tab order. | std/tui |
| TuiFocusRing.Clear | Empties the Tab order; the widgets themselves are left alone. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiPopup | Draws a floating panel over the screen, optionally modal and dimming what is behind. | std/tui |
| TuiMessageBox | Draws a dialog with a title, a message and buttons, coloured by its kind. | std/tui |
| TuiMessageBox.Accepted | Returns true once Enter was pressed on a button; selected says which. | std/tui |
| TuiMessageBox.Cancelled | Returns true once the dialog was dismissed with Esc. | std/tui |
| TuiMenuBar | Draws a one-row menu bar whose menus drop down with Enter. | std/tui |
| TuiMenuBar.IsOpen | Returns true if one of the menus is dropped down. | std/tui |
| TuiMenu | Holds one menu of a menu bar: its label and its items. | std/tui |
| TuiStatusBar | Draws one row of status items, some packed to the left and some to the right. | std/tui |
| TuiStatusBar.Add | Adds an item at the left or right; include any padding spaces in the text. | std/tui |
| TuiStatusItem | Holds one status bar item: its text, style and alignment. | std/tui |
| TuiStatusItemOf | Returns a status bar item from text, a style and an alignment. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiGraph | Draws a line graph of one or more series, scaled to fit or to a fixed range. | std/tui |
| TuiSeries | Holds one line of a graph: its values, newest last, plus a colour and name. | std/tui |
| TuiSparkline | Draws a one-row trend of values as block characters, one value per cell. | std/tui |
| TuiBarChart | Draws labelled bars, vertical or horizontal, scaled to the largest value. | std/tui |
| TuiBar | Holds one bar of a bar chart: its label, value and colour. | std/tui |
| TuiCanvas | Holds a braille drawing surface with a grid of 2 by 4 dots in every cell. | std/tui |
| TuiCanvas.Dot | Sets one dot in a colour; a dot outside the canvas is ignored. | std/tui |
| TuiCanvas.Line_ | Draws a straight line of dots between two points. | std/tui |
| TuiCanvas.Clear | Turns every dot off. | std/tui |
| TuiCanvas.Blit | Draws the canvas into an area of the frame as braille characters. | std/tui |
| TuiCanvas.Resize | Changes the canvas size in cells and clears it. | std/tui |
| TuiCanvas.CellCols | Returns the canvas width in cells. | std/tui |
| TuiCanvas.CellRows | Returns the canvas height in cells. | std/tui |
| TuiCanvas.DotWidth | Returns the canvas width in dots, two per cell. | std/tui |
| TuiCanvas.DotHeight | Returns the canvas height in dots, four per cell. | std/tui |
| TuiCanvas.Pattern | Returns the braille dot pattern of one cell as a byte. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiSplitV | Splits a rectangle into rows stacked top to bottom, sized by constraints. | std/tui |
| TuiSplitH | Splits a rectangle into columns side by side, sized by constraints. | std/tui |
| TuiLength | Returns a constraint for exactly n cells. | std/tui |
| TuiFill | Returns a constraint that shares the space left over, by weight. | std/tui |
| TuiPercent | Returns a constraint for a percentage of the whole space being split. | std/tui |
| TuiRatio | Returns a constraint for a fraction of the whole space, such as one third. | std/tui |
| TuiAtLeast | Returns a constraint for at least n cells, more if there is room. | std/tui |
| TuiAtMost | Returns a constraint for at most n cells. | std/tui |
| TuiConstraint | Holds one sizing rule for a split, such as a fixed length or a share of the rest. | std/tui |
| TuiSolve | Returns the sizes that constraints give a total, adding up to exactly that total. | std/tui |
| TuiCenter | Returns a rectangle of a given size centred in another, as for a dialog. | std/tui |
| TuiAlignIn | Returns a rectangle of a given width at the left, centre or right of another. | std/tui |
| TuiPad | Returns a rectangle shrunk by a margin. | std/tui |
| TuiPadAll | Returns a rectangle shrunk by the same amount on every side. | std/tui |
| TuiStack | Holds child widgets laid out in a row or column; it deletes them when it goes. | std/tui |
| TuiStack.Add | Adds a child widget made with New and the constraint that sizes it. | std/tui |
| TuiStack.ChildRect | Returns the rectangle a child got at the last Render, for mouse hit tests. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiRect | Holds a rectangle of cells: x, y, width and height, counted from 0. | std/tui |
| TuiRectOf | Returns a rectangle from x, y, width and height. | std/tui |
| TuiRect.Contains | Returns true if a cell is inside the rectangle; use it to hit-test the mouse. | std/tui |
| TuiRect.Intersect | Returns the overlap of two rectangles, or an empty one if they do not touch. | std/tui |
| TuiRect.Inner | Returns the rectangle shrunk by a margin, empty rather than negative. | std/tui |
| TuiRect.IsEmpty | Returns true if the rectangle has no width or no height. | std/tui |
| TuiRect.Equals | Returns true if two rectangles have the same position and size. | std/tui |
| TuiRect.Right | Returns x plus the width: the first column past the right edge. | std/tui |
| TuiRect.Bottom | Returns y plus the height: the first row below the bottom edge. | std/tui |
| TuiPos | Holds a cell position: x and y. | std/tui |
| TuiSize | Holds a size in columns and rows. | std/tui |
| TuiSizeOf | Returns a size from columns and rows. | std/tui |
| TuiMargin | Holds an inset for each side, in the order left, top, right, bottom. | std/tui |
| TuiMarginOf | Returns a margin from left, top, right and bottom. | std/tui |
| TuiMarginAll | Returns a margin of the same size on every side. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiStyle | Holds a text style: colours, attributes such as bold, and which of them it sets. | std/tui |
| TuiStyleOf | Returns a style with a foreground, a background and optional attributes. | std/tui |
| TuiStylePatch | Returns a partial style that sets only the parts you name, such as just bold. | std/tui |
| TuiStyleDefault | Returns the terminal's default style: default colours and no attributes. | std/tui |
| TuiStyle.Patch | Returns this style with another laid over it, keeping whatever the other leaves unset. | std/tui |
| TuiStyle.HasAttr | Returns true if the style has an attribute such as bold or underline. | std/tui |
| TuiStyle.Equals | Returns true if two styles are identical, including which parts they set. | std/tui |
| TuiTheme | Holds twelve named styles, such as normal, accent, selected and danger. | std/tui |
| TuiThemeDefault | Returns the stock colour theme. | std/tui |
| TuiThemeMono | Returns a theme made from bold, dim, reverse and underline, with no colours. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiColor | Holds a colour: the terminal's default, one of 16 or 256, or 24-bit RGB. | std/tui |
| TuiRgb | Returns a 24-bit colour, reduced for you on terminals with fewer colours. | std/tui |
| TuiAnsi | Returns one of the 16 classic colours, which follow the user's terminal theme. | std/tui |
| TuiIndexed | Returns a colour from the 256-colour palette by its number. | std/tui |
| TuiDefaultColor | Returns the terminal's own default colour; as a background it does not paint. | std/tui |
| TuiBlack | Returns the classic black, palette colour 0. | std/tui |
| TuiRed | Returns the classic red, palette colour 1. | std/tui |
| TuiGreen | Returns the classic green, palette colour 2. | std/tui |
| TuiYellow | Returns the classic yellow, palette colour 3. | std/tui |
| TuiBlue | Returns the classic blue, palette colour 4. | std/tui |
| TuiMagenta | Returns the classic magenta, palette colour 5. | std/tui |
| TuiCyan | Returns the classic cyan, palette colour 6. | std/tui |
| TuiWhite | Returns the classic white, palette colour 7. | std/tui |
| TuiBrightBlack | Returns the classic bright black, palette colour 8. | std/tui |
| TuiBrightRed | Returns the classic bright red, palette colour 9. | std/tui |
| TuiBrightGreen | Returns the classic bright green, palette colour 10. | std/tui |
| TuiBrightYellow | Returns the classic bright yellow, palette colour 11. | std/tui |
| TuiBrightBlue | Returns the classic bright blue, palette colour 12. | std/tui |
| TuiBrightMagenta | Returns the classic bright magenta, palette colour 13. | std/tui |
| TuiBrightCyan | Returns the classic bright cyan, palette colour 14. | std/tui |
| TuiBrightWhite | Returns the classic bright white, palette colour 15. | std/tui |
| TuiColor.Equals | Returns true if two colours were built the same way with the same values. | std/tui |
| TuiColor.Index | Returns the palette number of a 16-colour or 256-colour value. | std/tui |
| TuiColor.IsDefault | Returns true if the colour is the terminal's own default. | std/tui |
| TuiLerpColor | Returns a colour part of the way between two others, for t from 0 to 1. | std/tui |
| TuiDowngrade | Returns the colour that a terminal with fewer colours would show instead. | std/tui |
| TuiDowngradeStyle | Returns a style with both its colours reduced to what a terminal can show. | std/tui |
| TuiRgbTo256 | Returns the nearest 256-palette colour number for red, green and blue values. | std/tui |
| TuiRgbTo16 | Returns the nearest of the 16 classic colours for red, green and blue values. | std/tui |
| TuiLuminance | Returns how bright a colour looks, from 0.0 to 1.0. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiStringWidth | Counts the columns a string takes on screen, wide characters as two. | std/tui |
| TuiCharWidth | Returns the columns one character takes: 0, 1 or 2. | std/tui |
| TuiTruncate | Cuts a string to fit a number of columns, ending in "..." unless you pass "". | std/tui |
| TuiWrap | Breaks text into lines that fit a number of columns, keeping its line breaks. | std/tui |
| TuiSetAmbiguousWide | Sets whether characters of ambiguous width count as two columns, for CJK terminals. | std/tui |
| TuiAmbiguousWide | Returns true if characters of ambiguous width count as two columns. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiFrame | Holds the surface View draws on; drawing never fails and is clipped to fit. | std/tui |
| TuiFrame.Area | Returns the whole screen as a rectangle at 0, 0, the start of every layout. | std/tui |
| TuiFrame.DrawText | Draws a string at a cell and returns the number of columns it used. | std/tui |
| TuiFrame.SetCell | Writes one character cell, replacing the style that was there. | std/tui |
| TuiFrame.FillRect | Fills a rectangle with one character in one style. | std/tui |
| TuiFrame.BlendStyle | Lays a style over every cell of a rectangle, keeping the characters. | std/tui |
| TuiFrame.Clip | Returns the rectangle that drawing is currently limited to. | std/tui |
| TuiFrame.PushClip | Limits drawing to a rectangle and returns the previous limit, to restore later. | std/tui |
| TuiFrame.PopClip | Restores the drawing limit that PushClip returned. | std/tui |
| TuiFrame.PushLayer | Starts an overlay layer, as a popup or an open dropdown uses. | std/tui |
| TuiFrame.PopLayer | Ends the overlay layer that PushLayer started. | std/tui |
| TuiFrame.SetCursor | Shows the text cursor at a cell for this frame. | std/tui |
| TuiFrame.HideCursor | Hides the text cursor for this frame, which is the default. | std/tui |
| TuiFrame.CursorVisible | Returns true if this frame asked to show the cursor. | std/tui |
| TuiFrame.CursorPos | Returns the cell where the cursor was last put. | std/tui |
| TuiWidget | Holds the base type every widget extends; you write Render and Kind for your own. | std/tui |
| TuiWidget.Render | Draws the widget into an area of the frame, changing no app state. | std/tui |
| TuiWidget.HandleEvent | Offers an event to the widget and returns true if the widget used it. | std/tui |
| TuiWidget.Kind | Returns the widget's short type name, such as "Block". | std/tui |
| TuiWidget.CanFocus | Returns true if the widget can take focus; false unless it is interactive. | std/tui |
| TuiWidget.SetFocused | Tells the widget whether it has focus; the focus ring calls it for you. | std/tui |
| TuiWidget.SizeHint | Returns the size the widget would like in the space given; layouts may ignore it. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiRenderOnce | Runs Init and View once with no terminal and returns the bytes it would write. | std/tui |
| TuiScreen | Holds two cell buffers and works out the bytes that turn one frame into the next. | std/tui |
| TuiScreen.BeginFrame | Clears the back buffer and returns the frame to draw into. | std/tui |
| TuiScreen.Render | Returns the bytes that change the last frame into the new one, then swaps buffers. | std/tui |
| TuiScreen.Resize | Changes the screen size in cells and forces a full repaint. | std/tui |
| TuiScreen.Invalidate | Makes the next Render clear and repaint the whole screen. | std/tui |
| TuiScreen.Cols | Returns the screen width in cells. | std/tui |
| TuiScreen.Rows | Returns the screen height in cells. | std/tui |
| TuiScreen.Back | Returns the buffer being drawn into, so a test can read its cells. | std/tui |
| TuiScreen.Front | Returns the buffer the terminal is taken to show: the last frame sent. | std/tui |
| TuiBuffer | Holds a grid of character cells, stored row by row. | std/tui |
| TuiBuffer.At | Returns a pointer to the cell at x, y, without checking the bounds. | std/tui |
| TuiBuffer.InBounds | Returns true if x, y is inside the buffer. | std/tui |
| TuiBuffer.Clear | Fills every cell with a space in the given style. | std/tui |
| TuiBuffer.Resize | Changes the grid size and blanks every cell. | std/tui |
| TuiBuffer.Count | Returns the number of cells: columns times rows. | std/tui |
| TuiCell | Holds one character cell: the character, its style and its width in columns. | std/tui |
| TuiCell.SetChar | Sets the cell's character and works out its width in columns. | std/tui |
| TuiCell.Equals | Returns true if two cells have the same character, style and width. | std/tui |
| TuiCellBlank | Returns a cell holding a space in the given style. | std/tui |
| Function | What it does | From |
|---|---|---|
| TuiTerminal | Holds the terminal itself, for writing your own loop: modes, size and output. | std/tui |
| TuiTerminal.Enter | Takes over the terminal with the options asked for; fails if output is not a terminal. | std/tui |
| TuiTerminal.Leave | Puts the terminal back the way Enter found it; safe to call more than once. | std/tui |
| TuiTerminal.IsActive | Returns true between a successful Enter and its Leave. | std/tui |
| TuiTerminal.Size | Returns the terminal's size in columns and rows, or an error if it reports none. | std/tui |
| TuiTerminal.TakeResize | Returns true once after each resize of the terminal, then false. | std/tui |
| TuiTerminal.Write | Adds bytes to the output buffer; nothing is sent until Flush. | std/tui |
| TuiTerminal.WriteText | Adds a string to the output buffer as UTF-8. | std/tui |
| TuiTerminal.Flush | Sends the buffered output in one write and empties the buffer. | std/tui |
| TuiTerminal.Discard | Throws the buffered output away without sending it. | std/tui |
| TuiTerminal.Pending | Counts the bytes buffered and not yet sent. | std/tui |
| TuiTerminal.Caps | Returns what the terminal can do, as detected once when it was entered. | std/tui |
| TuiTerminal.DetectCaps | Detects what the terminal can do again, without entering it. | std/tui |
| TuiCaps | Holds what a terminal can do: colour depth, mouse, paste, focus events, Unicode. | std/tui |
| TuiError | Holds a terminal error: a code and what was being attempted. | std/tui |
| TuiError.Message | Returns a readable line saying what failed, including any system error number. | std/tui |
| TuiInput | Holds the parser that turns raw terminal bytes into events. | std/tui |
| TuiInput.Feed | Adds raw bytes from the terminal; an unfinished sequence is kept for later. | std/tui |
| TuiInput.NextEvent | Returns the next complete event, or no value yet; a lone Esc waits for a timeout. | std/tui |
| TuiInput.PushEvent | Adds an event to the back of the queue, to inject input yourself. | std/tui |
| TuiInput.Queued | Counts the parsed events waiting to be taken. | std/tui |
| TuiInput.Buffered | Counts the bytes held that do not yet make a whole event. | std/tui |
| TuiInput.Reset | Throws away the held bytes and the queued events. | std/tui |
| TuiInput.WaitingOnLoneEsc | Returns true if the parser holds an Esc it cannot yet tell from a key sequence. | std/tui |
| TuiEnterSeq | Returns the escape sequence that Enter writes for a set of options. | std/tui |
| TuiLeaveSeq | Returns the escape sequence that Leave writes to undo those options. | std/tui |
| TuiClearScreenSeq | Returns the escape sequence that clears the terminal screen. | std/tui |
| TuiCursorTo | Returns the escape sequence that moves the cursor to a cell counted from 0. | std/tui |
| TuiShowCursorSeq | Returns the escape sequence that shows or hides the cursor. | std/tui |
| TuiSgr | Returns the escape sequence that changes the terminal from one style to another. | std/tui |
| TuiSgrReset | Returns the escape sequence that resets every colour and attribute. | std/tui |
| TuiWin32InputMode | Returns the Windows console input mode that Enter would set for given options. | std/tui |
- Console functions overview
- Keyboard input overview
- Terminal TUI Library guide
- hello.tiko: the smallest TUI program
- dashboard.tiko: a full TUI dashboard
tiko-lang · Home · Feature Index · Keyword Index · License
FreeBASIC manual pages reproduced under the GNU FDL 1.3.
- Generics
- Interfaces
- For Each
- Iterators
- Tuples
- Array Results
- Defer
- Lambdas
- Block Strings
- String Slices
- Embed
- Typed Variadics
- C Header Import
- Foreign Library Linking
- UString
- Fixed-Width Types
- Nullptr
- String Library
- Format
- Array
- Map
- Set
- LinkedList
- OrderedMap
- OrderedSet
- Sorting
- Optional
- Result
- Smart Pointers
- Date and Time (Chrono)
- Filesystem
- File Streams
- Config (INI and TOML)
- Codec
- Hash
- UUID
- OS
- Process
- Net
- HTTP and TLS
- Math Library
- Finance
- Logging
- Terminal TUI Library
- PsControls
- tkControls
- sys/win
- Goroutines and Channels
- LLVM Backend
- tiko build
- TIKO_COMPILER
- Variable Declarations
- Standard Data Types
- User Defined Types
- Procedures
- Operators
- Control Flow Statements
- Converting Data Types
- Array Functions
- String Functions
- Mathematical Functions
- Bit Manipulation
- Date and Time Functions
- File I/O Functions
- Console Functions
- User Input (Runtime Library)
- User Input Functions (Graphics Library)
- Screen Functions
- 2D Drawing Functions
- Graphics Library Reference
- Graphics Keyword List
- Memory Functions
- Threading Support Functions
- Error Handling Functions
- Operating System Functions
- Preprocessor
- Intrinsic Defines
- Miscellaneous Keywords
- Modularizing