An is_focused function that produces an Operation that looks for a focusable widget by ID, and produces a bool that stores whether the widget is focused or not. This function was modeled after the existing find_focused, and for my purposes was a means to implement the second addition.
An is_focused function that produces a Task that looks for a text_input widget by ID, and produces a bool with whether the widget is focused or not.
Originally I tried to use the find_focusedOperation for text_input::is_focused, but I couldn't figure out how to make it work as desired when there is no currently focused widget (and find_focused produces Outcome::None).
This PR consists of two additions:
is_focused
function that produces anOperation
that looks for afocusable
widget by ID, and produces abool
that stores whether the widget is focused or not. This function was modeled after the existingfind_focused
, and for my purposes was a means to implement the second addition.is_focused
function that produces aTask
that looks for atext_input
widget by ID, and produces abool
with whether the widget is focused or not.Originally I tried to use the
find_focused
Operation
fortext_input::is_focused
, but I couldn't figure out how to make it work as desired when there is no currently focused widget (andfind_focused
producesOutcome::None
).