[−][src]Struct unsegen::widget::builtin::promptline::PromptLine
A widget implementing "readline"-like functionality.
Basically a more sophisticated version of LineEdit
with history.
Fields
line: LineEdit
Methods
impl PromptLine
[src]
pub fn with_prompt(prompt: String) -> Self
[src]
Construct a PromptLine with the given symbol that will be displayed left of the LineEdit
for user interaction.
pub fn set_prompt(&mut self, prompt: String)
[src]
Change the symbol left of the user editable section.
pub fn previous_line(&self, n: usize) -> Option<&str>
[src]
Get the n
'th line from the history.
pub fn active_line(&self) -> &str
[src]
Get the current content of the LineEdit
pub fn finish_line(&mut self) -> &str
[src]
Mark the current content as "accepted", e.g., if the user has entered and submitted a command.
This adds the current line to the front of the history buffer.
Trait Implementations
impl Scrollable for PromptLine
[src]
fn scroll_forwards(&mut self) -> OperationResult
[src]
fn scroll_backwards(&mut self) -> OperationResult
[src]
fn scroll_to_beginning(&mut self) -> OperationResult
[src]
fn scroll_to_end(&mut self) -> OperationResult
[src]
impl Writable for PromptLine
[src]
fn write(&mut self, c: char) -> OperationResult
[src]
impl Navigatable for PromptLine
[src]
fn move_up(&mut self) -> OperationResult
[src]
fn move_down(&mut self) -> OperationResult
[src]
fn move_left(&mut self) -> OperationResult
[src]
fn move_right(&mut self) -> OperationResult
[src]
impl Editable for PromptLine
[src]
fn delete_forwards(&mut self) -> OperationResult
[src]
fn delete_backwards(&mut self) -> OperationResult
[src]
fn go_to_beginning_of_line(&mut self) -> OperationResult
[src]
fn go_to_end_of_line(&mut self) -> OperationResult
[src]
fn clear(&mut self) -> OperationResult
[src]
impl Widget for PromptLine
[src]
fn space_demand(&self) -> Demand2D
[src]
fn draw(&self, window: Window, hints: RenderingHints)
[src]
Auto Trait Implementations
impl Send for PromptLine
impl Sync for PromptLine
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,