1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use super::*;

pub mod verb;
pub use verb::*;

pub mod standard;

use standard::StdCursor;

pub trait StyleVariant: Clone + Default {
    
}

pub trait StyleVariantSupport<V>: StyleVariant where V: Copy {
    #[inline]
    fn with(&self, verbs: impl IntoIterator<Item=impl Deref<Target=V>>) -> Self where Self: Sized {
        let mut s = self.clone();
        s.attach(verbs);
        s
    }
    #[inline]
    fn attach(&mut self, verbs: impl IntoIterator<Item=impl Deref<Target=V>>) {
        for v in verbs {
            self._with(*v.deref());
        }
    }
    #[doc(hidden)]
    fn _with(&mut self, v: V);
}

pub trait StyleVariantGetStdCursor: StyleVariant {
    fn cursor(&self) -> StdCursor;
}