Extended interface for interactive widgets that can receive keyboard focus. More...
Public Member Functions | |
| void | OnKeyEvent (KeyMsg key, Action< IMsg > dispatch) |
| Called by the runtime when a key is pressed and this widget has focus. | |
| Public Member Functions inherited from ConsoleForge.Layout.IWidget | |
| void | Render (IRenderContext ctx) |
| Render this widget into the provided context. | |
Properties | |
| bool | HasFocus [get, set] |
| True when this widget holds keyboard focus. | |
| Properties inherited from ConsoleForge.Layout.IWidget | |
| SizeConstraint | Height [get] |
| Height constraint used by the layout engine. | |
| Style | Style [get] |
| Visual style for this widget. Inherits from Theme if unset. | |
| SizeConstraint | Width [get] |
| Width constraint used by the layout engine. | |
Extended interface for interactive widgets that can receive keyboard focus.
| void ConsoleForge.Layout.IFocusable.OnKeyEvent | ( | KeyMsg | key, |
| Action< IMsg > | dispatch ) |
Called by the runtime when a key is pressed and this widget has focus.
Call dispatch to inject a custom IMsg into the event loop.
Implemented in ConsoleForge.Widgets.Checkbox, ConsoleForge.Widgets.List, ConsoleForge.Widgets.Tabs, ConsoleForge.Widgets.TextArea, and ConsoleForge.Widgets.TextInput.