[]Struct xterm_js_sys::xterm::TerminalOptions

pub struct TerminalOptions {
    pub allow_proposed_api: Option<bool>,
    pub allow_transparency: Option<bool>,
    pub(super) bell_sound: Option<Str>,
    pub bell_style: Option<BellStyle>,
    pub cols: Option<u16>,
    pub convert_eol: Option<bool>,
    pub cursor_blink: Option<bool>,
    pub cursor_style: Option<CursorStyle>,
    pub cursor_width: Option<f32>,
    pub disable_stdin: Option<bool>,
    pub draw_bold_text_in_bright_colors: Option<bool>,
    pub fast_scroll_modifier: Option<FastScrollModifier>,
    pub fast_scroll_sensitivity: Option<f32>,
    pub(super) font_family: Option<Str>,
    pub font_size: Option<f32>,
    pub font_weight: Option<f32>,
    pub font_weight_bold: Option<FontWeight>,
    pub letter_spacing: Option<u16>,
    pub line_height: Option<u16>,
    pub link_tooltip_hover_duration: Option<u16>,
    pub log_level: Option<LogLevel>,
    pub mac_option_click_forces_selection: Option<bool>,
    pub mac_option_is_meta: Option<bool>,
    pub minimum_contrast_ratio: Option<f32>,
    pub renderer_type: Option<RendererType>,
    pub right_click_selects_word: Option<bool>,
    pub rows: Option<u16>,
    pub screen_reader_mode: Option<bool>,
    pub scroll_sensitivity: Option<f32>,
    pub scrollback: Option<u32>,
    pub tab_stop_width: Option<u16>,
    pub(super) theme: Option<Theme>,
    pub(super) window_options: Option<WindowOptions>,
    pub windows_mode: Option<bool>,
    pub(super) word_separator: Option<Str>,
}

An object containing start up options for the terminal.

(This is really an interface, but we just go and define our own type that satisfies the interface.)

Fields

allow_proposed_api: Option<bool>

Whether to allow the use of proposed API. When false, any usage of APIs marked as experimental/proposed will throw an error. This defaults to true currently, but will change to false in v5.0.

allow_transparency: Option<bool>

Whether background should support non-opaque color. It must be set before executing the Terminal::open method and can’t be changed later without executing it again. Note that enabling this can negatively impact performance.

bell_sound: Option<Str>

A data uri of the sound to use for the bell when [TerminalOptions.bell_style] = 'sound'.

bell_style: Option<BellStyle>

The type of the bell notification the terminal will use.

cols: Option<u16>

The number of columns in the terminal.

convert_eol: Option<bool>

When enabled the cursor will be set to the beginning of the next line with every new line. This is equivalent to sending ‘\r\n’ for each ‘\n’. Normally the termios settings of the underlying PTY deals with the translation of ‘\n’ to ‘\r\n’ and this setting should not be used. If you deal with data from a non-PTY related source, this settings might be useful.

cursor_blink: Option<bool>

Whether the cursor blinks.

cursor_style: Option<CursorStyle>

The style of the cursor.

cursor_width: Option<f32>

The width of the cursor in CSS pixels when cursor_style is set to ‘bar’.

disable_stdin: Option<bool>

Whether input should be disabled.

draw_bold_text_in_bright_colors: Option<bool>

Whether to draw bold text in bright colors. The default is true.

fast_scroll_modifier: Option<FastScrollModifier>

The modifier key hold to multiply scroll speed.

fast_scroll_sensitivity: Option<f32>

The scroll speed multiplier used for fast scrolling.

font_family: Option<Str>

The font family used to render text.

font_size: Option<f32>

The font size used to render text.

font_weight: Option<f32>

The font weight used to render non-bold text.

font_weight_bold: Option<FontWeight>

The font weight used to render bold text.

letter_spacing: Option<u16>

The spacing in whole pixels between characters.

line_height: Option<u16>

The line height used to render text.

link_tooltip_hover_duration: Option<u16>
👎 Deprecated since 4.6.0:

This will be removed when the link matcher API is removed. See: https://github.com/xtermjs/xterm.js/issues/2703

The duration in milliseconds before link tooltip events fire when hovering on a link.

log_level: Option<LogLevel>

What log level to use, this will log for all levels below and including what is set:

  1. debug
  2. info (default)
  3. warn
  4. error
  5. off
mac_option_click_forces_selection: Option<bool>

Whether holding a modifier key will force normal selection behavior, regardless of whether the terminal is in mouse events mode. This will also prevent mouse events from being emitted by the terminal. For example, this allows you to use xterm.js’ regular selection inside tmux with mouse mode enabled.

mac_option_is_meta: Option<bool>

Whether to treat option as the meta key.

minimum_contrast_ratio: Option<f32>

The minimum contrast ratio for text in the terminal, setting this will change the foreground color dynamically depending on whether the contrast ratio is met. Example values:

renderer_type: Option<RendererType>

