Add text input operations
This commit is contained in:
parent
23299a555f
commit
c4bca3f2af
8 changed files with 215 additions and 1 deletions
|
|
@ -1,9 +1,11 @@
|
|||
//! Query or update internal widget state.
|
||||
pub mod focusable;
|
||||
pub mod scrollable;
|
||||
pub mod text_input;
|
||||
|
||||
pub use focusable::Focusable;
|
||||
pub use scrollable::Scrollable;
|
||||
pub use text_input::TextInput;
|
||||
|
||||
use crate::widget::Id;
|
||||
|
||||
|
|
@ -28,6 +30,9 @@ pub trait Operation<T> {
|
|||
/// Operates on a widget that can be scrolled.
|
||||
fn scrollable(&mut self, _state: &mut dyn Scrollable, _id: Option<&Id>) {}
|
||||
|
||||
/// Operates on a widget that has text input.
|
||||
fn text_input(&mut self, _state: &mut dyn TextInput, _id: Option<&Id>) {}
|
||||
|
||||
/// Finishes the [`Operation`] and returns its [`Outcome`].
|
||||
fn finish(&self) -> Outcome<T> {
|
||||
Outcome::None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue