[−][src]Crate term_basics_linux
Structs
InputHistory | A struct that holds information about a history of typed input's but the user. |
Enums
FGBG | To specify if you set the foreground or background colour. |
TextStyle | All styles that do not alter fg or bg colours. |
UserColour | Colours available. The user has defined the exact values of these colours for there TTY or emulator. |
Functions
flush | Flushes stdout. When you do print! or term-basics-linux equivalent, it will not print immediately. For example if you print! and then input_field(), it will print after you typed in the input. flush() will make sure everything is printed first. |
getch | Returns the character as u8 typed by the user. It will return immediately after being typed, without the user pressing 'enter'. |
input_field | Lets the user type text. It returns the string after the user presses 'enter'. It supports moving the cursor with the arrow keys, going to the begin and end of the line using 'home' and 'end' and deleting characters with backspace and the delete key. |
input_field_hidden | Lets the user type text. It returns the string after the user presses 'enter'.
It supports all functions |
input_field_scrollable | Lets the user type text. It returns the string after the user presses 'enter'.
It supports all functions |
Print to stdout, it is just print!("{}", msg); Here to stay consistent | |
print_col | Print to stdout with a text colour. |
print_cols | Print to stdout with text and background colours. |
print_cols_style | Print to stdout with text and background colours and style. |
print_style | Print to stdout with text style. |
println | Print to stdout, it is just println!("{}", msg); Here to stay consistent |
println_col | Print to stdout with a text colour. |
println_cols | Print to stdout with text and background colours. |
println_cols_style | Print to stdout with text and background colours and style. |
println_style | Print to stdout with text style. |
prompt | Prints a message to the user. The user can type its input next to the message on the same line. It will return the user input after the user pressed enter. It uses term_basics_linux::input_field and supports the same operations. |
prompt_hidden | Prints a message to the user. The user can type its input next to the message on the same line. It will return the user input after the user pressed enter. It uses term_basics_linux::input_field_scrollable and supports the same operations. |
prompt_scrollable | Prints a message to the user. The user can type its input next to the message on the same line. It will return the user input after the user pressed enter. It uses term_basics_linux::input_field_scrollable and supports the same operations. |
reset_all | Resets foreground colour, background colour and text style. |
reset_colours | Resets all the colours. It set the foreground and background colours to the standard colours, whatever they may be. This depends on your terminal emulator and or settings like bashrc or zshrc. |
reset_style | Resets the style. It sets the style to the default style. |
restore_colour | Restores the colour from the state.
|
restore_colours | Restores all colours from state.
It is used after a call like |
restore_style | Restores the style from the state.
The state is set after calls like |
set_colour | Sets the colour of the text printed after this call.
It will print linux colour escape characters to std out.
It will set the state, so you can use |
set_colours | Sets both foreground and background colours. It will print linux colour escape characters to std out. It will set the state. |
set_style | Sets the style of the text printed after this call. It will print linux colour escape characters to std out. It will also set the state. |
string_to_bool | |
string_to_value | Small helper to parse string to a value |
test_chars | Prints the result of getch as u8, infinite loop. Can be used for testing. |
use_colour | Sets the colour of the text printed after this call.
It will print linux colour escape characters to std out.
It will not set the state, so you can not use |
use_colours | Sets both foreground and background colours. It will print linux colour escape characters to std out. It will not set the state. |
use_style | Sets the style of the text printed after this call. It will print linux colour escape characters to std out. It will not set the state so you can not restore it. |