The type of renderer to use, this allows using the fallback DOM renderer when canvas is too slow for the environment. The following features do not work when the DOM renderer is used:

right_click_selects_word: Option<bool>

Whether to select the word under the cursor on right click, this is standard behavior in a lot of macOS applications.

rows: Option<u16>

The number of rows in the terminal.

screen_reader_mode: Option<bool>

Whether screen reader support is enabled. When on this will expose supporting elements in the DOM to support NVDA on Windows and VoiceOver on macOS.

scroll_sensitivity: Option<f32>

The scrolling speed multiplier used for adjusting normal scrolling speed.

scrollback: Option<u32>

The amount of scrollback in the terminal. Scrollback is the amount of rows that are retained when lines are scrolled beyond the initial viewport.

tab_stop_width: Option<u16>

The size of tab stops in the terminal.

theme: Option<Theme>

The color theme of the terminal.

window_options: Option<WindowOptions>

Enable various window manipulation and report features. All features are disabled by default for security reasons.

windows_mode: Option<bool>

Whether “Windows mode” is enabled. Because Windows backends winpty and conpty operate by doing line wrapping on their side, xterm.js does not have access to wrapped lines. When Windows mode is enabled the following changes will be in effect:

word_separator: Option<Str>

A string containing all characters that are considered word separated by the double click to select work logic.

Implementations

impl TerminalOptions[src]

#[must_use]pub const fn new(
    allow_proposed_api: Option<bool>,
    allow_transparency: Option<bool>,
    bell_sound: Option<Str>,
    bell_style: Option<BellStyle>,
    cols: Option<u16>,
    convert_eol: Option<bool>,
    cursor_blink: Option<bool>,
    cursor_style: Option<CursorStyle>,
    cursor_width: Option<f32>,
    disable_stdin: Option<bool>,
    draw_bold_text_in_bright_colors: Option<bool>,
    fast_scroll_modifier: Option<FastScrollModifier>,
    fast_scroll_sensitivity: Option<f32>,
    font_family: Option<Str>,
    font_size: Option<f32>,
    font_weight: Option<f32>,
    font_weight_bold: Option<FontWeight>,
    letter_spacing: Option<u16>,
    line_height: Option<u16>,
    link_tooltip_hover_duration: Option<u16>,
    log_level: Option<LogLevel>,
    mac_option_click_forces_selection: Option<bool>,
    mac_option_is_meta: Option<bool>,
    minimum_contrast_ratio: Option<f32>,
    renderer_type: Option<RendererType>,
    right_click_selects_word: Option<bool>,
    rows: Option<u16>,
    screen_reader_mode: Option<bool>,
    scroll_sensitivity: Option<f32>,
    scrollback: Option<u32>,
    tab_stop_width: Option<u16>,
    theme: Option<Theme>,
    window_options: Option<WindowOptions>,
    windows_mode: Option<bool>,
    word_separator: Option<Str>
) -> Self
[src]

Constructor.

impl TerminalOptions

#[must_use]pub fn bell_sound(&self) -> Option<Str>[src]

A data uri of the sound to use for the bell when [TerminalOptions.bell_style] = 'sound'. Getter.

pub fn set_bell_sound(&mut self, bell_sound: Option<Str>)[src]

A data uri of the sound to use for the bell when [TerminalOptions.bell_style] = 'sound'. Setter.

#[must_use]pub fn font_family(&self) -> Option<Str>[src]

The font family used to render text. Getter.

pub fn set_font_family(&mut self, font_family: Option<Str>)[src]

The font family used to render text. Setter.

#[must_use]pub fn theme(&self) -> Option<Theme>[src]

The color theme of the terminal. Getter.

pub fn set_theme(&mut self, theme: Option<Theme>)[src]

The color theme of the terminal. Setter.

#[must_use]pub fn window_options(&self) -> Option<WindowOptions>[src]

Enable various window manipulation and report features. All features are disabled by default for security reasons. Getter.

pub fn set_window_options(&mut self, window_options: Option<WindowOptions>)[src]

Enable various window manipulation and report features. All features are disabled by default for security reasons. Setter.

#[must_use]pub fn word_separator(&self) -> Option<Str>[src]

A string containing all characters that are considered word separated by the double click to select work logic. Getter.

pub fn set_word_separator(&mut self, word_separator: Option<Str>)[src]

A string containing all characters that are considered word separated by the double click to select work logic. Setter.

impl TerminalOptions[src]

#[must_use]pub const fn default() -> Self[src]

This is supported on feature="ext" only.

Constructor for TerminalOptions.

#[must_use]pub const fn with_allow_proposed_api(self, allow_proposed_api: bool) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::allow_proposed_api.

#[must_use]pub const fn with_allow_transparency(self, allow_transparency: bool) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::allow_transparency.

#[must_use]pub fn with_bell_sound<S: ToString>(self, bell_sound: S) -> Self[src]

This is supported on feature="ext" only.

#[must_use]pub const fn with_bell_style(self, bell_style: BellStyle) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::bell_style.

#[must_use]pub const fn with_cols(self, cols: u16) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::cols.

#[must_use]pub const fn with_convert_eol(self, convert_eol: bool) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::convert_eol.

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::cursor_blink.

#[must_use]pub const fn with_cursor_style(self, cursor_style: CursorStyle) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::cursor_style.

#[must_use]pub const fn with_cursor_width(self, cursor_width: f32) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::cursor_width.

#[must_use]pub const fn with_disable_stdin(self, disable_stdin: bool) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::disable_stdin.

#[must_use]pub const fn with_draw_bold_text_in_bright_colors(
    self,
    draw_bold_text_in_bright_colors: bool
) -> Self
[src]

This is supported on feature="ext" only.

#[must_use]pub const fn with_fast_scroll_modifier(
    self,
    fast_scroll_modifier: FastScrollModifier
) -> Self
[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::fast_scroll_modifier.

#[must_use]pub const fn with_fast_scroll_sensitivity(
    self,
    fast_scroll_sensitivity: f32
) -> Self
[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::fast_scroll_sensitivity.

#[must_use]pub fn with_font_family<S: ToString>(self, font_family: S) -> Self[src]

This is supported on feature="ext" only.

#[must_use]pub const fn with_font_size(self, font_size: f32) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::font_size.

#[must_use]pub const fn with_font_weight(self, font_weight: f32) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::font_weight.

#[must_use]pub const fn with_font_weight_bold(self, font_weight_bold: FontWeight) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::font_weight_bold.

#[must_use]pub const fn with_letter_spacing(self, letter_spacing: u16) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::letter_spacing.

#[must_use]pub const fn with_line_height(self, line_height: u16) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::line_height.

This is supported on feature="ext" only.

#[must_use]pub const fn with_log_level(self, log_level: LogLevel) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::log_level.

#[must_use]pub const fn with_mac_option_click_forces_selection(
    self,
    mac_option_click_forces_selection: bool
) -> Self
[src]

This is supported on feature="ext" only.

#[must_use]pub const fn with_mac_option_is_meta(self, mac_option_is_meta: bool) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::mac_option_is_meta.

#[must_use]pub const fn with_minimum_contrast_ratio(
    self,
    minimum_contrast_ratio: f32
) -> Self
[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::minimum_contrast_ratio.

#[must_use]pub const fn with_renderer_type(self, renderer_type: RendererType) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::renderer_type.

#[must_use]pub const fn with_right_click_selects_word(
    self,
    right_click_selects_word: bool
) -> Self
[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::right_click_selects_word.

#[must_use]pub const fn with_rows(self, rows: u16) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::rows.

#[must_use]pub const fn with_screen_reader_mode(self, screen_reader_mode: bool) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::screen_reader_mode.

#[must_use]pub const fn with_scroll_sensitivity(self, scroll_sensitivity: f32) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::scroll_sensitivity.

#[must_use]pub const fn with_scrollback(self, scrollback: u32) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::scrollback.

#[must_use]pub const fn with_tab_stop_width(self, tab_stop_width: u16) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::tab_stop_width.

#[must_use]pub fn with_theme(self, theme: Theme) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::theme (accessible through TerminalOptions::theme and TerminalOptions::set_theme.

#[must_use]pub fn with_window_options(self, window_options: WindowOptions) -> Self[src]

This is supported on feature="ext" only.

#[must_use]pub const fn with_windows_mode(self, windows_mode: bool) -> Self[src]

This is supported on feature="ext" only.

Builder pattern setter for TerminalOptions::windows_mode.

#[must_use]pub fn with_word_separator<S: ToString>(self, word_separator: S) -> Self[src]

This is supported on feature="ext" only.

Trait Implementations

impl Clone for TerminalOptions

impl Debug for TerminalOptions

impl Default for TerminalOptions

impl From<TerminalOptions> for JsValue[src]

impl FromWasmAbi for TerminalOptions[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more

impl IntoWasmAbi for TerminalOptions[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

impl OptionFromWasmAbi for TerminalOptions[src]

impl OptionIntoWasmAbi for TerminalOptions[src]

impl PartialEq<TerminalOptions> for TerminalOptions

impl RefFromWasmAbi for TerminalOptions[src]

type Abi = u32

The wasm ABI type references to Self are recovered from.

type Anchor = Ref<'static, TerminalOptions>

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don't persist beyond one function call, and so that they remain anonymous. Read more

impl RefMutFromWasmAbi for TerminalOptions[src]

type Abi = u32

Same as RefFromWasmAbi::Abi

type Anchor = RefMut<'static, TerminalOptions>

Same as RefFromWasmAbi::Anchor

impl StructuralPartialEq for TerminalOptions

impl WasmDescribe for TerminalOptions[src]

Auto Trait Implementations

impl RefUnwindSafe for TerminalOptions

impl Send for TerminalOptions

impl Sync for TerminalOptions

impl Unpin for TerminalOptions

impl UnwindSafe for TerminalOptions

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.