Returns true if the currently focused text input is multiline.
(&self)
| 5873 | |
| 5874 | /// Returns true if the currently focused text input is multiline. |
| 5875 | pub fn is_focused_text_input_multiline(&self) -> bool { |
| 5876 | if self.focused_element_id == 0 { |
| 5877 | return false; |
| 5878 | } |
| 5879 | self.text_input_element_ids.iter() |
| 5880 | .position(|&id| id == self.focused_element_id) |
| 5881 | .and_then(|idx| self.text_input_configs.get(idx)) |
| 5882 | .map_or(false, |cfg| cfg.is_multiline) |
| 5883 | } |
| 5884 | |
| 5885 | /// Returns the text value for a text input element, or empty string if not found. |
| 5886 | pub fn get_text_value(&self, element_id: u32) -> &str { |