pub struct TextEntryComponent {
pub label: String,
pub content: String,
pub open: f64,
pub label_reveal: f64,
pub content_reveal: f64,
pub visible: bool,
}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).
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 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.
pub fn render_with_cursor<W: Write, R: Rng>( &self, writer: &mut W, layout: &TextEntryLayout, tw: u16, buf: &InputBuffer, rng: &mut R, ) -> Result<u16>
pub fn render_partial_open<W: Write>( &self, writer: &mut W, layout: &TextEntryLayout, tw: u16, ) -> Result<()>
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 moreAuto 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