Skip to content
ConsoleMonster
Class

ExportOptions

ConsoleMonster.Export

Namespace
ConsoleMonster.Export
Assembly
ConsoleMonster
Modifiers
sealed
Attributes
Fluent

How a widget, a rendered frame or a live-session snapshot is exported to HTML, SVG or text: the size in cells, the theme, the font, and an optional window frame with a title bar.

Inheritance

  • object
  • ExportOptions

Usage

Explore 112 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.

Returned or exposed by 40

Accepted by parameters 72

Constructors

public ExportOptions() #

Properties

public int Width { get; set; } #

Width in cells for widgets (frames and snapshots keep their own size). Zero resolves the current target width, falling back to 100 cells.

public int Height { get; set; } #

Height in cells for widgets; 0 (default) uses the height the widget measures at ExportOptions.Width.

public ExportTheme Theme { get; set; } #

The colours (default ExportTheme.Auto).

public ITheme? DarkTheme { get; set; } #

A custom theme for the dark rendering (default Theme.Dark).

public ITheme? LightTheme { get; set; } #

A custom theme for the light rendering (default Theme.Light).

public string? Title { get; set; } #

The page title and, with ExportOptions.WindowChrome, the title bar text.

public bool WindowChrome { get; set; } #

Enables the chosen ExportOptions.ChromeStyle (default MacOS). False always hides chrome; style None also hides it.

public WindowChromeStyle ChromeStyle { get; set; } #

The title bar style, used only when ExportOptions.WindowChrome is true. Default MacOS; None hides chrome.

public string FontFamily { get; set; } #

The font stack (see ExportOptions.DefaultFontFamily).

public bool IndividualTextElements { get; set; } #

SVG: writes one text element per grapheme instead of compact x-coordinate lists, for consumers with a limited SVG text model.

public bool IncludeCodeSource { get; set; } #

SVG: include the original source of a code view (default true).

public double FontSize { get; set; } #

The font size in pixels (default 14).

public double LineHeight { get; set; } #

The cell height as a multiple of the font size (default 1.2).

public GlyphTier Glyphs { get; set; } #

The glyph tier widgets render with (default GlyphTier.Full).

public ColorDepth ColorDepth { get; set; } #

The colour depth widgets render with (default ColorDepth.TrueColor).

public CultureInfo? Culture { get; set; } #

The culture for numbers and dates in widgets (default: the current culture).

public int Padding { get; set; } #

Space around the screen in pixels (default 12).

public TimeSpan Elapsed { get; set; } #

The session clock widgets show (header clocks, spinners) when a widget is exported; default zero.

public bool Fragment { get; set; } #

HTML only: writes a fragment (a styled element) instead of a whole page, for embedding.

Fields

public const string DefaultFontFamily #

The font stack. The first fonts draw box drawing and block characters on the cell grid; braille needs a font that has the braille block (Cascadia Mono, DejaVu Sans Mono, Menlo do; Consolas does not and falls back to a system font). SVG exports draw box, block and braille characters as shapes, so they do not depend on the font.

Value: 'Cascadia Mono', 'Cascadia Code', 'DejaVu Sans Mono', Menlo, Consolas, 'Liberation Mono', 'Courier New', monospace

Extension Methods

public static ExportOptions ChromeStyle(ExportOptions exportOptions, WindowChromeStyle value) #

Sets ExportOptions.ChromeStyle: The title bar style, used only when ExportOptions.WindowChrome is true. Default MacOS; None hides chrome.

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value ConsoleMonster.Export.WindowChromeStyle required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                               // C# fluent
new global::ConsoleMonster.Export.ExportOptions { ChromeStyle = value };    exportOptions.ChromeStyle(value);
public static ExportOptions ColorDepth(ExportOptions exportOptions, ColorDepth value) #

Sets ExportOptions.ColorDepth: The colour depth widgets render with (default ColorDepth.TrueColor).

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value ConsoleMonster.Capabilities.ColorDepth required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                              // C# fluent
new global::ConsoleMonster.Export.ExportOptions { ColorDepth = value };    exportOptions.ColorDepth(value);
public static ExportOptions Culture(ExportOptions exportOptions, CultureInfo? value) #

Sets ExportOptions.Culture: The culture for numbers and dates in widgets (default: the current culture).

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value System.Globalization.CultureInfo? required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                           // C# fluent
new global::ConsoleMonster.Export.ExportOptions { Culture = value };    exportOptions.Culture(value);
public static ExportOptions DarkTheme(ExportOptions exportOptions, ITheme? value) #

Sets ExportOptions.DarkTheme: A custom theme for the dark rendering (default Theme.Dark).

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value ConsoleMonster.Styling.ITheme? required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                             // C# fluent
new global::ConsoleMonster.Export.ExportOptions { DarkTheme = value };    exportOptions.DarkTheme(value);
public static ExportOptions Elapsed(ExportOptions exportOptions, TimeSpan value) #

Sets ExportOptions.Elapsed: The session clock widgets show (header clocks, spinners) when a widget is exported; default zero.

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value System.TimeSpan required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                           // C# fluent
new global::ConsoleMonster.Export.ExportOptions { Elapsed = value };    exportOptions.Elapsed(value);
public static ExportOptions FontFamily(ExportOptions exportOptions, string value) #

