From 8e9dc6e6e11b67ea70dbb4fccd3d4bec24df3c78 Mon Sep 17 00:00:00 2001 From: Robot Samurai Date: Thu, 1 Dec 2022 17:49:11 -0500 Subject: [PATCH] Update 0000-shared-widget-state.md --- text/0000-shared-widget-state.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/text/0000-shared-widget-state.md b/text/0000-shared-widget-state.md index 88c68b1..e72fc32 100644 --- a/text/0000-shared-widget-state.md +++ b/text/0000-shared-widget-state.md @@ -148,7 +148,6 @@ For keyboard mapping we would need to map the gamepad messages to keyboard event > # Implementation strategy > ## The details of how we store and retrieve the focus state should be discussed here. The following code is an example of how this could be implemented. This is not meant to be a final solution but a starting point for discussion. -```rs > > This is the most important part of the RFC. > @@ -156,7 +155,9 @@ For keyboard mapping we would need to map the gamepad messages to keyboard event > - Its interaction with other features is clear. > - It is reasonably clear how the feature would be implemented. > - Corner cases are dissected by example. -``` + +### Focus Message +To update our widgets we will generate a message with the widget leaving focus, and then another with the widget receiving focus. ### Focusable Trait The `Focusable` trait will be used to store the `Id` of the widget and provide methods to query and update the focus state of the widget.