Calls a function in response to a touch. #### Why use this? You need to know the position of the touch. You need to handle the beginning and end of the touch. #### Example ```rust use rui::*; rectangle() .touch(move |_, info| match info.state { TouchState::Begin => { println!("Touched") } TouchState::End => { println!("Released") } }); //.run(); ```
(
self,
f: F,
)
| 180 | /// //.run(); |
| 181 | /// ``` |
| 182 | fn touch<A: 'static, F: Fn(&mut Context, TouchInfo) -> A + Clone + 'static>( |
| 183 | self, |
| 184 | f: F, |
| 185 | ) -> Touch<Self, TouchFunc<F>> { |
| 186 | Touch::new(self, TouchFunc { f }) |
| 187 | } |
| 188 | |
| 189 | /// Specify the title of the window. |
| 190 | fn window_title(self, title: &str) -> TitleView<Self> { |
no outgoing calls
no test coverage detected