Tidy up
This commit is contained in:
parent
ff15ddf3e0
commit
77d92ff65a
6 changed files with 134 additions and 62 deletions
|
@ -146,6 +146,11 @@ impl FocusHandle {
|
|||
}
|
||||
}
|
||||
|
||||
/// Moves the focus to the element associated with this handle.
|
||||
pub fn focus(&self, cx: &mut WindowContext) {
|
||||
cx.focus(self)
|
||||
}
|
||||
|
||||
/// Obtains whether the element associated with this handle is currently focused.
|
||||
pub fn is_focused(&self, cx: &WindowContext) -> bool {
|
||||
self.id.is_focused(cx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue