mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
app trait impls
This commit is contained in:
parent
af2e237b94
commit
93fa3c26b4
4 changed files with 156 additions and 137 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue