|
|
|
@ -53,7 +53,7 @@ pub const fn ncinput_equal_p(n1: NcInput, n2: NcInput) -> bool {
|
|
|
|
|
/// New NcInput.
|
|
|
|
|
impl NcInput {
|
|
|
|
|
/// New empty NcInput.
|
|
|
|
|
pub const fn new() -> NcInput {
|
|
|
|
|
pub const fn new_empty() -> NcInput {
|
|
|
|
|
NcInput {
|
|
|
|
|
id: 0,
|
|
|
|
|
y: 0,
|
|
|
|
@ -65,6 +65,26 @@ impl NcInput {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// New NcInput.
|
|
|
|
|
pub const fn new(id: char) -> NcInput {
|
|
|
|
|
Self::with_all_args(id, None, None, false, false, false, 0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// New NcInput with alt key.
|
|
|
|
|
pub const fn with_alt(id: char) -> NcInput {
|
|
|
|
|
Self::with_all_args(id, None, None, true, false, false, 0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// New NcInput with shift key.
|
|
|
|
|
pub const fn with_shift(id: char) -> NcInput {
|
|
|
|
|
Self::with_all_args(id, None, None, false, true, false, 0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// New NcInput with ctrl key.
|
|
|
|
|
pub const fn with_ctrl(id: char) -> NcInput {
|
|
|
|
|
Self::with_all_args(id, None, None, false, false, true, 0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// New NcInput, expecting all the arguments.
|
|
|
|
|
pub const fn with_all_args(
|
|
|
|
|
id: char,
|
|
|
|
@ -97,21 +117,6 @@ impl NcInput {
|
|
|
|
|
seqnum,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// New NcInput with alt key.
|
|
|
|
|
pub const fn with_alt(id: char) -> NcInput {
|
|
|
|
|
Self::with_all_args(id, None, None, true, false, false, 0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// New NcInput with shift key.
|
|
|
|
|
pub const fn with_shift(id: char) -> NcInput {
|
|
|
|
|
Self::with_all_args(id, None, None, false, true, false, 0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// New NcInput with ctrl key.
|
|
|
|
|
pub const fn with_ctrl(id: char) -> NcInput {
|
|
|
|
|
Self::with_all_args(id, None, None, false, false, true, 0)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Is this [char] a Supplementary Private Use Area-B codepoint?
|
|
|
|
|