mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
add Exit trait to modals
This commit is contained in:
parent
0cc8d88e5f
commit
33e5f47526
6 changed files with 67 additions and 33 deletions
|
|
@ -1,27 +1,29 @@
|
|||
use crate::core::*;
|
||||
|
||||
pub struct TransportToolbar {
|
||||
pub mode: bool,
|
||||
pub focused: bool,
|
||||
pub entered: bool,
|
||||
pub metronome: bool,
|
||||
pub mode: bool,
|
||||
pub focused: bool,
|
||||
pub entered: bool,
|
||||
/// Current sample rate, tempo, and PPQ.
|
||||
pub timebase: Arc<Timebase>,
|
||||
pub timebase: Arc<Timebase>,
|
||||
/// JACK transport handle.
|
||||
transport: Option<Transport>,
|
||||
transport: Option<Transport>,
|
||||
/// Quantization factor
|
||||
pub quant: usize,
|
||||
pub quant: usize,
|
||||
/// Current transport state
|
||||
pub playing: Option<TransportState>,
|
||||
pub playing: Option<TransportState>,
|
||||
/// Current position according to transport
|
||||
playhead: usize,
|
||||
playhead: usize,
|
||||
/// Global frame and usec at which playback started
|
||||
pub started: Option<(usize, usize)>,
|
||||
pub started: Option<(usize, usize)>,
|
||||
}
|
||||
|
||||
impl TransportToolbar {
|
||||
pub fn new (transport: Option<Transport>) -> Self {
|
||||
Self {
|
||||
transport,
|
||||
metronome: false,
|
||||
mode: false,
|
||||
focused: false,
|
||||
entered: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue