Skip to content
ConsoleMonster
Class

FrameSection

ConsoleMonster.Frames

Namespace
ConsoleMonster.Frames
Assembly
ConsoleMonster
Modifiers
sealed

A titled block of a frame. The content is built after the frame decides the section's width, so a section can choose its own tier (for example a DC matrix, a site matrix or a top-N list) for the space it actually got.

Inheritance

  • object
  • FrameSection

Usage

Explore 45 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 24

Constructors

public FrameSection(string title, Func<FrameSectionContext, IWidget> content) #

Creates a section.

Parameters

title string required
The literal title.
content System.Func<ConsoleMonster.Frames.FrameSectionContext, ConsoleMonster.Layout.IWidget> required
Builds the content for an allocated width. It must be pure.

Properties

public string Title { get; } #

The literal title.

public IList<string> Facts { get; } #

Literal Muted facts after the title.

public IList<FrameState> States { get; } #

The section's states at its right edge, worst first.

public string? Meta { get; set; } #

Literal Muted meta at the right edge when there is no state (log axis).

public FramePlacement Placement { get; set; } #

Summary or detail.

public int? MinWidth { get; set; } #

The narrowest useful width; null uses the content's natural width, so the section never shrinks below it.

public int? MaxWidth { get; set; } #

The widest the section may become, or null for no limit.

public double Grow { get; set; } #

Share of leftover row width; zero keeps the section at its natural width.

public bool FullWidth { get; set; } #

Whether the section always takes a row of its own.

Extension Methods

public static FrameSection AddFact(FrameSection frameSection, string item) #

Adds an item to FrameSection.Facts: Literal Muted facts after the title.

Parameters

frameSection ConsoleMonster.Frames.FrameSection required
The instance.
item string required
The item.

Returns

FrameSection The same instance.
AddFacts 2 overloads
public static FrameSection AddFacts(FrameSection frameSection, params string[] items) #

Adds items to FrameSection.Facts: Literal Muted facts after the title.

Parameters

frameSection ConsoleMonster.Frames.FrameSection required
The instance.
items string[] required
The items, in order.

Returns

FrameSection The same instance.
public static FrameSection AddFacts(FrameSection frameSection, IEnumerable<string> items) #

Adds items to FrameSection.Facts: Literal Muted facts after the title.

Parameters

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

Returns

FrameSection The same instance.
public static FrameSection AddState(FrameSection frameSection, FrameState item) #

Adds an item to FrameSection.States: The section's states at its right edge, worst first.

Parameters

frameSection ConsoleMonster.Frames.FrameSection required
The instance.
item ConsoleMonster.Frames.FrameState required
The item.

Returns

FrameSection The same instance.
AddStates 2 overloads
public static FrameSection AddStates(FrameSection frameSection, params FrameState[] items) #

Adds items to FrameSection.States: The section's states at its right edge, worst first.

Parameters

frameSection ConsoleMonster.Frames.FrameSection required
The instance.
items ConsoleMonster.Frames.FrameState[] required
The items, in order.

Returns

FrameSection The same instance.
public static FrameSection AddStates(FrameSection frameSection, IEnumerable<FrameState> items) #

Adds items to FrameSection.States: The section's states at its right edge, worst first.

Parameters

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

Returns

FrameSection The same instance.
FullWidth 2 overloads
public static FrameSection FullWidth(FrameSection frameSection, bool value) #

Sets FrameSection.FullWidth: Whether the section always takes a row of its own.

Parameters

frameSection ConsoleMonster.Frames.FrameSection required
The instance.
value bool required
The value.

Returns

FrameSection The same instance.

Examples

// C# initializer or property      // C# fluent
frameSection.FullWidth = value;    frameSection.FullWidth(value);
public static FrameSection FullWidth(FrameSection frameSection) #

Sets FrameSection.FullWidth to true.

Parameters

frameSection ConsoleMonster.Frames.FrameSection required
The instance to configure.

Returns

FrameSection The same instance.
public static FrameSection Grow(FrameSection frameSection, double value) #

Sets FrameSection.Grow: Share of leftover row width; zero keeps the section at its natural width.

Parameters

frameSection ConsoleMonster.Frames.FrameSection required
The instance.
value double required
The value.

Returns

FrameSection The same instance.

Examples

// C# initializer or property    // C# fluent
frameSection.Grow = value;       frameSection.Grow(value);
public static FrameSection MaxWidth(FrameSection frameSection, int? value) #

Sets FrameSection.MaxWidth: The widest the section may become, or null for no limit.

Parameters

frameSection ConsoleMonster.Frames.FrameSection required
The instance.
value int? required
The value.

Returns

FrameSection The same instance.

Examples

// C# initializer or property     // C# fluent
frameSection.MaxWidth = value;    frameSection.MaxWidth(value);
public static FrameSection Meta(FrameSection frameSection, string? value) #

Sets FrameSection.Meta: Literal Muted meta at the right edge when there is no state (log axis).

Parameters

frameSection ConsoleMonster.Frames.FrameSection required
The instance.
value string? required
The value.

Returns

FrameSection The same instance.

Examples

// C# initializer or property    // C# fluent
frameSection.Meta = value;       frameSection.Meta(value);
public static FrameSection MinWidth(FrameSection frameSection, int? value) #

Sets FrameSection.MinWidth: The narrowest useful width; null uses the content's natural width, so the section never shrinks below it.

Parameters

frameSection ConsoleMonster.Frames.FrameSection required
The instance.
value int? required
The value.

Returns

FrameSection The same instance.

Examples

// C# initializer or property     // C# fluent
frameSection.MinWidth = value;    frameSection.MinWidth(value);
public static FrameSection Placement(FrameSection frameSection, FramePlacement value) #

Sets FrameSection.Placement: Summary or detail.

Parameters

frameSection ConsoleMonster.Frames.FrameSection required
The instance.
value ConsoleMonster.Frames.FramePlacement required
The value.

Returns

FrameSection The same instance.

Examples

// C# initializer or property      // C# fluent
frameSection.Placement = value;    frameSection.Placement(value);