mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
wip: draw phrase pool
This commit is contained in:
parent
a6b08a3249
commit
5b0feddbcb
4 changed files with 71 additions and 11 deletions
|
|
@ -14,12 +14,18 @@ pub struct Arranger<E: Engine> {
|
|||
pub sequencer_proxy: SequencerProxy<E>,
|
||||
/// Slot for modal dialog displayed on top of app.
|
||||
pub modal: Option<Box<dyn ContentComponent<E>>>,
|
||||
|
||||
|
||||
pub phrases: Arc<RwLock<PhrasePool<E>>>,
|
||||
pub editor: PhraseEditor<E>,
|
||||
}
|
||||
|
||||
/// Represents the tracks and scenes of the composition.
|
||||
pub struct Arrangement<E: Engine> {
|
||||
/// Name of arranger
|
||||
pub name: Arc<RwLock<String>>,
|
||||
/// Collection of phrases.
|
||||
pub phrases: Arc<RwLock<PhrasePool<E>>>,
|
||||
/// Collection of tracks.
|
||||
pub tracks: Vec<Sequencer<E>>,
|
||||
/// Collection of scenes.
|
||||
|
|
@ -33,11 +39,12 @@ pub struct Arrangement<E: Engine> {
|
|||
}
|
||||
|
||||
impl<E: Engine> Arrangement<E> {
|
||||
pub fn new (name: &str) -> Self {
|
||||
pub fn new (name: &str, phrases: &Arc<RwLock<PhrasePool<E>>>) -> Self {
|
||||
Self {
|
||||
name: Arc::new(RwLock::new(name.into())),
|
||||
mode: ArrangerViewMode::Vertical(2),
|
||||
selected: ArrangerFocus::Clip(0, 0),
|
||||
phrases: phrases.clone(),
|
||||
scenes: vec![],
|
||||
tracks: vec![],
|
||||
focused: false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue