Struct promkit::text_editor::Renderer
source · pub struct Renderer {
pub texteditor: TextEditor,
pub history: Option<History>,
pub prefix: String,
pub mask: Option<char>,
pub prefix_style: ContentStyle,
pub active_char_style: ContentStyle,
pub inactive_char_style: ContentStyle,
pub edit_mode: Mode,
pub word_break_chars: HashSet<char>,
pub lines: Option<usize>,
}
Expand description
Represents a renderer for the TextEditor
component,
capable of visualizing text input in a pane.
It supports a variety of features including history navigation,
input suggestions, input masking,
customizable prompt strings,
and styles for different parts of the input. It also handles different
edit modes such as insert and overwrite,
and can be configured to render a specific number of lines.
Fields§
§texteditor: TextEditor
The TextEditor
component to be rendered.
history: Option<History>
Optional history for navigating through previous inputs.
prefix: String
Prompt string displayed before the input text.
mask: Option<char>
Optional character used for masking the input string (e.g., for password fields).
prefix_style: ContentStyle
Style applied to the prompt string.
active_char_style: ContentStyle
Style applied to the currently selected character.
inactive_char_style: ContentStyle
Style applied to characters that are not currently selected.
edit_mode: Mode
Current edit mode, determining whether input inserts or overwrites existing text.
word_break_chars: HashSet<char>
Characters to be for word break.
lines: Option<usize>
Number of lines available for rendering.