pub trait InputSettingKind: SettingKind {
// Required methods
fn submit_view_id(&self) -> ViewId;
fn open_entry_id(&self) -> EntryId;
fn input_label(&self) -> String;
fn input_max_chars(&self) -> usize;
fn current_text(&self, settings: &Settings) -> String;
fn apply_text(&self, text: &str, settings: &mut Settings) -> String;
}Expand description
Extended trait for settings that accept free-form text input via a NamedInput overlay.
Required Methods§
Sourcefn submit_view_id(&self) -> ViewId
fn submit_view_id(&self) -> ViewId
The ViewId used by this setting’s NamedInput and its submit event.
Sourcefn open_entry_id(&self) -> EntryId
fn open_entry_id(&self) -> EntryId
The EntryId event that opens this setting’s input dialog when tapped.
Sourcefn input_label(&self) -> String
fn input_label(&self) -> String
Label shown inside the NamedInput dialog.
Sourcefn input_max_chars(&self) -> usize
fn input_max_chars(&self) -> usize
Maximum number of characters the input accepts.
Sourcefn current_text(&self, settings: &Settings) -> String
fn current_text(&self, settings: &Settings) -> String
The current value as a string to pre-populate the input field.
Sourcefn apply_text(&self, text: &str, settings: &mut Settings) -> String
fn apply_text(&self, text: &str, settings: &mut Settings) -> String
Parse text from the input, mutate settings, and return the display string.