blit_widget/interact/mod.rs
1pub mod drag;
2pub mod focus;
3pub mod keyboard;
4pub mod press;
5pub mod scroll;
6
7pub fn press() -> press::Interact {
8 press::Interact
9}
10
11pub fn drag() -> drag::Interact {
12 drag::Interact::new()
13}
14
15pub fn focus() -> focus::Interact {
16 focus::Interact
17}
18
19/// handles routed keyboard and text input, claiming it when `handler` returns `Some`
20///
21/// return an action and apply it during the build.
22/// use [`keyboard::Interact::require_focus`] to require this widget to have focus.
23pub fn keyboard<F: keyboard::Handler>(handler: F) -> keyboard::Interact<F> {
24 keyboard::Interact::new(handler)
25}
26
27pub fn scroll() -> scroll::Interact {
28 scroll::Interact::new()
29}