Crate TerimalRtdm

Crate TerimalRtdm 

Source

Macros§

pos

Structs§

App
Global app memory access point, where program data is stored, for various purposes.
Key
Used for ideomatics.
Letter
Mov
Quick reminder: this is not an assembly instruction! This a optinal setting shared by the cursor move pattern of functions. Therefore it’s a trait of this class, with implications of methods to move the curosr.
Pos
For idiomatically storing postion vector
Text
Useage: `Text::new() .foreground(Color::Green) .background(Color::White) .show(“Normal”, pos!(0, 0));
TextColorOption
“fore” corresponds to foreground, and “back” to background accordingly.
VirtualCursorTheme

Enums§

ChangeCh
ChangeColor
ChangeStyle
Color
CurMovType
Dir
Direction enum
KeyType
Refer to this enum for keys working under pressed() method.
LeadOnly
Controls if the text should be shown under another if outside the closure.
Style
Virtualcursor
Controls the virutal cursor, which is made my the framework, while the real is hidden.

Functions§

clear
Clears the screen. All text will be pushed out of view. The letter_grid property whill be reset.
clear_nonlead
Clears non-lead key letters if not AlwaysShown.
collect_presses
will still halt but collect one input for the whole loop, each loop being for one input Set app.enable_f_row_and_arrow = true, if you wish for all function keys.
color_to_ansi_code
Converts the Color enum into appropriate codes for fore and back grounds
debug_code_pressed
Returns the code of a extra key that is pressed. The app loop will take on input for the cycle, and then another being one linearly. So you will need to press the same key twice and then it will return, enabling the process to continue. Use this function to debug for keys not included in the find_key_pressed method.
find_key_pressed_f_row_and_arrow
find_key_pressed_no_special
get_cur_pos
Returns Pos (Position) of the virtual cursor.
halt_press_check
mainly not used, holds program till key press and does not save for other if statements Usage clear(); break; }`
key_pressed
Returns the key which is pressed under this iteration.
line_wrapping
Toggle line wrapping in the terimal.
mov_cur_to
move cursor directly towards a coordinate position.
raw_line
raw_mode
For proper functioning please enable before app loop,
real_cursor_down
real_cursor_left
real_cursor_move
real_cursor_right
real_cursor_up
refresh
render
draws/prints the stored data within letter_grid of app based on all changes.
restore_terminal
Restores the default terminal starting settings, like the cursor being visable and default text alignment. This should be done to reduce user confustion at the last line of your program before it has any exit.
show_cursor
toggle_virtual_cursor
The virtual cursor offers a more interactive and fluid experience across most systems. It is enabled by default.