Returns the selection range (start, end) for a text input element, or None. When text-styling is enabled, these are visual positions.
(&self, element_id: u32)
| 5934 | /// Returns the selection range (start, end) for a text input element, or None. |
| 5935 | /// When text-styling is enabled, these are visual positions. |
| 5936 | pub fn get_selection_range(&self, element_id: u32) -> Option<(usize, usize)> { |
| 5937 | self.text_edit_states |
| 5938 | .get(&element_id) |
| 5939 | .and_then(|state| state.selection_range()) |
| 5940 | } |
| 5941 | |
| 5942 | /// Sets the selection range for a text input element. |
| 5943 | /// `anchor` is where selection started, `cursor` is where it ends. |
nothing calls this directly
no test coverage detected