mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
Arranger -> Arrangement; ArrangerStandalone -> Arranger
This commit is contained in:
parent
11a66ee415
commit
a6b08a3249
5 changed files with 166 additions and 165 deletions
|
|
@ -1,7 +1,23 @@
|
|||
use crate::*;
|
||||
|
||||
/// Represents the tracks and scenes of the composition.
|
||||
/// Root level object for standalone `tek_arranger`
|
||||
pub struct Arranger<E: Engine> {
|
||||
/// Controls the JACK transport.
|
||||
pub transport: Option<Arc<RwLock<TransportToolbar<E>>>>,
|
||||
/// Contains all the sequencers.
|
||||
pub arrangement: Arrangement<E>,
|
||||
/// This allows the sequencer view to be moved or hidden.
|
||||
pub show_sequencer: Option<tek_core::Direction>,
|
||||
/// Index of currently focused component
|
||||
pub focus: usize,
|
||||
/// Focus target that passes events down to sequencer
|
||||
pub sequencer_proxy: SequencerProxy<E>,
|
||||
/// Slot for modal dialog displayed on top of app.
|
||||
pub modal: Option<Box<dyn ContentComponent<E>>>,
|
||||
}
|
||||
|
||||
/// Represents the tracks and scenes of the composition.
|
||||
pub struct Arrangement<E: Engine> {
|
||||
/// Name of arranger
|
||||
pub name: Arc<RwLock<String>>,
|
||||
/// Collection of tracks.
|
||||
|
|
@ -12,13 +28,11 @@ pub struct Arranger<E: Engine> {
|
|||
pub selected: ArrangerFocus,
|
||||
/// Display mode of arranger
|
||||
pub mode: ArrangerViewMode,
|
||||
/// Slot for modal dialog displayed on top of app.
|
||||
pub modal: Option<Box<dyn ContentComponent<E>>>,
|
||||
/// Whether the arranger is currently focused
|
||||
pub focused: bool
|
||||
}
|
||||
|
||||
impl<E: Engine> Arranger<E> {
|
||||
impl<E: Engine> Arrangement<E> {
|
||||
pub fn new (name: &str) -> Self {
|
||||
Self {
|
||||
name: Arc::new(RwLock::new(name.into())),
|
||||
|
|
@ -26,7 +40,6 @@ impl<E: Engine> Arranger<E> {
|
|||
selected: ArrangerFocus::Clip(0, 0),
|
||||
scenes: vec![],
|
||||
tracks: vec![],
|
||||
modal: None,
|
||||
focused: false
|
||||
}
|
||||
}
|
||||
|
|
@ -345,7 +358,7 @@ impl ArrangerViewMode {
|
|||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
pub struct VerticalArranger<'a, E: Engine>(
|
||||
pub &'a Arranger<E>, pub usize
|
||||
pub &'a Arrangement<E>, pub usize
|
||||
);
|
||||
pub struct VerticalArrangerGrid<'a>(
|
||||
pub u16, pub &'a [(usize, usize)], pub &'a [(usize, usize)]
|
||||
|
|
@ -357,7 +370,7 @@ pub struct VerticalArrangerCursor<'a>(
|
|||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
pub struct HorizontalArranger<'a, E: Engine>(
|
||||
pub &'a Arranger<E>
|
||||
pub &'a Arrangement<E>
|
||||
);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue