Invoke a callback with each rectangle representing the selected portions of text, and the indices of the lines to which they belong.
(&self, f: impl FnMut(BoundingBox, usize))
| 489 | /// Invoke a callback with each rectangle representing the selected portions of text, and the |
| 490 | /// indices of the lines to which they belong. |
| 491 | pub fn selection_geometry_with(&self, f: impl FnMut(BoundingBox, usize)) { |
| 492 | // We do not check `self.show_cursor` here, as the IME handling code collapses the |
| 493 | // selection to a caret in that case. |
| 494 | self.selection.geometry_with(&self.layout, f); |
| 495 | } |
| 496 | |
| 497 | /// Get a rectangle representing the current caret cursor position. |
| 498 | pub fn cursor_geometry(&self, size: f32) -> BoundingBox { |