Skip to content
ConsoleMonster
Class

DashboardFrame

ConsoleMonster.Frames

Namespace
ConsoleMonster.Frames
Assembly
ConsoleMonster
Implements
IWidget
Modifiers
sealed

A static dashboard frame for summary output: title line, meters, Needs attention, overview sections packed side by side, detail sections, legend and footer. It prints once and scrolls like any output. The frame applies the width tiers, the length preference, the ordering and the footer hint, so every product frame follows the same rules.

Inheritance

  • object
  • DashboardFrame

Usage

Explore 38 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 20

Constructors

public DashboardFrame(string title) #

Creates a frame.

Parameters

title string required
The literal title, usually the view name.

Methods

public Size Measure(Constraints constraints, RenderContext context) #

Returns the size the widget wants within the constraints.

Parameters

constraints ConsoleMonster.Layout.Constraints required
The space offered.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.

Returns

Size The desired size, never larger than the constraints.
public void Render(Region region, RenderContext context) #

Renders into a region. The region may be smaller or larger than the measured size.

Parameters

region ConsoleMonster.Canvas.Region required
The target region.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.

Properties

public FrameHeader Header { get; } #

The title line.

public IList<Meter> Meters { get; } #

Headline meters, in priority order.

public AttentionList Attention { get; } #

The attention list; it prints first in the summary rows whenever it has items.

public IList<FrameSection> Sections { get; } #

Overview and detail sections, in the order they print.

public FrameLegend Legend { get; } #

The legend.

public ConsoleViewLength? Length { get; set; } #

An explicit length; null uses the session preference or Standard.

public Func<FrameScale, IWidget>? Compact { get; set; } #

The type's compact view for narrow terminals; null stacks the frame's own sections. The compact view replaces the title line, attention list and sections, so it must carry its own title line and list every problem; the frame adds the meter counts and the footer.

Extension Methods

public static DashboardFrame AddMeter(DashboardFrame dashboardFrame, Meter item) #

Adds an item to DashboardFrame.Meters: Headline meters, in priority order.

Parameters

dashboardFrame ConsoleMonster.Frames.DashboardFrame required
The instance.
item ConsoleMonster.Frames.Meter required
The item.

Returns

DashboardFrame The same instance.
AddMeters 2 overloads
public static DashboardFrame AddMeters(DashboardFrame dashboardFrame, params Meter[] items) #

Adds items to DashboardFrame.Meters: Headline meters, in priority order.

Parameters

dashboardFrame ConsoleMonster.Frames.DashboardFrame required
The instance.
items ConsoleMonster.Frames.Meter[] required
The items, in order.

Returns

DashboardFrame The same instance.
public static DashboardFrame AddMeters(DashboardFrame dashboardFrame, IEnumerable<Meter> items) #

Adds items to DashboardFrame.Meters: Headline meters, in priority order.

Parameters

dashboardFrame ConsoleMonster.Frames.DashboardFrame required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Frames.Meter> required
The items, in order.

Returns

DashboardFrame The same instance.
public static DashboardFrame AddSection(DashboardFrame dashboardFrame, FrameSection item) #

Adds an item to DashboardFrame.Sections: Overview and detail sections, in the order they print.

Parameters

dashboardFrame ConsoleMonster.Frames.DashboardFrame required
The instance.
item ConsoleMonster.Frames.FrameSection required
The item.

Returns

DashboardFrame The same instance.
AddSections 2 overloads
public static DashboardFrame AddSections(DashboardFrame dashboardFrame, params FrameSection[] items) #

Adds items to DashboardFrame.Sections: Overview and detail sections, in the order they print.

Parameters

dashboardFrame ConsoleMonster.Frames.DashboardFrame required
The instance.
items ConsoleMonster.Frames.FrameSection[] required
The items, in order.

Returns

DashboardFrame The same instance.
public static DashboardFrame AddSections(DashboardFrame dashboardFrame, IEnumerable<FrameSection> items) #

Adds items to DashboardFrame.Sections: Overview and detail sections, in the order they print.

Parameters

dashboardFrame ConsoleMonster.Frames.DashboardFrame required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Frames.FrameSection> required
The items, in order.

Returns

DashboardFrame The same instance.
public static DashboardFrame Attention(DashboardFrame dashboardFrame, Action<AttentionList> configure) #

Configures DashboardFrame.Attention in place: The attention list; it prints first in the summary rows whenever it has items.

Parameters

dashboardFrame ConsoleMonster.Frames.DashboardFrame required
The instance.
configure System.Action<ConsoleMonster.Frames.AttentionList> required
Configures the value.

Returns

DashboardFrame The same instance.
public static DashboardFrame Configure(DashboardFrame dashboardFrame, Action<DashboardFrame> configure) #

Assigns callbacks and related configuration without invoking delegate-valued properties.

Parameters

dashboardFrame ConsoleMonster.Frames.DashboardFrame required
The instance.
configure System.Action<ConsoleMonster.Frames.DashboardFrame> required
Assignments applied in order.

Returns

DashboardFrame The same instance.

Examples

// C# initializer or property      // C# fluent
dashboardFrame.Compact = value;    dashboardFrame.Configure(configured => configured.Compact = value);
public static DashboardFrame Header(DashboardFrame dashboardFrame, Action<FrameHeader> configure) #

Configures DashboardFrame.Header in place: The title line.

Parameters

dashboardFrame ConsoleMonster.Frames.DashboardFrame required
The instance.
configure System.Action<ConsoleMonster.Frames.FrameHeader> required
Configures the value.

Returns

DashboardFrame The same instance.
public static DashboardFrame Length(DashboardFrame dashboardFrame, ConsoleViewLength? value) #

Sets DashboardFrame.Length: An explicit length; null uses the session preference or Standard.

Parameters

dashboardFrame ConsoleMonster.Frames.DashboardFrame required
The instance.
value ConsoleMonster.Views.ConsoleViewLength? required
The value.

Returns

DashboardFrame The same instance.

Examples

// C# initializer or property     // C# fluent
dashboardFrame.Length = value;    dashboardFrame.Length(value);