Skip to content

EffectPanelWidget

Namespace: Hex1b.Widgets

Assembly: Hex1b.dll

A single-child container widget that applies visual post-processing effects. The child remains fully interactive (focus, input, hit testing work normally). During rendering, the child's output is captured to a temporary , the effect callback modifies it, then the result is composited to the parent.

csharp
public sealed record EffectPanelWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<EffectPanelWidget>

Inheritance

ObjectHex1bWidgetEffectPanelWidget

Implements

Constructors

EffectPanelWidget(Hex1bWidget)

A single-child container widget that applies visual post-processing effects. The child remains fully interactive (focus, input, hit testing work normally). During rendering, the child's output is captured to a temporary , the effect callback modifies it, then the result is composited to the parent.

Parameters:

  • Child (Hex1bWidget): The child widget to render and apply effects to.
csharp
public EffectPanelWidget(Hex1bWidget Child)

Properties

Child

The child widget to render and apply effects to.

Returns: Hex1bWidget

csharp
public Hex1bWidget Child { get; init; }

Methods

Effect(Action<Surface>)

Sets the effect callback that post-processes the child's rendered surface.

Parameters:

  • effect (Action<Surface>): A callback that receives the rendered for in-place modification.

Returns: EffectPanelWidget

A new with the effect applied.

csharp
public EffectPanelWidget Effect(Action<Surface> effect)

Examples

csharp
ctx.EffectPanel(
    ctx.Text("Hello"),
    surface => { /* modify surface cells in-place */ }
);

Released under the MIT License.