[−]Struct xterm_js_sys::xterm::TerminalOptions
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>
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:
- debug
- info (default)
- warn
- error
- 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:
- 1: The default, do nothing.
- 4.5: Minimum for WCAG AA compliance.
- 7: Minimum for WCAG AAA compliance.
- 21: White on black or black on white.
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:
- Letter spacing
- Cursor blink
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:
- Reflow is disabled.
- Lines are assumed to be wrapped if the last character of the line is not whitespace.
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]
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
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]
feature="ext"
only.Constructor for TerminalOptions
.
#[must_use]pub const fn with_allow_proposed_api(self, allow_proposed_api: bool) -> Self
[src]
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]
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]
feature="ext"
only.Builder pattern setter for TerminalOptions::bell_sound
(accessible through TerminalOptions::bell_sound
and TerminalOptions::set_bell_sound
.
#[must_use]pub const fn with_bell_style(self, bell_style: BellStyle) -> Self
[src]
feature="ext"
only.Builder pattern setter for TerminalOptions::bell_style
.
#[must_use]pub const fn with_cols(self, cols: u16) -> Self
[src]
feature="ext"
only.Builder pattern setter for TerminalOptions::cols
.
#[must_use]pub const fn with_convert_eol(self, convert_eol: bool) -> Self
[src]
feature="ext"
only.Builder pattern setter for TerminalOptions::convert_eol
.
#[must_use]pub const fn with_cursor_blink(self, cursor_blink: bool) -> Self
[src]
feature="ext"
only.Builder pattern setter for TerminalOptions::cursor_blink
.
#[must_use]pub const fn with_cursor_style(self, cursor_style: CursorStyle) -> Self
[src]
feature="ext"
only.Builder pattern setter for TerminalOptions::cursor_style
.
#[must_use]pub const fn with_cursor_width(self, cursor_width: f32) -> Self
[src]
feature="ext"
only.Builder pattern setter for TerminalOptions::cursor_width
.
#[must_use]pub const fn with_disable_stdin(self, disable_stdin: bool) -> Self
[src]
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]
self,
draw_bold_text_in_bright_colors: bool
) -> Self
feature="ext"
only.Builder pattern setter for TerminalOptions::draw_bold_text_in_bright_colors
.
#[must_use]pub const fn with_fast_scroll_modifier(
self,
fast_scroll_modifier: FastScrollModifier
) -> Self
[src]
self,
fast_scroll_modifier: FastScrollModifier
) -> Self
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]
self,
fast_scroll_sensitivity: f32
) -> Self
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]
feature="ext"
only.Builder pattern setter for TerminalOptions::font_family
(accessible through TerminalOptions::font_family
and TerminalOptions::set_font_family
.
#[must_use]pub const fn with_font_size(self, font_size: f32) -> Self
[src]
feature="ext"
only.Builder pattern setter for TerminalOptions::font_size
.
#[must_use]pub const fn with_font_weight(self, font_weight: f32) -> Self
[src]
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]
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]
feature="ext"
only.Builder pattern setter for TerminalOptions::letter_spacing
.
#[must_use]pub const fn with_line_height(self, line_height: u16) -> Self
[src]
feature="ext"
only.Builder pattern setter for TerminalOptions::line_height
.
#[must_use]pub const fn with_link_tooltip_hover_duration(
self,
link_tooltip_hover_duration: u16
) -> Self
[src]
self,
link_tooltip_hover_duration: u16
) -> Self
feature="ext"
only.Builder pattern setter for TerminalOptions::link_tooltip_hover_duration
.
#[must_use]pub const fn with_log_level(self, log_level: LogLevel) -> Self
[src]
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]
self,
mac_option_click_forces_selection: bool
) -> Self
feature="ext"
only.Builder pattern setter for TerminalOptions::mac_option_click_forces_selection
.
#[must_use]pub const fn with_mac_option_is_meta(self, mac_option_is_meta: bool) -> Self
[src]
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]
self,
minimum_contrast_ratio: f32
) -> Self
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]
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]
self,
right_click_selects_word: bool
) -> Self
feature="ext"
only.Builder pattern setter for TerminalOptions::right_click_selects_word
.
#[must_use]pub const fn with_rows(self, rows: u16) -> Self
[src]
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]
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]
feature="ext"
only.Builder pattern setter for TerminalOptions::scroll_sensitivity
.
#[must_use]pub const fn with_scrollback(self, scrollback: u32) -> Self
[src]
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]
feature="ext"
only.Builder pattern setter for TerminalOptions::tab_stop_width
.
#[must_use]pub fn with_theme(self, theme: Theme) -> Self
[src]
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]
feature="ext"
only.Builder pattern setter for TerminalOptions::window_options
(accessible through TerminalOptions::window_options
and TerminalOptions::set_window_options
.
#[must_use]pub const fn with_windows_mode(self, windows_mode: bool) -> Self
[src]
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]
feature="ext"
only.Builder pattern setter for TerminalOptions::word_separator
(accessible through TerminalOptions::word_separator
and TerminalOptions::set_word_separator
.
Trait Implementations
impl Clone for TerminalOptions
fn clone(&self) -> TerminalOptions
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TerminalOptions
impl Default for TerminalOptions
fn default() -> TerminalOptions
impl From<TerminalOptions> for JsValue
[src]
fn from(value: TerminalOptions) -> Self
[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
unsafe fn from_abi(js: u32) -> Self
[src]
impl IntoWasmAbi for TerminalOptions
[src]
type Abi = u32
The wasm ABI type that this converts into when crossing the ABI boundary. Read more
fn into_abi(self) -> u32
[src]
impl OptionFromWasmAbi for TerminalOptions
[src]
impl OptionIntoWasmAbi for TerminalOptions
[src]
impl PartialEq<TerminalOptions> for TerminalOptions
fn eq(&self, other: &TerminalOptions) -> bool
fn ne(&self, other: &TerminalOptions) -> bool
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
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
[src]
impl RefMutFromWasmAbi for TerminalOptions
[src]
type Abi = u32
Same as RefFromWasmAbi::Abi
type Anchor = RefMut<'static, TerminalOptions>
Same as RefFromWasmAbi::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
[src]
T: IntoWasmAbi,
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,