pub struct TextEntryComponent {
pub label: String,
pub content: String,
pub open: f64,
pub label_reveal: f64,
pub content_reveal: f64,
pub visible: bool,
/* private fields */
}Fields§
§label: String§content: String§open: f64§label_reveal: f64§content_reveal: f64§visible: boolImplementations§
Source§impl TextEntryComponent
impl TextEntryComponent
Sourcepub fn prompt(
label: impl Into<String>,
default_value: impl Into<String>,
) -> Self
pub fn prompt( label: impl Into<String>, default_value: impl Into<String>, ) -> Self
Text entry chrome for an env-var style prompt (label = variable name, content = default).
Invisible shell when the step is dialog-only or selector-only (no editable field).
pub fn input_buf(&self) -> &InputBuffer
pub fn input_buf_mut(&mut self) -> &mut InputBuffer
pub fn reset_input_buf(&mut self)
Sourcepub fn compute_layout(&mut self, terminal_size: Size)
pub fn compute_layout(&mut self, terminal_size: Size)
Compute and cache the text-entry layout for the given terminal size.
pub fn layout(&self) -> Option<&TextEntryLayout>
Sourcepub fn cursor_column(&self, terminal_width: u16) -> Option<u16>
pub fn cursor_column(&self, terminal_width: u16) -> Option<u16>
Compute cursor column for the active input buffer, or None if the
box isn’t fully open yet.
Sourcepub fn tick_decode(
&mut self,
question_reveal: f64,
box_open_speed: f64,
reveal_speed: f64,
)
pub fn tick_decode( &mut self, question_reveal: f64, box_open_speed: f64, reveal_speed: f64, )
Wizard decode phase: grows the chrome and reveals labels after the question is half-shown.
Sourcepub fn tick_transition_encode(
&mut self,
next_has_prompt_box: bool,
encode_speed: f64,
morph_speed: f64,
)
pub fn tick_transition_encode( &mut self, next_has_prompt_box: bool, encode_speed: f64, morph_speed: f64, )
Transition encode: scrub label/content; optionally shrink the border when leaving prompt steps.
Sourcepub fn tick_transition_decode(&mut self, encode_speed: f64, morph_speed: f64)
pub fn tick_transition_decode(&mut self, encode_speed: f64, morph_speed: f64)
Transition decode after swap_to: open chrome then fade labels/content in.
Sourcepub fn is_fully_ready(&self) -> bool
pub fn is_fully_ready(&self) -> bool
True when the chrome is fully open and all text is fully revealed.
Sourcepub fn tick_exit_close(&mut self, encode_speed: f64, box_close_speed: f64)
pub fn tick_exit_close(&mut self, encode_speed: f64, box_close_speed: f64)
Exit phase: encode away text then close chrome.
Trait Implementations§
Source§impl Clone for TextEntryComponent
impl Clone for TextEntryComponent
Source§fn clone(&self) -> TextEntryComponent
fn clone(&self) -> TextEntryComponent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Component for TextEntryComponent
Available on non-tarpaulin_include only.
impl Component for TextEntryComponent
Available on non-
tarpaulin_include only.Auto Trait Implementations§
impl Freeze for TextEntryComponent
impl RefUnwindSafe for TextEntryComponent
impl Send for TextEntryComponent
impl Sync for TextEntryComponent
impl Unpin for TextEntryComponent
impl UnsafeUnpin for TextEntryComponent
impl UnwindSafe for TextEntryComponent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more