linebender / druid

A data-first Rust-native UI design toolkit.
https://linebender.org/druid/
Apache License 2.0
9.45k stars 569 forks source link

Add a public constructor to StringCursor #2319

Closed benoitryder closed 1 year ago

benoitryder commented 1 year ago

StringCursor fields being private is the only thing preventing a user to define its own EditableText, unless it directly wraps an existing one.

As an exemple, with this patch it is possible to wrap a RichText, implement few traits, and use it in a TextBox.