Skip to content

Commit

Permalink
Minor clarification in WidgetEnv's widgetKeyMap (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjvallarino authored Feb 4, 2023
1 parent 63189b7 commit df43498
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Monomer/Core/WidgetTypes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,12 @@ data WidgetEnv s e = WidgetEnv {
_weWidgetShared :: MVar (Map Text WidgetShared),
{-|
The active map of WidgetKey -> WidgetNode, if any. This map is restricted to
to the parent "Monomer.Widgets.Composite". Do not use this map directly, rely
instead on the 'Monomer.Core.Util.widgetIdFromKey',
'Monomer.Core.Util.nodeInfoFromKey' and 'Monomer.Core.Util.nodeInfoFromPath'
utility functions.
to the parent "Monomer.Widgets.Composite".
It is recommended to not use this map directly, since `WidgetNodeInfo` may be
stale (path and widgetId are always valid). Because of this it is safer to use
the 'Monomer.Core.Util.widgetIdFromKey', 'Monomer.Core.Util.nodeInfoFromKey'
and 'Monomer.Core.Util.nodeInfoFromPath' utility functions.
-}
_weWidgetKeyMap :: WidgetKeyMap s e,
-- | The currently hovered path, if any.
Expand Down

0 comments on commit df43498

Please sign in to comment.