pub struct HintState {
hint: Option<Hint>,
alphabet: String,
matches: Vec<Match>,
labels: Vec<Vec<char>>,
keys: Vec<char>,
}
Expand description
Keyboard regex hint state.
Fields§
§hint: Option<Hint>
Hint currently in use.
alphabet: String
Alphabet for hint labels.
matches: Vec<Match>
Visible matches.
labels: Vec<Vec<char>>
Key label for each visible match.
keys: Vec<char>
Keys pressed for hint selection.
Implementations§
source§impl HintState
impl HintState
sourcepub fn update_matches<T>(&mut self, term: &Term<T>)
pub fn update_matches<T>(&mut self, term: &Term<T>)
Update the visible hint matches and key labels.
sourcepub fn keyboard_input<T>(&mut self, term: &Term<T>, c: char) -> Option<HintMatch>
pub fn keyboard_input<T>(&mut self, term: &Term<T>, c: char) -> Option<HintMatch>
Handle keyboard input during hint selection.
sourcepub fn update_alphabet(&mut self, alphabet: &str)
pub fn update_alphabet(&mut self, alphabet: &str)
Update the alphabet used for hint labels.