ConsoleForge 0.3.0
Elm-architecture TUI framework for .NET 8
Loading...
Searching...
No Matches
ConsoleForge.Layout.SubRenderContext Class Referencesealed

A delegating IRenderContext that forwards writes to a parent context but with a restricted sub-region. More...

Inheritance diagram for ConsoleForge.Layout.SubRenderContext:

Public Member Functions

void RegisterWidget (IWidget widget, Region region)
 Record that widget was rendered at region .Used by the render cache for next-frame reuse. Default implementation is a no-op.
void SetCursorDescriptor (CursorDescriptor cursor)
 Set cursor on the Rendering Context.
 SubRenderContext (IRenderContext parent, Region region)
 Initialises a sub-context that forwards writes to parent but restricts rendering to region .
bool TryReuseWidget (IWidget widget, Region region)
 If widget (same reference) was rendered at the same region last frame, copy its cells from the previous buffer and return true.Caller should skip rendering that widget. Default implementation returns false (no caching).
void Write (int col, int row, string text, Style style)
 Write a styled string at an absolute terminal position.The call is a no-op if (col, row) falls outside Region.

Properties

ColorProfile ColorProfile [get]
 Detected terminal color capability.
CursorDescriptorCursor [get]
 Cursor information for TextArea and TextInput widgets.
ResolvedLayout Layout [get]
 Resolved layout for the current frame.Container widgets use this to retrieve child regions without re-running layout.
Region Region [get]
 The allocated region this sub-context is restricted to.
Theme Theme [get]
 Active theme for style inheritance.

Detailed Description

A delegating IRenderContext that forwards writes to a parent context but with a restricted sub-region.

Used by BorderBox to give the body widget its own clipped region.


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