Sets ExportOptions.FontFamily: The font stack (see ExportOptions.DefaultFontFamily).

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value string required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                              // C# fluent
new global::ConsoleMonster.Export.ExportOptions { FontFamily = value };    exportOptions.FontFamily(value);
public static ExportOptions FontSize(ExportOptions exportOptions, double value) #

Sets ExportOptions.FontSize: The font size in pixels (default 14).

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value double required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                            // C# fluent
new global::ConsoleMonster.Export.ExportOptions { FontSize = value };    exportOptions.FontSize(value);
public static ExportOptions Fragment(ExportOptions exportOptions, bool value = true) #

Sets ExportOptions.Fragment: HTML only: writes a fragment (a styled element) instead of a whole page, for embedding.

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value bool = true optional
The value; true when omitted.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                            // C# fluent
new global::ConsoleMonster.Export.ExportOptions { Fragment = value };    exportOptions.Fragment(value);
public static ExportOptions Glyphs(ExportOptions exportOptions, GlyphTier value) #

Sets ExportOptions.Glyphs: The glyph tier widgets render with (default GlyphTier.Full).

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value ConsoleMonster.Capabilities.GlyphTier required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                          // C# fluent
new global::ConsoleMonster.Export.ExportOptions { Glyphs = value };    exportOptions.Glyphs(value);
public static ExportOptions Height(ExportOptions exportOptions, int value) #

Sets ExportOptions.Height: Height in cells for widgets; 0 (default) uses the height the widget measures at ExportOptions.Width.

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value int required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                          // C# fluent
new global::ConsoleMonster.Export.ExportOptions { Height = value };    exportOptions.Height(value);
public static ExportOptions IncludeCodeSource(ExportOptions exportOptions, bool value = true) #

Sets ExportOptions.IncludeCodeSource: SVG: include the original source of a code view (default true).

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value bool = true optional
The value; true when omitted.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                                     // C# fluent
new global::ConsoleMonster.Export.ExportOptions { IncludeCodeSource = value };    exportOptions.IncludeCodeSource(value);
public static ExportOptions IndividualTextElements(ExportOptions exportOptions, bool value = true) #

Sets ExportOptions.IndividualTextElements: SVG: writes one text element per grapheme instead of compact x-coordinate lists, for consumers with a limited SVG text model.

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value bool = true optional
The value; true when omitted.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                                          // C# fluent
new global::ConsoleMonster.Export.ExportOptions { IndividualTextElements = value };    exportOptions.IndividualTextElements(value);
public static ExportOptions LightTheme(ExportOptions exportOptions, ITheme? value) #

Sets ExportOptions.LightTheme: A custom theme for the light rendering (default Theme.Light).

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value ConsoleMonster.Styling.ITheme? required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                              // C# fluent
new global::ConsoleMonster.Export.ExportOptions { LightTheme = value };    exportOptions.LightTheme(value);
public static ExportOptions LineHeight(ExportOptions exportOptions, double value) #

Sets ExportOptions.LineHeight: The cell height as a multiple of the font size (default 1.2).

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value double required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                              // C# fluent
new global::ConsoleMonster.Export.ExportOptions { LineHeight = value };    exportOptions.LineHeight(value);
public static ExportOptions Padding(ExportOptions exportOptions, int value) #

Sets ExportOptions.Padding: Space around the screen in pixels (default 12).

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value int required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                           // C# fluent
new global::ConsoleMonster.Export.ExportOptions { Padding = value };    exportOptions.Padding(value);
public static ExportOptions Theme(ExportOptions exportOptions, ExportTheme value) #

Sets ExportOptions.Theme: The colours (default ExportTheme.Auto).

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value ConsoleMonster.Export.ExportTheme required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                         // C# fluent
new global::ConsoleMonster.Export.ExportOptions { Theme = value };    exportOptions.Theme(value);
public static ExportOptions Title(ExportOptions exportOptions, string? value) #

Sets ExportOptions.Title: The page title and, with ExportOptions.WindowChrome, the title bar text.

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value string? required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                         // C# fluent
new global::ConsoleMonster.Export.ExportOptions { Title = value };    exportOptions.Title(value);
public static ExportOptions Width(ExportOptions exportOptions, int value) #

Sets ExportOptions.Width: Width in cells for widgets (frames and snapshots keep their own size). Zero resolves the current target width, falling back to 100 cells.

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value int required
The value.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                         // C# fluent
new global::ConsoleMonster.Export.ExportOptions { Width = value };    exportOptions.Width(value);
public static ExportOptions WindowChrome(ExportOptions exportOptions, bool value = true) #

Sets ExportOptions.WindowChrome: Enables the chosen ExportOptions.ChromeStyle (default MacOS). False always hides chrome; style None also hides it.

Parameters

exportOptions ConsoleMonster.Export.ExportOptions required
The instance.
value bool = true optional
The value; true when omitted.

Returns

ExportOptions The same instance.

Examples

// C# initializer or property                                                // C# fluent
new global::ConsoleMonster.Export.ExportOptions { WindowChrome = value };    exportOptions.WindowChrome(value);