MCPcopy Create free account
hub / github.com/Kethku/Pando / selection_geometry_with

Method selection_geometry_with

aspen/src/components/editor.rs:491–495  ·  view source on GitHub ↗

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))

Source from the content-addressed store, hash-verified

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 {

Callers 1

drawMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected