Skip to content

PastableNode ​

Namespace: Hex1b.Nodes

Assembly: Hex1b.dll

A transparent container node that intercepts bracketed paste events. Renders no chrome — layout and rendering pass through to the child.

csharp
public sealed class PastableNode : Hex1bNode

Inheritance ​

Object → Hex1bNode → PastableNode

Properties ​

Child ​

The single child node.

Returns: Hex1bNode

csharp
public Hex1bNode? Child { get; }

IsFocusable ​

Returns true if this node can receive focus.

Returns: Boolean

csharp
public override bool IsFocusable { get; }

MaxSize ​

Maximum paste size in characters. Null means unlimited.

Returns: Nullable<Int32>

csharp
public int? MaxSize { get; }

PasteAction ​

The async action to execute when paste data arrives.

Returns: Func<PasteEventArgs, Task>

csharp
public Func<PasteEventArgs, Task>? PasteAction { get; }

PasteTimeout ​

Timeout for the paste operation. Null means no timeout.

Returns: Nullable<TimeSpan>

csharp
public TimeSpan? PasteTimeout { get; }

Methods ​

ArrangeCore(Rect) ​

Override this method to implement arranging logic for this node. The base implementation saves previous bounds, marks dirty on change, and sets bounds.

Parameters:

csharp
protected override void ArrangeCore(Rect rect)

GetChildren() ​

Gets the direct children of this node for structural tree traversal. Container nodes should override this to return their children.

Returns: IEnumerable<Hex1bNode>

csharp
public override IEnumerable<Hex1bNode> GetChildren()

GetFocusableNodes() ​

Gets all focusable nodes in this subtree (including this node if focusable).

Returns: IEnumerable<Hex1bNode>

csharp
public override IEnumerable<Hex1bNode> GetFocusableNodes()

HandlePasteAsync(Hex1bPasteEvent) ​

Handles paste by invoking the paste action with optional maxSize/timeout enforcement.

Parameters:

Returns: Task<InputResult>

csharp
public override Task<InputResult> HandlePasteAsync(Hex1bPasteEvent pasteEvent)

MeasureCore(Constraints) ​

Override this method to implement measuring logic for this node.

Parameters:

Returns: Size

csharp
protected override Size MeasureCore(Constraints constraints)

Render(Hex1bRenderContext) ​

Renders the node to the given context.

Parameters:

csharp
public override void Render(Hex1bRenderContext context)

Released under the MIT License.