mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-10 21:56:42 +01:00
wip: focus refactor, e13
This commit is contained in:
parent
364769a2e0
commit
6127aa4b30
9 changed files with 110 additions and 65 deletions
|
|
@ -34,11 +34,8 @@ pub enum SequencerCommand {
|
|||
Editor(PhraseCommand),
|
||||
}
|
||||
|
||||
impl<T> Command<T> for SequencerCommand
|
||||
where
|
||||
T: ClockApi + PhrasesControl + PhraseEditorControl + FocusGrid<Item = SequencerFocus>
|
||||
{
|
||||
fn execute (self, state: &mut T) -> Perhaps<Self> {
|
||||
impl Command<SequencerTui> for SequencerCommand {
|
||||
fn execute (self, state: &mut SequencerTui) -> Perhaps<Self> {
|
||||
use SequencerCommand::*;
|
||||
Ok(match self {
|
||||
Focus(cmd) => cmd.execute(state)?.map(Focus),
|
||||
|
|
@ -258,7 +255,7 @@ pub enum PhraseCommand {
|
|||
TimeZoomSet(usize),
|
||||
}
|
||||
|
||||
impl<T: PhraseEditorControl> Command<T> for PhraseCommand {
|
||||
impl<T: PhraseEditorControl + HasEnter> Command<T> for PhraseCommand {
|
||||
fn execute (self, state: &mut T) -> Perhaps<Self> {
|
||||
use PhraseCommand::*;
|
||||
Ok(match self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue