word selection

This commit is contained in:
2025-11-22 15:33:28 -05:00
parent fc89826794
commit c24c517c60
3 changed files with 54 additions and 20 deletions

View File

@@ -33,6 +33,12 @@ pub struct WidgetId<W = AnyWidget> {
_pd: PhantomData<W>,
}
impl<W> PartialEq for WidgetId<W> {
fn eq(&self, other: &Self) -> bool {
self.ty == other.ty && self.id == other.id
}
}
/// A WidgetId for a static widget that cannot be removed from a Ui.
/// Useful because ergonomic clones don't exist yet so you can easily use these in closures.
/// Do not use this if you want the widget to be freeable.