app trait impls

This commit is contained in:
🪞👃🪞 2025-01-13 20:23:10 +01:00
parent af2e237b94
commit 93fa3c26b4
4 changed files with 156 additions and 137 deletions

View file

@ -1,6 +1,10 @@
use crate::*;
pub trait HasEditor {
fn editor (&self) -> &MidiEditor;
fn editor (&self) -> &Option<MidiEditor>;
fn editor_mut (&mut self) -> &Option<MidiEditor>;
fn is_editing (&self) -> bool { true }
fn editor_w (&self) -> usize { 0 }
fn editor_h (&self) -> usize { 0 }
}
#[macro_export] macro_rules! has_editor {
(|$self:ident:$Struct:ident$(<$($L:lifetime),*$($T:ident$(:$U:path)?),*>)?|$cb:expr) => {