HomeManualTopicsTypesSymbols
std::create_terminal
must be called before any other terminal function
Parameters
- width
- the number of columns
- height
- the number of rows
- options*
- optional terminal attributes
Results
None
Description
Creates a default screen and allows the use of all drawing functions.
Available options are:
std::TEXT_COLOUR (default: std::BLACK)
std::BACKGROUND_COLOUR (default: std::WHITE)
std::LINE_HEIGHT (default: 1)
std::VISIBLE_CURSOR (default: std::true)
Example
<require basic/stdlib>
<require terminal/terminal>
get_terminal_size! STDIN_FILENO $width $height
create_terminal $terminal width height
TEXT_COLOUR = WHITE
BACKGROUND_COLOUR = BLUE
draw_text &terminal
10 # column
5 # row
"
This is a multi-line
text.
update_terminal &terminal $output # create output character stream
print! output # print the generated character stream
Topic
Terminal
See also