ferroui_base/input/
text_input_event_args.rs1use super::text_input::TextInputMethodCommit;
2use crate::ferro_routed_event_args;
3use crate::interactivity::RoutedEventArgs;
4use std::rc::Rc;
5
6#[derive(Clone, Default)]
8pub struct TextInputEventArgs {
9 base: RoutedEventArgs,
10 pub(crate) input_method_commit: Option<Rc<TextInputMethodCommit>>,
11
12 pub text: Option<String>,
14}
15
16ferro_routed_event_args!(TextInputEventArgs: RoutedEventArgs);
17
18impl TextInputEventArgs {
19 pub fn input_method_commit(&self) -> Option<&Rc<TextInputMethodCommit>> {
21 self.input_method_commit.as_ref()
22 }
23
24 pub fn new() -> Self {
26 Self::default()
27 }
28}