DropTargetNode
Namespace: Hex1b.Nodes
Assembly: Hex1b.dll
A node that marks an insertion point for drag-and-drop within a . Visibility is controlled by the builder callback: when inactive, the builder typically returns a zero-height widget; when active (nearest to cursor), it returns a visual indicator.
public sealed class DropTargetNode : Hex1bNodeInheritance
Object → Hex1bNode → DropTargetNode
Properties
Child
The single child node (the visual indicator).
Returns: Hex1bNode
public Hex1bNode? Child { get; set; }DragData
The drag data of the item currently being dragged. Null if no drag is active.
Returns: Object
public object? DragData { get; set; }IsActive
Whether this is the currently active drop target (nearest to cursor). Set by during drag operations.
Returns: Boolean
public bool IsActive { get; set; }IsFocusable
Returns true if this node can receive focus.
Returns: Boolean
public override bool IsFocusable { get; }TargetId
Unique identifier for this drop target within its parent droppable.
Returns: String
public string TargetId { 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:
rect(Rect):
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: IReadOnlyList<Hex1bNode>
public override IReadOnlyList<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)