WindowPanelNode
Namespace: Hex1b.Nodes
Assembly: Hex1b.dll
Render node for . A container that hosts floating windows rendered on top of main content.
public sealed class WindowPanelNode : Hex1bNode, IWindowHost, ILayoutProviderInheritance
Object → Hex1bNode → WindowPanelNode
Implements
Properties
AllowOutOfBounds
Whether windows can be moved outside the panel bounds. When true, scrollbars appear to allow panning to out-of-bounds windows.
Returns: Boolean
public bool AllowOutOfBounds { get; set; }BackgroundNode
Optional background node that renders behind all windows. Participates in input routing and focus management.
Returns: Hex1bNode
public Hex1bNode? BackgroundNode { get; set; }ClipMode
The clip mode for the panel's content. Defaults to Clip.
Returns: ClipMode
public ClipMode ClipMode { get; set; }ClipRect
The clip rectangle for child content.
Returns: Rect
public Rect ClipRect { get; }ClipScopeValue
The clipping scope for this panel's content.
Returns: ClipScope
public ClipScope ClipScopeValue { get; set; }ManagesChildFocus
WindowPanel manages focus for its descendants including windows.
Returns: Boolean
public override bool ManagesChildFocus { get; }Name
Optional name for this panel. Used when multiple WindowPanels exist.
Returns: String
public string? Name { get; set; }NeedsHorizontalScroll
Whether horizontal scrollbar is needed.
Returns: Boolean
public bool NeedsHorizontalScroll { get; }NeedsVerticalScroll
Whether vertical scrollbar is needed.
Returns: Boolean
public bool NeedsVerticalScroll { get; }ParentLayoutProvider
The parent layout provider, if any. Set when this provider becomes the current layout provider and there was already one active. Used to ensure nested clipping works correctly.
Returns: ILayoutProvider
public ILayoutProvider? ParentLayoutProvider { get; set; }ScrollX
Current horizontal scroll offset (for panning to out-of-bounds windows).
Returns: Int32
public int ScrollX { get; set; }ScrollY
Current vertical scroll offset (for panning to out-of-bounds windows).
Returns: Int32
public int ScrollY { get; set; }WindowNodes
The window nodes, in z-order (bottom to top).
Returns: List<WindowNode>
public List<WindowNode> WindowNodes { get; }Windows
The window manager for this panel.
Returns: WindowManager
public WindowManager Windows { 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:
bounds(Rect):
protected override void ArrangeCore(Rect bounds)ClipString(int, int, string)
Clips a string that starts at the given position, returning only the visible portion. Implementations should also consult the ParentLayoutProvider if present.
Parameters:
x(Int32): Starting absolute X position.y(Int32): Absolute Y position.text(String): The text to potentially clip.
Returns: ValueTuple<Int32, String>
A tuple containing:
- adjustedX: The X position to start rendering (may be > x if left-clipped)
- clippedText: The portion of text that should be rendered (may be empty)
public (int adjustedX, string clippedText) ClipString(int x, int y, string text)ConfigureDefaultBindings(InputBindingsBuilder)
Configures the default input bindings for this node type. Override in derived classes to add default key bindings. These bindings can be inspected and modified by the user's callback.
Parameters:
bindings(InputBindingsBuilder): The builder to add bindings to.
public override void ConfigureDefaultBindings(InputBindingsBuilder bindings)GetChildren()
Gets all direct children in render order.
Returns: IEnumerable<Hex1bNode>
public override IEnumerable<Hex1bNode> GetChildren()GetFocusableNodes()
Gets all focusable nodes in this subtree (including this node if focusable).
Returns: IEnumerable<Hex1bNode>
public override IEnumerable<Hex1bNode> GetFocusableNodes()MeasureCore(Constraints)
Override this method to implement measuring logic for this node.
Parameters:
constraints(Constraints):
Returns: Size
protected override Size MeasureCore(Constraints constraints)Render(Hex1bRenderContext)
Renders the node to the given context.
Parameters:
context(Hex1bRenderContext):
public override void Render(Hex1bRenderContext context)ScrollByAmount(int, int)
Scrolls the panel view by the specified amount.
Parameters:
public void ScrollByAmount(int deltaX, int deltaY)ShouldRenderAt(int, int)
Determines if a character at the given absolute position should be rendered. Implementations should also check the ParentLayoutProvider if present.
Parameters:
x(Int32): Absolute X position in terminal coordinates.y(Int32): Absolute Y position in terminal coordinates.
Returns: Boolean
True if the character should be rendered, false if it should be clipped.
public bool ShouldRenderAt(int x, int y)