ansi_control_codes/
modes.rs

1//! Modes.
2//!
3//! The [ECMA-48][ecma-48] standard is intended to be applicable to a very large range of devices, in which there are
4//! variations. Some of these variations have been formalized in the form of modes. They deal with the way in which a
5//! device transmits, receives, processes, or images data. Each mode has two states. The reset state, and the set state.
6//!
7//! The states of the modes may be established explicitly in the data stream by the control functions SET MODE
8//! ([`SM`]) and RESET MODE ([`RM`]) or may be established
9//! by agreement between sender and recipient. In an implementation, some or all of the modes have one state only.
10//!
11//! To ensure data compatibility and ease of interchange with a variety of equipment the use of modes is deprecated. If
12//! modes have to be implemented for backward compatibility it is recommended that the reset state of the modes be the
13//! initial state. Otherwise, explicit agreements will have to be negotiated between sender and recipient, to the
14//! detriment of "blind" interchange.
15//!
16//! ## Usage
17//!
18//! Two possibilities exist to use modes.
19//!
20//! ### Directly invoking `SM` or `RM` Control Functions
21//!
22//! You can pass modes to the arguments of the control functions SET MODE ([`SM`]) and
23//! RESET MODE ([`RM`]).
24//!
25//! ```
26//! use ansi_control_codes::control_sequences;
27//! use ansi_control_codes::modes;
28//!
29//! // set the device component select mode to PRESENTATION.
30//! print!("{}", control_sequences::SM(vec![modes::DCSM]));
31//! // set the device component select mode to DATA.
32//! print!("{}", control_sequences::RM(vec![modes::Mode::DeviceComponentSelectMode]));
33//! ```
34//!
35//! ### Setting or Resetting Modes
36//!
37//! You can invoke the set and reset functions of a mode instead.
38//!
39//! ```
40//! use ansi_control_codes::modes;
41//!
42//! // set the device component select mode to PRESENTATION.
43//! print!("{}", modes::DCSM.set());
44//! // set the device component select mode to DATA.
45//! print!("{}", modes::Mode::DeviceComponentSelectMode.reset());
46//! ```
47//!
48//! [ecma-48]: https://www.ecma-international.org/publications-and-standards/standards/ecma-48/
49
50use crate::ControlFunction;
51
52/// Device Modes.
53#[derive(Debug, Clone, Copy, PartialEq, Eq)]
54pub enum Mode {
55    /// Guarded Area Transfer Mode `GATM`.
56    ///
57    /// ## Reset: Guard
58    ///
59    /// Only the contents of unguarded areas in an eligible area are transmitted or transferred.
60    ///
61    /// ## Set: All
62    ///
63    /// The contents of guarded as well as of unguarded areas in an eligible area are transmitted or transferred.
64    ///
65    /// ## Note
66    ///
67    /// No control functions are affected.
68    GuardedAreaTransferMode = 1,
69
70    /// Keyboard Action Mode `KAM`.
71    ///
72    /// ## Reset: Enabled
73    ///
74    /// All or part of the manual input facilities are enabled to be used.
75    ///
76    /// ## Set: Disabled
77    ///
78    /// All or part of the manual input facilities are disabled.
79    ///
80    /// ## Note
81    ///
82    /// No control functions are affected.
83    KeyboardActionMode,
84
85    /// Control Presentation Mode `CRM`.
86    ///
87    /// ## Reset: Control
88    ///
89    /// All control functions are performed as defined; the way formator functions are processed depends on the setting
90    /// of the FORMAT EFFECTOR ACTION MODE ([`FEAM`]). A device may choose to image the graphical representations of
91    /// control functions in addition to performing them.
92    ///
93    /// ## Set: Graphic
94    ///
95    /// All control functions, except RESET MODE ([`RM`]), are treated as graphic characters. A device may choose to
96    /// perform some control functions in addition to storing them and imaging their graphical representations.
97    ControlPresentationMode,
98
99    /// Insertion Replacement Mode `IRM`.
100    ///
101    /// ## Reset: Replace
102    ///
103    /// The graphic symbol of a graphic character or of a control function, for which a graphical representation is
104    /// required, replaces (or, depending upon the implementation, is combined with) the graphic symbol imaged at the
105    /// active presentation position.
106    ///
107    /// ## Set: Insert
108    ///
109    /// The graphic symbol of a graphic character or of a control function, for which a graphical representation is
110    /// required, is inserted at the active presentation position.
111    ///
112    /// ## Note
113    ///
114    /// Only control functions for which a graphical representation is required are affected.
115    InsertionReplacementMode,
116
117    /// Status Report Transfer Mode `SRTM`.
118    ///
119    /// ## Reset: Normal
120    ///
121    /// Status reports in the form of DEVICE CONTROL STRINGs ([`DCS`][crate::c1::DCS]) are not generated automatically.
122    ///
123    /// ## Set: Diagnostic
124    ///
125    /// Status reports in the form of DEVICE CONTROL STRINGs ([`DCS`][crate::c1::DCS]) are included in every data stream
126    /// transmitted or transferred.
127    ///
128    /// ## Note:
129    ///
130    /// No control functions are affected.
131    StatusReportTransferMode,
132
133    /// Erasure Mode `ERM`.
134    ///
135    /// ## Reset: Protect
136    ///
137    /// Only the contents of unprotected areas are affected by an erasure control function.
138    ///
139    /// ## Set: All
140    ///
141    /// The contents of protected as well as of unprotected areas are affected by an erasure control function.
142    ///
143    /// ## Note
144    ///
145    /// Control functions affected are: [`EA`][crate::control_sequences::EA], [`ECH`][crate::control_sequences::ECH],
146    /// [`ED`][crate::control_sequences::ED], [`EF`][crate::control_sequences::EF],
147    /// [`EL`][crate::control_sequences::EL].
148    ErasureMode,
149
150    /// Line Editing Mode `VEM`.
151    ///
152    /// ## Reset: Following
153    ///
154    /// If the DEVICE COMPONENT SELECT MODE ([`DCSM`]) is set to PRESENTATION, a line insertion causes the contents of
155    /// the active line (the line that contains the active presentation position) and of the following lines in the
156    /// presentation component to be shifted in the direction of the line progression; a line deletion causes the
157    /// contents of the lines following the active line to be shifted in the direction opposite to that of the line
158    /// progression.
159    ///
160    /// If the DEVICE COMPONENT SELECT MODE ([`DCSM`]) is set to DATA, a line insertion causes the contents of the
161    /// active line (the line that contains the active data position) and of the following lines in the data component
162    /// to be shifted in the direction of the line progression; a line deletion causes the contents of the lines
163    /// following the active line to be shifted in the direction opposite to that of the line progression.
164    ///
165    /// ## Set: Preceding
166    ///
167    /// If the DEVICE COMPONENT SELECT MODE ([`DCSM`]) is set to PRESENTATION, a line insertion causes the contents of
168    /// the active line (the line that contains the active presentation position) and of the preceding lines to be
169    /// shifted in the direction opposite to that of the line progression; a line deletion causes the contents of the
170    /// lines preceding the active line to be shifted in the direction of the line progression.
171    ///
172    /// If the DEVICE COMPONENT SELECT MODE ([`DCSM`]) is set to DATA, a line insertion causes the contents of the
173    /// active line (the line that contains the active data position) and of the preceding lines to be shifted in the
174    /// direction opposite to that of the line progression; a line deletion causes the contents of the lines preceding
175    /// the active line to be shifted in the direction of the line progression.
176    ///
177    /// ## Note
178    ///
179    /// Control functions affected are: [`DL`][crate::control_sequences::DL], [`IL`][crate::control_sequences::IL].
180    LineEditingMode,
181
182    /// Bi-directional support mode `BDSM`.
183    ///
184    /// ## Reset: Explicit
185    ///
186    /// Control functions are performed in the data component or in the presentation component, depending on the setting
187    /// of the DEVICE COMPONENT SELECT MODE ([`DeviceComponentSelectMode`][Mode::DeviceComponentSelectMode]).
188    ///
189    /// ## Set: Implicit
190    ///
191    /// Control functions are performed in the data component. All bi-directional aspects of data are handled by the
192    /// device itself.
193    BiDirectionalSupportMode,
194
195    /// Device Component Select Mode `DCSM`.
196    ///
197    /// ## Reset: Presentation
198    ///
199    /// Certain control functions are performed in the presentation component. The active presentation position (or the
200    /// active line, where applicable) in the presentation component is the reference position against which the
201    /// relevant control functions are performed.
202    ///
203    /// ## Set: Data
204    ///
205    /// Certain control functions are performed in the data component. The active data position (or the active line,
206    /// where applicable) in the data component is the reference position against which the relevant control functions
207    /// are performed.
208    ///
209    /// ## Note
210    ///
211    /// Control functions affected are: [`CPR`][crate::control_sequences::CPR], [`CR`][crate::c0::CR],
212    /// [`DCH`][crate::control_sequences::DCH], [`DL`][crate::control_sequences::DL],
213    /// [`EA`][crate::control_sequences::EA], [`ECH`][crate::control_sequences::ECH],
214    /// [`ED`][crate::control_sequences::ED], [`EF`][crate::control_sequences::EF],
215    /// [`EL`][crate::control_sequences::EF], [`ICH`][crate::control_sequences::ICH],
216    /// [`IL`][crate::control_sequences::IL], [`LF`][crate::c0::LF], [`NEL`][crate::c1::NEL], [`RI`][crate::c1::RI],
217    /// [`SLH`][crate::control_sequences::SLH], [`SLL`][crate::control_sequences::SLL],
218    /// [`SPH`][crate::control_sequences::SPH], [`SPL`][crate::control_sequences::SPH].
219    DeviceComponentSelectMode,
220
221    /// Character Editing Mode `HEM`.
222    ///
223    /// ## Reset: Following
224    ///
225    /// If the DEVICE COMPONENT SELECT MODE ([`DCSM`]) is set to PRESENTATION, a character insertion causes the contents
226    /// of the active presentation position and of the following character positions in the presentation component to be
227    /// shifted in the direction of the character path; a character deletion causes the contents of the character
228    /// positions following the active presentation position to be shifted in the direction opposite to that of the
229    /// character path
230    ///
231    /// If the DEVICE COMPONENT SELECT MODE ([`DCSM`]) is set to DATA, a character insertion causes the contents of the
232    /// active data position and of the following character positions in the data component to be shifted in the
233    /// direction of the character progression; a character deletion causes the contents of the character positions
234    /// following the active data position to be shifted in the direction opposite to that of the character progression.
235    ///
236    /// ## Set: Preceding
237    ///
238    /// If the DEVICE COMPONENT SELECT MODE ([`DCSM`]) is set to PRESENTATION, a character insertion causes the contents
239    /// of the active presentation position and of the following character positions in the presentation component to be
240    /// shifted in the direction opposite to that of the character path; a character deletion causes the contents of the
241    /// character positions following the active presentation position to be shifted in the direction of the character
242    /// path.
243    ///
244    /// If the DEVICE COMPONENT SELECT MODE ([`DCSM`]) is set to DATA, a character insertion causes the contents of the
245    /// active data position and of preceding character positions in the data component to be shifted in the direction
246    /// opposite to that of the character progression; a character deletion causes the contents of the character
247    /// positions preceding the active data position to be shifted in the direction of the character progression.
248    ///
249    /// ## Note
250    ///
251    /// Control functions affected are: [`DCH`][crate::control_sequences::DCH], [`ICH`][crate::control_sequences::ICH].
252    CharacterEditingMode,
253
254    /// Positioning Unit Mode `PUM`.
255    ///
256    /// ## Reset: Character
257    ///
258    /// The unit for numeric parameters of the positioning format effectors is one character position.
259    ///
260    /// ## Set: Size
261    ///
262    /// The unit for numeric parameters of the positioning format effectors is that established by the parameter value
263    /// of SELECT SIZE UNIT ([`SSU`][crate::control_sequences::SSU]).
264    ///
265    /// ## Note 1
266    ///
267    /// Control functions affected are: [`CUB`][crate::control_sequences::CUB], [`CUD`][crate::control_sequences::CUD],
268    /// [`CUF`][crate::control_sequences::CUF], [`CUU`][crate::control_sequences::CUU],
269    /// [`HPA`][crate::control_sequences::HPA], [`HPB`][crate::control_sequences::HPB],
270    /// [`HPR`][crate::control_sequences::HPR], [`HVP`][crate::control_sequences::HVP],
271    /// [`SLH`][crate::control_sequences::SLH], [`SLL`][crate::control_sequences::SLL],
272    /// [`SSU`][crate::control_sequences::SSU], [`VPA`][crate::control_sequences::VPA],
273    /// [`VPB`][crate::control_sequences::VPB], [`VPR`][crate::control_sequences::VPR].
274    ///
275    /// ## Note 2
276    ///
277    /// As the default parameter value of the control function SELECT SIZE UNIT (SSU) is CHARACTER, this mode is
278    /// redundant and should no longer be used.
279    ///
280    /// # Note 3
281    ///
282    /// The use of the POSITIONING UNIT MODE ([`PUM`]) is deprecated.
283    PositioningUnitMode,
284
285    /// Send/Receive Mode `SRM`.
286    ///
287    /// ## Reset: Monitor
288    ///
289    /// Data which are locally entered are immediately imaged.
290    ///
291    /// ## Set: Simultaneous
292    ///
293    /// Local input facilities are logically disconnected from the output mechanism; only data which are sent to the
294    /// device are imaged.
295    ///
296    /// ## Note
297    ///
298    /// No control functions are affected.
299    SendReceiveMode,
300
301    /// Format Effector Action Mode `FEAM`.
302    ///
303    /// ## Reset: Execute
304    ///
305    /// Formator functions are performed immediately and may be stored in addition to being performed.
306    ///
307    /// ## Set: Store
308    ///
309    /// Formator functions are stored but not performed. In this case, the specified action is intended to be performed
310    /// by another device when the associated data are transmitted or transferred.
311    ///
312    /// ## Note
313    ///
314    /// Control functions affected are: [`BPH`][crate::c1::BPH], [`BS`][crate::c0::BS], [`CR`][crate::c0::CR],
315    /// [`DTA`][crate::control_sequences::DTA], [`FF`][crate::c0::FF], [`FNT`][crate::control_sequences::FNT],
316    /// [`GCC`][crate::control_sequences::GCC], [`GSM`][crate::control_sequences::GSM],
317    /// [`GSS`][crate::control_sequences::GSS], [`HPA`][crate::control_sequences::HPA],
318    /// [`HPB`][crate::control_sequences::HPB], [`HPR`][crate::control_sequences::HPR],
319    /// [`HT`][crate::c0::HT], [`HTJ`][crate::c1::HTJ], [`HTS`][crate::c1::HTS], [`HVP`][crate::control_sequences::HVP],
320    /// [`JFY`][crate::control_sequences::JFY], [`NEL`][crate::c1::NEL], [`PEC`][crate::control_sequences::PEC],
321    /// [`PFS`][crate::control_sequences::PFS], [`PLD`][crate::c1::PLD], [`PLU`][crate::c1::PLU],
322    /// [`PPA`][crate::control_sequences::PPA], [`PPB`][crate::control_sequences::PPB],
323    /// [`PPR`][crate::control_sequences::PPR], [`PTX`][crate::control_sequences::PTX],
324    /// [`QUAD`][crate::control_sequences::QUAD], [`RI`][crate::c1::RI], [`SACS`][crate::control_sequences::SACS],
325    /// [`SAPV`][crate::control_sequences::SAPV], [`SCO`][crate::control_sequences::SCO],
326    /// [`SCS`][crate::control_sequences::SCS], [`SGR`][crate::control_sequences::SGR],
327    /// [`SHS`][crate::control_sequences::SHS], [`SLH`][crate::control_sequences::SLH],
328    /// [`SLL`][crate::control_sequences::SLL], [`SLS`][crate::control_sequences::SLS],
329    /// [`SPD`][crate::control_sequences::SPD], [`SPI`][crate::control_sequences::SPI],
330    /// [`SPQR`][crate::control_sequences::SPQR], [`SRCS`][crate::control_sequences::SRCS],
331    /// [`SRS`][crate::control_sequences::SRS], [`SSU`][crate::control_sequences::SSU],
332    /// [`SSW`][crate::control_sequences::SSW], [`STAB`][crate::control_sequences::STAB],
333    /// [`SVS`][crate::control_sequences::SVS], [`TAC`][crate::control_sequences::TAC],
334    /// [`TALE`][crate::control_sequences::TALE], [`TATE`][crate::control_sequences::TATE],
335    /// [`TBC`][crate::control_sequences::TBC], [`TCC`][crate::control_sequences::TCC],
336    /// [`TSS`][crate::control_sequences::TSS], [`VPA`][crate::control_sequences::VPA],
337    /// [`VPB`][crate::control_sequences::VPB], [`VPR`][crate::control_sequences::VPR],
338    /// [`VTS`][crate::c1::VTS].
339    FormatEffectorActionMode,
340
341    /// Format Effector Transfer Mode `FETM`.
342    ///
343    /// ## Reset: Insert
344    ///
345    /// Formator functions may be inserted in a data stream to be transmitted or in data to be transferred to an
346    /// auxiliary input/output device.
347    ///
348    /// ## Set: Exclude
349    ///
350    /// No formator functions other than those received while the FORMAT EFFECTOR ACTION MODE [`FEAM`] is set to
351    /// STORE are included in a transmitted data stream or in data transferred to an auxiliary input/output device.
352    ///
353    /// ## Note
354    ///
355    /// No control functions are affected.
356    FormatEffectorTransferMode,
357
358    /// Multiple Area Transfer Mode `MATM`.
359    ///
360    /// ## Reset: Single
361    ///
362    /// Only the contents of the selected area which contains the active presentation position are eligible to be
363    /// transmitted or transferred
364    ///
365    /// ## Set: Multiple
366    ///
367    /// The contents of all selected areas are eligible to be transmitted or transferred.
368    ///
369    /// ## Note
370    ///
371    /// No control functions are affected.
372    MultipleAreaTransferMode,
373
374    /// Transfer Termination Mode `TTM`.
375    ///
376    /// ## Reset: Cursor
377    ///
378    /// Only the contents of the character positions preceding the active presentation position in the presentation
379    /// component are eligible to be transmitted or transferred.
380    ///
381    /// ## Set: All
382    ///
383    /// The contents of character positions preceding, following, and at the active presentation position are eligible
384    /// to be transmitted or transferred.
385    ///
386    /// ## Note
387    ///
388    /// No control functions are affected.
389    TransferTerminationMode,
390
391    /// Selected Area Transfer Mode `SATM`.
392    ///
393    /// ## Reset: Select
394    ///
395    /// Only the contents of selected areas are eligible to be transmitted or transferred.
396    ///
397    /// ## Set: All
398    ///
399    /// The contents of all character positions, irrespective of any explicitly defined selected areas, are eligible to
400    /// be transmitted or transferred.
401    ///
402    /// ## Note
403    ///
404    /// No control functions are affected.
405    SelectedAreaTransferMode,
406
407    /// Tabulation Stop Mode `TSM`.
408    ///
409    /// ## Reset: Multiple
410    ///
411    /// Character tabulation stops in the presentation component are set or cleared in the active line (the line that
412    /// contains the active presentation position) and in the corresponding character positions of the preceding lines
413    /// and of the following lines.
414    ///
415    /// ## Set: Single
416    ///
417    /// Character tabulation stops in the presentation component are set or cleared in the active line only.
418    ///
419    /// ## Note
420    ///
421    /// Control functions affected are: [`CTC`][crate::control_sequences::CTC], [`DL`][crate::control_sequences::DL],
422    /// [`HTS`][crate::c1::HTS], [`IL`][crate::control_sequences::IL], [`TBC`][crate::control_sequences::TBC].
423    TabulationStopMode,
424
425    /// Graphic Rendition Combination Mode `GRCM`.
426    ///
427    /// ## Reset: Replacing
428    ///
429    /// Each occurrence of the control function SELECT GRAPHIC RENDITION ([`SGR`][crate::control_sequences::SGR])
430    /// cancels the effect of any preceding occurrence. Any graphic rendition aspects that are to remain unchanged after
431    /// an occurrence of [`SGR`][crate::control_sequences::SGR] have to be re-specified by that
432    /// [`SGR`][crate::control_sequences::SGR].
433    ///
434    /// ## Set: Cumulative
435    ///
436    /// Each occurrence of the control function SELECT GRAPHIC RENDITION ([`SGR`][crate::control_sequences::SGR]) causes
437    /// only those graphic rendition aspects to be changed that are specified by that
438    /// [`SGR`][crate::control_sequences::SGR]. All other graphic rendition aspects remain unchanged.
439    ///
440    /// ## Note
441    ///
442    /// Control function affected is [`SGR`][crate::control_sequences::SGR].
443    GraphicRenditionCombinationMode = 21,
444
445    /// Zero Default Mode `ZDM`.
446    ///
447    /// ## Reset: Zero
448    ///
449    /// A parameter value of 0 of a control function means the number `0`.
450    ///
451    /// ## Set: Default
452    ///
453    /// A parameter value of `0` represents a default parameter value which may be different from `0`.
454    ///
455    /// ## Note 1
456    ///
457    /// This mode was provided for implementations of the first edition of this Standard which specified that "an empty
458    /// parameter sub-string or a parameter sub-string which consists of bit combinations `03/00` only represents a
459    /// default value which depends on the control function".
460    ///
461    /// For numeric parameters which are expressed in units established by the parameter value of SELECT SIZE UNIT
462    /// ([`SSU`][crate::control_sequences::SSU]) the value `0` could then be specified. For numeric parameters which are
463    /// effectively repeat counts, a `0` parameter value corresponded to a "no-op". In either instance, non-negative
464    /// computed numeric parameter values might have been used without treating `0` as a special (unusable) case.
465    ///
466    /// Where an explicit parameter value was not used, implementers were urged to omit a parameter value (use an empty
467    /// parameter sub-string) to imply a default parameter value.
468    ///
469    /// Control functions affected are: [`CBT`][crate::control_sequences::CBT], [`CHA`][crate::control_sequences::CHA],
470    /// [`CHT`][crate::control_sequences::CHT], [`CNL`][crate::control_sequences::CNL],
471    /// [`CPL`][crate::control_sequences::CPL], [`CPR`][crate::control_sequences::CPR],
472    /// [`CUB`][crate::control_sequences::CUB], [`CUD`][crate::control_sequences::CUD],
473    /// [`CUF`][crate::control_sequences::CUF], [`CUP`][crate::control_sequences::CUP],
474    /// [`CUU`][crate::control_sequences::CUU], [`CVT`][crate::control_sequences::CVT],
475    /// [`DCH`][crate::control_sequences::DCH], [`DL`][crate::control_sequences::DL],
476    /// [`ECH`][crate::control_sequences::ECH], [`GSM`][crate::control_sequences::GSM],
477    /// [`HPA`][crate::control_sequences::HPA], [`HPB`][crate::control_sequences::HPB],
478    /// [`HPR`][crate::control_sequences::HPR], [`HVP`][crate::control_sequences::HVP],
479    /// [`ICH`][crate::control_sequences::ICH], [`IL`][crate::control_sequences::IL],
480    /// [`NP`][crate::control_sequences::NP], [`PP`][crate::control_sequences::PP],
481    /// [`PPA`][crate::control_sequences::PPA], [`PPB`][crate::control_sequences::PPB],
482    /// [`PPR`][crate::control_sequences::PPR], [`REP`][crate::control_sequences::REP],
483    /// [`SD`][crate::control_sequences::SD], [`SL`][crate::control_sequences::SL],
484    /// [`SR`][crate::control_sequences::SR], [`SU`][crate::control_sequences::SU],
485    /// [`TCC`][crate::control_sequences::TCC], [`VPA`][crate::control_sequences::VPA],
486    /// [`VPB`][crate::control_sequences::VPB], [`VPR`][crate::control_sequences::VPR].
487    ///
488    /// ## Note 2
489    ///
490    /// Since the publication of the first edition of this Standard in 1976 almost 15 years have expired. The use of
491    /// this mode should no longer be required because the definition of default parameter values has been changed.
492    ///
493    /// # Note 3
494    ///
495    /// The use of the ZERO DEFAULT MODE ([`ZDM`]) is deprecated.
496    ZeroDefaultMode,
497}
498
499use crate::control_sequences::{RM, SM};
500impl Mode {
501    /// Set the mode.
502    pub fn set(self) -> ControlFunction<'static> {
503        SM(vec![self])
504    }
505
506    /// Reset the mode.
507    pub fn reset(self) -> ControlFunction<'static> {
508        RM(vec![self])
509    }
510}
511
512/// Guarded Area Transfer Mode `GATM`.
513///
514/// See [`Mode::GuardedAreaTransferMode`].
515pub const GATM: Mode = Mode::GuardedAreaTransferMode;
516
517/// Keyboard Action Mode `KAM`.
518///
519/// See [`Mode::KeyboardActionMode`].
520pub const KAM: Mode = Mode::KeyboardActionMode;
521
522/// Control Presentation Mode `CRM`.
523///
524/// See [`Mode::ControlPresentationMode`].
525pub const CRM: Mode = Mode::ControlPresentationMode;
526
527/// Insertion Replacement Mode `IRM`.
528///
529/// See [`Mode::InsertionReplacementMode`].
530pub const IRM: Mode = Mode::InsertionReplacementMode;
531
532/// Status Report Transfer Mode `SRTM`.
533///
534/// See [`Mode::StatusReportTransferMode`].
535pub const SRTM: Mode = Mode::StatusReportTransferMode;
536
537/// Erasure Mode `ERM`.
538///
539/// See [`Mode::ErasureMode`].
540pub const ERM: Mode = Mode::ErasureMode;
541
542/// Line Editing Mode `VEM`.
543///
544/// See [`Mode::LineEditingMode`].
545pub const VEM: Mode = Mode::LineEditingMode;
546
547/// Bi-directional support mode `BDSM`.
548///
549/// See [`Mode::BiDirectionalSupportMode`].
550pub const BDSM: Mode = Mode::BiDirectionalSupportMode;
551
552/// Device Component Select Mode `DCSM`.
553///
554/// See [`Mode::DeviceComponentSelectMode`].
555pub const DCSM: Mode = Mode::DeviceComponentSelectMode;
556
557/// Character Editing Mode `HEM`.
558///
559/// See [`Mode::CharacterEditingMode`].
560pub const HEM: Mode = Mode::CharacterEditingMode;
561
562/// Positioning Unit Mode `PUM`.
563///
564/// See [`Mode::PositioningUnitMode`].
565pub const PUM: Mode = Mode::PositioningUnitMode;
566
567/// Send/Receive Mode `SRM`.
568///
569/// See [`Mode::SendReceiveMode`].
570pub const SRM: Mode = Mode::SendReceiveMode;
571
572/// Format Effector Action Mode `FEAM`.
573///
574/// See [`Mode::FormatEffectorActionMode`].
575pub const FEAM: Mode = Mode::FormatEffectorActionMode;
576
577/// Format Effector Transfer Mode `FETM`.
578///
579/// See [`Mode::FormatEffectorTransferMode`].
580pub const FETM: Mode = Mode::FormatEffectorTransferMode;
581
582/// Multiple Area Transfer Mode `MATM`.
583///
584/// See [`Mode::MultipleAreaTransferMode`].
585pub const MATM: Mode = Mode::MultipleAreaTransferMode;
586
587/// Transfer Termination Mode `TTM`.
588///
589/// See [`Mode::TransferTerminationMode`].
590pub const TTM: Mode = Mode::TransferTerminationMode;
591
592/// Selected Area Transfer Mode `SATM`.
593///
594/// See [`Mode::SelectedAreaTransferMode`].
595pub const SATM: Mode = Mode::SelectedAreaTransferMode;
596
597/// Tabulation Stop Mode `TSM`.
598///
599/// See [`Mode::TabulationStopMode`].
600pub const TSM: Mode = Mode::TabulationStopMode;
601
602/// Graphic Rendition Combination Mode `GRCM`.
603///
604/// See [`Mode::GraphicRenditionCombinationMode`].
605pub const GRCM: Mode = Mode::GraphicRenditionCombinationMode;
606
607/// Zero Default Mode `ZDM`.
608///
609/// See [`Mode::ZeroDefaultMode`].
610pub const ZDM: Mode = Mode::ZeroDefaultMode;