ConsoleForge 0.3.0
Elm-architecture TUI framework for .NET 8
Loading...
Searching...
No Matches
ConsoleForge.Layout.IFocusable Interface Reference

Extended interface for interactive widgets that can receive keyboard focus. More...

Inheritance diagram for ConsoleForge.Layout.IFocusable:

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.

Detailed Description

Extended interface for interactive widgets that can receive keyboard focus.

Member Function Documentation

◆ OnKeyEvent()

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.


The documentation for this interface was generated from the following file:
  • src/ConsoleForge/Layout/IFocusable.cs