ArlecchinoOptions class
Namespace: Arlecchino.Hosting · Assembly: Arlecchino
Everything the framework can be told about an application. Configure it in the AddArlecchino callback; most of it also has a builder call.
public sealed class ArlecchinoOptions
Constructors
| Member | Summary |
|---|---|
ArlecchinoOptions() |
Properties
| Member | Summary |
|---|---|
AskTerminal | Whether to ask the terminal what it can do as the application starts. It costs at most ArlecchinoOptions.TerminalAnswer, and only on a terminal that stays silent. |
BracketedPaste | Whether pasted text arrives as one block. On by default: without it a paste reads as a burst of key presses, and a long one can trip validation or a shortcut halfway through. |
CellHeight | How many pixels tall a cell is taken to be, installed into Glyphs.CellHeight on resolve. See ArlecchinoOptions.CellWidth. |
CellWidth | How many pixels wide a cell is taken to be, installed into Glyphs.CellWidth on resolve. Only ImageProtocol.Sixel reads it, since sixel is measured in pixels. |
CommandPaletteKey | Character that opens the command palette. A character rather than a binding, so it survives a layout where the key sits elsewhere. |
EscapeTimeout | How long to wait for the rest of an escape sequence before deciding there is none. It is also the delay a lone Esc costs, so keep it short. |
GraphSymbols | What graphs are drawn with. Installed into Glyphs.Graph on resolve, and settable afterward, so an application can offer the choice in its own settings. |
Hints | When to draw the box of keys in the bottom-right corner. |
HorizontalPadding | Cells kept free on the left and right of the content area. |
ImageProtocol | How pictures reach the terminal, installed into Glyphs.Picture on resolve and settable afterward. ImageProtocol.Auto asks the terminal rather than guessing. |
InputPollInterval | How long the input loop sleeps when no key is waiting. |
Keymap | Keys the framework itself reacts to. |
MinimumHeight | Below this height the view is replaced by a "make the window bigger" notice. |
MinimumWidth | Below this width the view is replaced by a "make the window bigger" notice. |
MouseInput | Whether to report mouse events. Off by default, because with it on the terminal stops handling selection itself and copying text with the mouse no longer works the way the user expects. |
NotificationLifetime | How long a notification stays in the list behind the output row — long enough to go and read what went past while the screen was busy. |
NotificationTimeout | How long a notification stays on the output row. Once it is up the row goes quiet, and the message is only in the notifications screen. |
PaletteForBackground | Works the palette out from the color the terminal turned out to have, which is asked for as the application starts. A terminal that does not answer keeps ArlecchinoOptions.Theme as it was given. |
ShowOutputLine | Whether to keep the last row for ArlecchinoState.Output. |
StartRoute | Route shown on the first frame. For a start that depends on state, use a startup. |
Strings | Every piece of text the framework draws. |
TargetFramesPerSecond | How often the loop may draw. Frames are only composed when something asked for one. |
TerminalAnswer | How long to wait for the terminal to finish answering. See ArlecchinoOptions.AskTerminal. |
TextInput | How a key press becomes a character on a non-latin layout. Whatever the terminal reports is taken by default, so any language can be typed without the application asking for it; ArlecchinoBuilder.UseKeysByPosition trades that for keys that always read the same. |
Theme | Colors behind the roles. Installed into ArlecchinoOptions.Theme on resolve. |
UseAlternateScreen | Whether to run on the alternate screen, which leaves the user's scrollback untouched on exit. |
VerticalPadding | Rows kept free above and below the content area. |
Constructors in detail
ArlecchinoOptions()
public ArlecchinoOptions();
Properties in detail
AskTerminal
public bool AskTerminal { get; set; }
Whether to ask the terminal what it can do as the application starts. It costs at most ArlecchinoOptions.TerminalAnswer, and only on a terminal that stays silent.
Type bool
BracketedPaste
public bool BracketedPaste { get; set; }
Whether pasted text arrives as one block. On by default: without it a paste reads as a burst of key presses, and a long one can trip validation or a shortcut halfway through.
Type bool
CellHeight
public int CellHeight { get; set; }
How many pixels tall a cell is taken to be, installed into Glyphs.CellHeight on resolve. See ArlecchinoOptions.CellWidth.
Type int
CellWidth
public int CellWidth { get; set; }
How many pixels wide a cell is taken to be, installed into Glyphs.CellWidth on resolve. Only ImageProtocol.Sixel reads it, since sixel is measured in pixels.
Type int
CommandPaletteKey
public char CommandPaletteKey { get; set; }
Character that opens the command palette. A character rather than a binding, so it survives a layout where the key sits elsewhere.
Type char
EscapeTimeout
public TimeSpan EscapeTimeout { get; set; }
How long to wait for the rest of an escape sequence before deciding there is none. It is also the delay a lone Esc costs, so keep it short.
Type TimeSpan
GraphSymbols
public GraphSymbols GraphSymbols { get; set; }
What graphs are drawn with. Installed into Glyphs.Graph on resolve, and settable afterward, so an application can offer the choice in its own settings.
Type GraphSymbols
Hints
public HintsShown Hints { get; set; }
When to draw the box of keys in the bottom-right corner.
Type HintsShown
HorizontalPadding
public int HorizontalPadding { get; set; }
Cells kept free on the left and right of the content area.
Type int
ImageProtocol
public ImageProtocol ImageProtocol { get; set; }
How pictures reach the terminal, installed into Glyphs.Picture on resolve and settable afterward. ImageProtocol.Auto asks the terminal rather than guessing.
Type ImageProtocol
InputPollInterval
public TimeSpan InputPollInterval { get; set; }
How long the input loop sleeps when no key is waiting.
Type TimeSpan
Keymap
public ArlecchinoKeymap Keymap { get; set; }
Keys the framework itself reacts to.
Type ArlecchinoKeymap
MinimumHeight
public int MinimumHeight { get; set; }
Below this height the view is replaced by a "make the window bigger" notice.
Type int
MinimumWidth
public int MinimumWidth { get; set; }
Below this width the view is replaced by a "make the window bigger" notice.
Type int
MouseInput
public bool MouseInput { get; set; }
Whether to report mouse events. Off by default, because with it on the terminal stops handling selection itself and copying text with the mouse no longer works the way the user expects.
Type bool
NotificationLifetime
public TimeSpan NotificationLifetime { get; set; }
How long a notification stays in the list behind the output row — long enough to go and read what went past while the screen was busy.
Type TimeSpan
NotificationTimeout
public TimeSpan NotificationTimeout { get; set; }
How long a notification stays on the output row. Once it is up the row goes quiet, and the message is only in the notifications screen.
Type TimeSpan
PaletteForBackground
public Func<Rgb, ThemePalette>? PaletteForBackground { get; set; }
Works the palette out from the color the terminal turned out to have, which is asked for as the application starts. A terminal that does not answer keeps ArlecchinoOptions.Theme as it was given.
Type Func<T, TResult><Rgb, ThemePalette>
ShowOutputLine
public bool ShowOutputLine { get; set; }
Whether to keep the last row for ArlecchinoState.Output.
Type bool
StartRoute
public ViewRoute StartRoute { get; set; }
Route shown on the first frame. For a start that depends on state, use a startup.
Type ViewRoute
Strings
public ArlecchinoStrings Strings { get; set; }
Every piece of text the framework draws.
Type ArlecchinoStrings
TargetFramesPerSecond
public int TargetFramesPerSecond { get; set; }
How often the loop may draw. Frames are only composed when something asked for one.
Type int
TerminalAnswer
public TimeSpan TerminalAnswer { get; set; }
How long to wait for the terminal to finish answering. See ArlecchinoOptions.AskTerminal.
Type TimeSpan
TextInput
public TextInputMode TextInput { get; set; }
How a key press becomes a character on a non-latin layout. Whatever the terminal reports is taken by default, so any language can be typed without the application asking for it; ArlecchinoBuilder.UseKeysByPosition trades that for keys that always read the same.
Type TextInputMode
Theme
public ThemePalette Theme { get; set; }
Colors behind the roles. Installed into ArlecchinoOptions.Theme on resolve.
Type ThemePalette
UseAlternateScreen
public bool UseAlternateScreen { get; set; }
Whether to run on the alternate screen, which leaves the user's scrollback untouched on exit.
Type bool
VerticalPadding
public int VerticalPadding { get; set; }
Rows kept free above and below the content area.
Type int