add PgUp/PgDown in sequencer

This commit is contained in:
🪞👃🪞 2024-10-18 22:42:30 +03:00
parent 359afb2e8c
commit eccb355815
3 changed files with 17 additions and 10 deletions

View file

@ -2,19 +2,19 @@ use crate::*;
macro_rules! impl_axis_common { ($A:ident $T:ty) => {
impl $A<$T> {
pub fn start_inc (&mut self) -> $T {
#[inline] pub fn start_inc (&mut self) -> $T {
self.start += 1;
self.start
}
pub fn start_dec (&mut self) -> $T {
#[inline] pub fn start_dec (&mut self) -> $T {
self.start = self.start.saturating_sub(1);
self.start
}
pub fn point_inc (&mut self) -> Option<$T> {
#[inline] pub fn point_inc (&mut self) -> Option<$T> {
self.point = self.point.map(|p|p + 1);
self.point
}
pub fn point_dec (&mut self) -> Option<$T> {
#[inline] pub fn point_dec (&mut self) -> Option<$T> {
self.point = self.point.map(|p|p.saturating_sub(1));
self.point
}