Skip to content

WindowPanelWidget ​

Namespace: Hex1b.Widgets

Assembly: Hex1b.dll

A container panel that hosts floating windows. Windows are managed through the and rendered over a decorative background.

csharp
public sealed record WindowPanelWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<WindowPanelWidget>

Inheritance ​

Object → Hex1bWidget → WindowPanelWidget

Implements ​

Constructors ​

WindowPanelWidget(string?) ​

A container panel that hosts floating windows. Windows are managed through the and rendered over a decorative background.

Parameters:

  • Name (String): Optional name for this panel. Required when using multiple WindowPanels.
csharp
public WindowPanelWidget(string? Name = null)

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

csharp
public bool AllowOutOfBounds { get; init; }

Background ​

Optional background widget that renders behind all windows. This widget participates in input routing and focus management.

Returns: Hex1bWidget

csharp
public Hex1bWidget? Background { get; init; }

Name ​

Optional name for this panel. Required when using multiple WindowPanels.

Returns: String

csharp
public string? Name { get; init; }

Fields ​

FocusNextAction ​

Returns: ActionId

csharp
public static readonly ActionId FocusNextAction

FocusPreviousAction ​

Returns: ActionId

csharp
public static readonly ActionId FocusPreviousAction

PanDownAction ​

Returns: ActionId

csharp
public static readonly ActionId PanDownAction

PanUpAction ​

Returns: ActionId

csharp
public static readonly ActionId PanUpAction

Remarks ​

WindowPanel provides the bounded area within which floating windows can be positioned and dragged. By default, windows are clamped to the panel bounds. Set to true to allow windows to be dragged outside the panel, with scrollbars appearing for navigation.

Access the window manager from event handlers via e.Windows:

csharp
ctx.Button("Open").OnClick(e => {
    e.Windows.Window(w => w.Text("Hello"))
        .Title("Settings")
        .Open(e.Windows);
});

When using multiple WindowPanels, each must have a unique name:

csharp
ctx.WindowPanel("editor");
ctx.WindowPanel("preview");
// Access via: e.Windows["editor"].Open(...)

Released under the MIT License.