pub struct ProgramOptions {
pub bracketed_paste: bool,
pub mouse: Option<MouseTracking>,
pub prefer_grapheme_clusters: bool,
pub prefer_in_band_resize: bool,
pub prefer_synchronized_output: bool,
}Expand description
Defaults applied by Program::init_with.
Most fields take effect at init unconditionally. The three prefer_*
fields are the exception: they depend on capability detection, so they do
nothing until the terminal reports the matching mode as available. A
Program never probes on its own, so that report only arrives if you
call
query_capabilities and read the replies.
Without it these two fields stay dormant and the modes are never enabled.
Fields§
§bracketed_paste: boolEnable bracketed paste at init. Defaults to true.
mouse: Option<MouseTracking>Enable mouse tracking at init with the given MouseTracking extras
(see Program::enable_mouse). The request is emitted unconditionally;
terminals ignore modes they do not support and degrade gracefully.
Defaults to None (mouse tracking off).
prefer_grapheme_clusters: boolEnable grapheme-cluster mode (DEC mode 2027) once the terminal reports
it as available, so the terminal and the Screen measure text the
same way. Defaults to true.
Nothing is emitted until that report arrives, which requires
query_capabilities and a read loop.
Set to false to keep per-code-point measurement, or call
enable_grapheme_clusters
yourself to opt in without waiting for a report.
prefer_in_band_resize: boolEnable in-band resize notifications (DEC mode 2048) once the terminal
reports them as available, so resizes arrive on the event stream with
pixel dimensions instead of through SIGWINCH. Defaults to true.
Nothing is emitted until that report arrives, which requires
query_capabilities and a read loop.
Set to false to stay on the signal path, or call
enable_in_band_resize yourself to
opt in without waiting for a report.
prefer_synchronized_output: boolWrap each frame in synchronized-output markers (DEC mode 2026) once the
terminal reports them as available, so a frame is presented in one
piece instead of tearing. Defaults to true.
Unlike the two above this emits nothing of its own: synchronized output
is a render property, so adopting it only tells the Screen to start
bracketing frames. Set to false to keep frames unwrapped for the whole
session. Screen::set_synchronized_output drives the same property
directly, but the program cannot see a choice made there, so a call made
before the terminal’s first report is still overridden by adoption; use
this field when the decision has to hold from the start.
Trait Implementations§
Source§impl Clone for ProgramOptions
impl Clone for ProgramOptions
Source§fn clone(&self) -> ProgramOptions
fn clone(&self) -> ProgramOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more