Skip to content

SelectionPanelCopyEventArgs

Namespace: Hex1b.Widgets

Assembly: Hex1b.dll

Payload delivered to when the user commits a copy in copy mode.

csharp
public sealed class SelectionPanelCopyEventArgs : EventArgs

Inheritance

ObjectEventArgsSelectionPanelCopyEventArgs

Constructors

SelectionPanelCopyEventArgs(string, SelectionMode, Rect, Rect, IReadOnlyList<SelectionPanelSelectedNode>)

Creates a new .

Parameters:

csharp
public SelectionPanelCopyEventArgs(string text, SelectionMode mode, Rect panelBounds, Rect terminalBounds, IReadOnlyList<SelectionPanelSelectedNode> nodes)

Properties

Mode

The geometry mode active when the user committed the copy.

Returns: SelectionMode

csharp
public SelectionMode Mode { get; }

Nodes

Per-node breakdown of the selection: every descendant of the panel's wrapped child whose layout overlaps at least one selected cell, plus the wrapped child itself when it does. Each entry exposes the actual selected-cell footprint within the node and a flag indicating whether the node is fully selected.

Returns: IReadOnlyList<SelectionPanelSelectedNode>

csharp
public IReadOnlyList<SelectionPanelSelectedNode> Nodes { get; }

PanelBounds

Bounding rectangle of the selection in panel-local (surface) coordinates. (0, 0) is the top-left of the wrapped child.

Returns: Rect

csharp
public Rect PanelBounds { get; }

TerminalBounds

Bounding rectangle of the selection in absolute terminal coordinates. Equals translated by the panel's Bounds top-left.

Returns: Rect

csharp
public Rect TerminalBounds { get; }

Text

Plain text of the selection, matching what returns.

Returns: String

csharp
public string Text { get; }

Remarks

Provides the copied alongside the geometric and structural details of what was selected. This makes useful for more than just clipboard copy — agentic UIs can use it to ask "which transcript entries did the user just select?" via , and overlay tools can use / to position annotations.

Coordinate spaces:

is in panel-local (surface) coordinates — (0, 0) is the top-left of the wrapped child. is in absolute terminal coordinates and equals translated by the panel's Bounds top-left. When the panel is nested inside a scrolled ScrollPanel some rows of may sit outside the visible viewport.

For and the bounds rectangle is exact. For (cell-stream selection) the rectangle is the bounding box of the start and end points and may include cells that are not part of the actual flowing selection (e.g., the lower-left and upper-right corners of a multi-row stream selection).

Released under the MIT License.