mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
wip(p62,e21)
This commit is contained in:
parent
76da19d9c6
commit
5673dd7e8a
14 changed files with 170 additions and 190 deletions
|
|
@ -68,27 +68,6 @@ impl TransportFocus {
|
|||
}
|
||||
}
|
||||
|
||||
//impl HasFocus for TransportTui {
|
||||
//type Item = TransportFocus;
|
||||
//}
|
||||
|
||||
//impl FocusEnter for TransportTui {
|
||||
//type Item = TransportFocus;
|
||||
//fn focus_enter (&mut self) {
|
||||
//self.entered = true;
|
||||
//}
|
||||
//fn focus_exit (&mut self) {
|
||||
//self.entered = false;
|
||||
//}
|
||||
//fn focus_entered (&self) -> Option<Self::Item> {
|
||||
//if self.entered {
|
||||
//Some(self.focused())
|
||||
//} else {
|
||||
//None
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
|
||||
impl FocusGrid for TransportTui {
|
||||
type Item = TransportFocus;
|
||||
fn focus_cursor (&self) -> (usize, usize) {
|
||||
|
|
@ -113,29 +92,29 @@ impl FocusGrid for TransportTui {
|
|||
//type Item = SequencerFocus;
|
||||
//}
|
||||
|
||||
impl FocusEnter for SequencerTui {
|
||||
type Item = SequencerFocus;
|
||||
fn focus_enter (&mut self) {
|
||||
let focused = self.focused();
|
||||
if !self.entered {
|
||||
self.entered = true;
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
fn focus_exit (&mut self) {
|
||||
if self.entered {
|
||||
self.entered = false;
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
fn focus_entered (&self) -> Option<Self::Item> {
|
||||
if self.entered {
|
||||
Some(self.focused())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
//impl FocusEnter for SequencerTui {
|
||||
//type Item = SequencerFocus;
|
||||
//fn focus_enter (&mut self) {
|
||||
//let focused = self.focused();
|
||||
//if !self.entered {
|
||||
//self.entered = true;
|
||||
//// TODO
|
||||
//}
|
||||
//}
|
||||
//fn focus_exit (&mut self) {
|
||||
//if self.entered {
|
||||
//self.entered = false;
|
||||
//// TODO
|
||||
//}
|
||||
//}
|
||||
//fn focus_entered (&self) -> Option<Self::Item> {
|
||||
//if self.entered {
|
||||
//Some(self.focused())
|
||||
//} else {
|
||||
//None
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
|
||||
impl FocusGrid for SequencerTui {
|
||||
type Item = SequencerFocus;
|
||||
|
|
@ -158,34 +137,34 @@ impl FocusGrid for SequencerTui {
|
|||
}
|
||||
}
|
||||
|
||||
impl FocusEnter for ArrangerTui {
|
||||
type Item = ArrangerFocus;
|
||||
fn focus_enter (&mut self) {
|
||||
self.entered = true;
|
||||
//use ArrangerFocus::*;
|
||||
//let focused = self.focused();
|
||||
//if !self.entered {
|
||||
//self.entered = focused == Arranger;
|
||||
//self.editor.entered = focused == PhraseEditor;
|
||||
//self.phrases.entered = focused == Phrases;
|
||||
//}
|
||||
}
|
||||
fn focus_exit (&mut self) {
|
||||
self.entered = false;
|
||||
//impl FocusEnter for ArrangerTui {
|
||||
//type Item = ArrangerFocus;
|
||||
//fn focus_enter (&mut self) {
|
||||
//self.entered = true;
|
||||
////use ArrangerFocus::*;
|
||||
////let focused = self.focused();
|
||||
////if !self.entered {
|
||||
////self.entered = focused == Arranger;
|
||||
////self.editor.entered = focused == PhraseEditor;
|
||||
////self.phrases.entered = focused == Phrases;
|
||||
////}
|
||||
//}
|
||||
//fn focus_exit (&mut self) {
|
||||
//self.entered = false;
|
||||
////if self.entered {
|
||||
////self.entered = false;
|
||||
////self.editor.entered = false;
|
||||
////self.phrases.entered = false;
|
||||
////}
|
||||
//}
|
||||
//fn focus_entered (&self) -> Option<Self::Item> {
|
||||
//if self.entered {
|
||||
//self.entered = false;
|
||||
//self.editor.entered = false;
|
||||
//self.phrases.entered = false;
|
||||
//Some(self.focused())
|
||||
//} else {
|
||||
//None
|
||||
//}
|
||||
}
|
||||
fn focus_entered (&self) -> Option<Self::Item> {
|
||||
if self.entered {
|
||||
Some(self.focused())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
//}
|
||||
|
||||
/// Focus layout of arranger app
|
||||
impl FocusGrid for ArrangerTui {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue