pub struct Mode { /* private fields */ }
Expand description
A struct representing an SM
or an RM
CSI function.
§Examples
use coded_chars::mode::mode;
// Set a mode (EXPLICIT-BDSM mode)
println!("{}", mode().bi_directional_support().set());
// Reset a mode (IMPLICIT-BDSM mode)
println!("{}", mode().bi_directional_support().reset());
Implementations§
Source§impl Mode
impl Mode
pub fn new() -> Self
Sourcepub fn guarded_area_transfer(&mut self) -> &mut Self
pub fn guarded_area_transfer(&mut self) -> &mut Self
Sourcepub fn keyboard_action(&mut self) -> &mut Self
pub fn keyboard_action(&mut self) -> &mut Self
Sourcepub fn control_representation(&mut self) -> &mut Self
pub fn control_representation(&mut self) -> &mut Self
§CRM - Control representation mode
- CONTROL (set) : All control functions are performed as defined; the way formator functions are processed depends on the setting of the FORMAT EFFECTOR ACTION MODE (FEAM). A device may choose to image the graphical representations of control functions in addition to performing them.
- GRAPHIC (reset) : All control functions, except RESET MODE (RM), are treated as graphic characters. A device may choose to perform some control functions in addition to storing them and imaging their graphical representations.
§Note
All control functions, except RM, are affected.
Sourcepub fn insertion_replacement(&mut self) -> &mut Self
pub fn insertion_replacement(&mut self) -> &mut Self
§IRM - Insertion replacement mode
- REPLACE (set) : The graphic symbol of a graphic character or of a control function, for which a graphical representation is required, replaces (or, depending upon the implementation, is combined with) the graphic symbol imaged at the active presentation position.
- INSERT (reset) : The graphic symbol of a graphic character or of a control function, for which a graphical representation is required, is inserted at the active presentation position.
§Note
Only control functions for which a graphical representation is required are affected.
Sourcepub fn status_report_transfer(&mut self) -> &mut Self
pub fn status_report_transfer(&mut self) -> &mut Self
§SRTM - Status report transfer mode
- NORMAL (set) : Status reports in the form of DEVICE CONTROL STRINGs (DCS) are not generated automatically.
- DIAGNOSTIC (reset) : Status reports in the form of DEVICE CONTROL STRINGs (DCS) are included in every data stream transmitted or transferred.
§Note
No control functions are affected.
Sourcepub fn erasure(&mut self) -> &mut Self
pub fn erasure(&mut self) -> &mut Self
Sourcepub fn line_editing(&mut self) -> &mut Self
pub fn line_editing(&mut self) -> &mut Self
§VEM - Line editing mode
- FOLLOWING (set) :
- If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, a line insertion causes the contents of the active line (the line that contains the active presentation position) and of the following lines in the presentation component to be shifted in the direction of the line progression; a line deletion causes the contents of the lines following the active line to be shifted in the direction opposite to that of the line progression.
- If the DEVICE COMPONENT SELECT MODE (DCSM) is set to DATA, a line insertion causes the contents of the active line (the line that contains the active data position) and of the following lines in the data component to be shifted in the direction of the line progression; a line deletion causes the contents of the lines following the active line to be shifted in the direction opposite to that of the line progression.
- PRECEDING (reset) :
- If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, a line insertion causes the contents of the active line (the line that contains the active presentation position) and of the preceding lines to be shifted in the direction opposite to that of the line progression; a line deletion causes the contents of the lines preceding the active line to be shifted in the direction of the line progression.
- If the DEVICE COMPONENT SELECT MODE (DCSM) is set to DATA, a line insertion causes the contents of the active line (the line that contains the active data position) and of the preceding lines to be shifted in the direction opposite to that of the line progression; a line deletion causes the contents of the lines preceding the active line to be shifted in the direction of the line progression.
§Note
Control functions affected are: DL, IL.
Sourcepub fn bi_directional_support(&mut self) -> &mut Self
pub fn bi_directional_support(&mut self) -> &mut Self
§BDSM - Bidirectional support mode
- EXPLICIT (set) : Control functions are performed in the data component or in the presentation component, depending on the setting of the DEVICE COMPONENT SELECT MODE (DCSM).
- IMPLICIT (reset) : Control functions are performed in the data component. All bi-directional aspects of data are handled by the device itself.
Sourcepub fn device_component_select(&mut self) -> &mut Self
pub fn device_component_select(&mut self) -> &mut Self
§DCSM – Device component select mode
- PRESENTATION (set) : Certain control functions are performed in the presentation component. The active presentation position (or the active line, where applicable) in the presentation component is the reference position against which the relevant control functions are performed.
- DATA (reset) : Certain control functions are performed in the data component. The active data position (or the active line, where applicable) in the data component is the reference position against which the relevant control functions are performed
§Note
Control functions affected are: CPR, CR, DCH, DL, EA, ECH, ED, EF, EL, ICH, IL, LF, NEL, RI, SLH, SLL, SPH, SPL.
- crate::cursor::position_report
- crate::format::CR,
- crate::editor::delete_char,
- crate::editor::delete_line,
- crate::editor::erase,
- crate::editor::erase_char
- crate::editor::erase_in_page
- crate::editor::erase_in_field
- crate::editor::erase_in_line
- crate::editor::insert_char
- crate::editor::insert_line
- crate::format::LF,
- crate::format::NEL,
- crate::format::RI,
- crate::presentation::line_home,
- crate::presentation::line_limit,
- crate::presentation::page_home,
- crate::presentation::page_limit.
Sourcepub fn character_editing(&mut self) -> &mut Self
pub fn character_editing(&mut self) -> &mut Self
§HEM - Character editing mode
- FOLLOWING (set) :
- If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, a character insertion causes the contents of the active presentation position and of the following character positions in the presentation component to be shifted in the direction of the character path; a character deletion causes the contents of the character positions following the active presentation position to be shifted in the direction opposite to that of the character path.
- If the DEVICE COMPONENT SELECT MODE (DCSM) is set to DATA, a character insertion causes the contents of the active data position and of the following character positions in the data component to be shifted in the direction of the character progression; a character deletion causes the contents of the character positions following the active data position to be shifted in the direction opposite to that of the character progression.
- PRECEDING (reset) :
- If the DEVICE COMPONENT SELECT MODE (DCSM) is set to PRESENTATION, a character insertion causes the contents of the active presentation position and of the following character positions in the presentation component to be shifted in the direction opposite to that of the character path; a character deletion causes the contents of the character positions following the active presentation position to be shifted in the direction of the character path.
- If the DEVICE COMPONENT SELECT MODE (DCSM) is set to DATA, a character insertion causes the contents of the active data position and of preceding character positions in the data component to be shifted in the direction opposite to that of the character progression; a character deletion causes the contents of the character positions preceding the active data position to be shifted in the direction of the character progression.
§Note
Control functions affected are: DCH, ICH.
Sourcepub fn send_receive(&mut self) -> &mut Self
pub fn send_receive(&mut self) -> &mut Self
Sourcepub fn format_effector_action(&mut self) -> &mut Self
pub fn format_effector_action(&mut self) -> &mut Self
§FEAM - Format effector action mode
- EXECUTE (set) : Formator functions are performed immediately and may be stored in addition to being performed.
- STORE (reset) :Formator functions are stored but not performed. In this case, the specified action is intended to be performed by another device when the associated data are transmitted or transferred.
§Note
Control functions affected are: BPH, BS, CR, DTA, FF, FNT, GCC, GSM, GSS, HPA, HPB, HPR, HT, HTJ, HTS, HVP, JFY, NEL, PEC, PFS, PLD, PLU, PPA, PPB, PPR, PTX, QUAD, RI, SACS, SAPV, SCO, SCS, SGR, SHS, SLH, SLL, SLS, SPD, SPI, SPQR, SRCS, SRS, SSU, SSW, STAB, SVS, TAC, TALE, TATE, TBC, TCC, TSS, VPA, VPB, VPR, VTS.
Sourcepub fn format_effector_transfer(&mut self) -> &mut Self
pub fn format_effector_transfer(&mut self) -> &mut Self
§FETM - Format effector transfer mode
- INSERT (set) : Formator functions may be inserted in a data stream to be transmitted or in data to be transferred to an auxiliary input/output device.
- EXCLUDE (reset) : No formator functions other than those received while the FORMAT EFFECTOR ACTION MODE (FEAM) is set to STORE are included in a transmitted data stream or in data transferred to an auxiliary input/output device.
§Note
No control functions are affected.
Sourcepub fn multiple_area_transfer(&mut self) -> &mut Self
pub fn multiple_area_transfer(&mut self) -> &mut Self
§MATM - Multiple area transfer mode
- SINGLE (set) : Only the contents of the selected area which contains the active presentation position are eligible to be transmitted or transferred.
- MULTIPLE (reset) : The contents of all selected areas are eligible to be transmitted or transferred.
§Note
No control functions are affected.
Sourcepub fn transfert_termination(&mut self) -> &mut Self
pub fn transfert_termination(&mut self) -> &mut Self
§TTM - Transfer termination mode
- CURSOR (set) : Only the contents of the character positions preceding the active presentation position in the presentation component are eligible to be transmitted or transferred.
- ALL (reset) : The contents of character positions preceding, following, and at the active presentation position are eligible to be transmitted or transferred.
§Note
No control functions are affected.
Sourcepub fn selected_area_transfer(&mut self) -> &mut Self
pub fn selected_area_transfer(&mut self) -> &mut Self
§SATM - Selected area transfer mode
- SELECT (set) : Only the contents of selected areas are eligible to be transmitted or transferred.
- ALL (reset) : The contents of all character positions, irrespective of any explicitly defined selected areas, are eligible to be transmitted or transferred.
§Note
No control functions are affected.
Sourcepub fn tabulation_stop(&mut self) -> &mut Self
pub fn tabulation_stop(&mut self) -> &mut Self
§TSM - Tabulation stop mode
- MULTIPLE (set) : Character tabulation stops in the presentation component are set or cleared in the active line (the line that contains the active presentation position) and in the corresponding character positions of the preceding lines and of the following lines.
- SINGLE (reset) : Character tabulation stops in the presentation component are set or cleared in the active line only.
§Note
Control functions affected are: CTC, DL, HTS, IL, TBC.
Sourcepub fn graphic_rendition_combination(&mut self) -> &mut Self
pub fn graphic_rendition_combination(&mut self) -> &mut Self
§GRCM - Graphic rendition combination mode
- REPLACING (set) : Each occurrence of the control function SELECT GRAPHIC RENDITION (SGR) cancels the effect of any preceding occurrence. Any graphic rendition aspects that are to remain unchanged after an occurrence of SGR have to be re-specified by that SGR.
- CUMULATIVE (reset) : Each occurrence of the control function SELECT GRAPHIC RENDITION (SGR) causes only those graphic rendition aspects to be changed that are specified by that SGR. All other graphic rendition aspects remain unchanged.
§Note
Control function affected is SGR : crate::presentation::select_graphic.
Sourcepub fn set(&self) -> ControlSequence
pub fn set(&self) -> ControlSequence
§SM - Set Mode
SM causes the modes of the receiving device to be set as specified.
Sourcepub fn reset(&self) -> ControlSequence
pub fn reset(&self) -> ControlSequence
§RM - Reset Mode
RM causes the modes of the receiving device to be reset as specified.