SplitterNode
Namespace: Hex1b
Assembly: Hex1b.dll
public sealed class SplitterNode : Hex1bNode, IChildLayoutProviderInheritance
Object → Hex1bNode → SplitterNode
Implements
Properties
First
The first child (left for horizontal, top for vertical).
Returns: Hex1bNode
public Hex1bNode? First { get; set; }FirstSize
The size of the first pane in characters (width for horizontal, height for vertical).
Returns: Int32
public int FirstSize { get; set; }HitTestBounds
Returns the bounds of just the divider for mouse hit testing. This prevents clicks on child panes from being captured by the splitter.
Returns: Rect
public override Rect HitTestBounds { get; }IsFocusable
Returns true if this node can receive focus.
Returns: Boolean
public override bool IsFocusable { get; }IsFocused
Gets or sets whether this node is currently focused. Only meaningful for focusable nodes (where IsFocusable is true).
Returns: Boolean
public override bool IsFocused { get; set; }IsHovered
Gets or sets whether the mouse is currently hovering over this node. Set by Hex1bApp based on mouse position during each frame. Only set on focusable nodes (tracked via FocusRing hit testing).
Returns: Boolean
public override bool IsHovered { get; set; }Left
Returns: Hex1bNode
public Hex1bNode? Left { get; set; }LeftWidth
Returns: Int32
public int LeftWidth { get; set; }ManagesChildFocus
Returns true if this node manages focus for its children. When a parent manages focus, child containers should NOT set initial focus themselves. Container nodes like SplitterNode should override this to return true.
Returns: Boolean
public override bool ManagesChildFocus { get; }MinFirstSize
Minimum size for the first pane (width for horizontal, height for vertical).
Returns: Int32
public int MinFirstSize { get; set; }MinLeftWidth
Returns: Int32
public int MinLeftWidth { get; set; }Orientation
The orientation of the splitter.
Returns: SplitterOrientation
public SplitterOrientation Orientation { get; set; }ResizeStep
The amount to move the splitter when pressing arrow keys.
Returns: Int32
public int ResizeStep { get; set; }Right
Returns: Hex1bNode
public Hex1bNode? Right { get; set; }Second
The second child (right for horizontal, bottom for vertical).
Returns: Hex1bNode
public Hex1bNode? Second { get; set; }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)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)GetChildLayoutProvider(Hex1bNode)
Gets the layout provider to use when rendering a specific child.
Parameters:
child(Hex1bNode): The child node being rendered.
Returns: ILayoutProvider
The layout provider to use for this child, or null if no special layout provider is needed.
public ILayoutProvider? GetChildLayoutProvider(Hex1bNode child)GetChildren()
Gets the direct children of this container for input routing.
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()InvalidateFocusCache()
public void InvalidateFocusCache()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)SetInitialFocus()
public void SetInitialFocus()SyncFocusIndex()
Syncs _focusedIndex to match which child node has IsFocused = true. Call this after externally setting focus on a child node.
public override void SyncFocusIndex()