NotificationCardNode
Namespace: Hex1b.Nodes
Assembly: Hex1b.dll
Render node for . Displays a notification with title, optional body, action buttons, and timeout progress bar. Composes child ButtonNode for dismiss and SplitButtonNode for actions.
public sealed class NotificationCardNode : Hex1bNodeInheritance
Object → Hex1bNode → NotificationCardNode
Properties
ActionButton
The action button child node.
Returns: SplitButtonNode
public SplitButtonNode? ActionButton { get; set; }Body
The notification body text (optional).
Returns: String
public string? Body { get; set; }DismissButton
The dismiss button child node.
Returns: ButtonNode
public ButtonNode? DismissButton { get; set; }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; }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; }Notification
The notification this card displays.
Returns: Notification
public Notification? Notification { get; set; }PrimaryAction
The primary action.
Returns: NotificationAction
public NotificationAction? PrimaryAction { get; set; }SecondaryActions
The secondary actions.
Returns: IReadOnlyList<NotificationAction>
public IReadOnlyList<NotificationAction> SecondaryActions { get; set; }ShowProgressBar
Whether to show the timeout progress bar. When false, the progress bar is hidden (e.g., in the drawer view).
Returns: Boolean
public bool ShowProgressBar { get; set; }Stack
The notification stack for dismiss operations.
Returns: NotificationStack
public NotificationStack? Stack { get; set; }Title
The notification title.
Returns: String
public string Title { 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)GetChildren()
Returns all children for rendering.
Returns: IEnumerable<Hex1bNode>
public override IEnumerable<Hex1bNode> GetChildren()GetFocusableNodes()
Returns focusable children (dismiss button and action button).
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)