GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
doc_editor: pos_at is public (a host placing a drop)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/widget/doc_editor/mod.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/widget/doc_editor/mod.rs b/src/widget/doc_editor/mod.rs
index bfd1ff5..ae91c30 100644
--- a/src/widget/doc_editor/mod.rs
+++ b/src/widget/doc_editor/mod.rs
@@ -362,7 +362,9 @@ impl DocEditor {
}
/// The position under a screen point.
- fn pos_at(&mut self, sx: f32, sy: f32) -> Pos {
+ /// The text position under a window point (as painted last), for a
+ /// host placing something there — a drop.
+ pub fn pos_at(&mut self, sx: f32, sy: f32) -> Pos {
let (x, y) = (sx - self.origin.0, sy - self.origin.1 + self.scroll);
if y < 0.0 {
return Pos::default();