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
34
35
36
37
use self::selectag::standard::StdSelectag;
use self::selector::{StyleSelector, StyleSelectorAppend};
use self::standard::cursor::StdCursor;
use super::*;
pub mod selector;
pub mod selectag;
pub mod color;
pub mod font;
pub mod standard;
pub trait Style<E>: Clone + Default where E: Env {
type Selector:
StyleSelector<E> +
StyleSelectorAppend<StdSelectag<E>,E> +
for<'a> StyleSelectorAppend<&'a StdSelectag<E>,E> +
for<'a> StyleSelectorAppend<&'a [StdSelectag<E>],E> +
for<'a,'b> StyleSelectorAppend<&'a [&'b StdSelectag<E>],E>;
type Font;
type Cursor: From<StdCursor>+Clone;
type Color: Color+Clone;
type Glyphs: Glyphs<E>;
fn preprocess_text(&self, s: &str, c: &mut E::Context) -> Self::Glyphs;
fn is_cached_valid(&self, s: &Self::Glyphs, _c: &mut E::Context) -> bool;
fn and(&self, s: &Self) -> Self;
fn font(&self, selector: &Self::Selector, c: &mut E::Context) -> Option<&Self::Font>;
fn color(&self, selector: &Self::Selector, c: &mut E::Context) -> Self::Color;
fn border(&self, selector: &Self::Selector, c: &mut E::Context) -> Border;
fn cursor(&self, selector: &Self::Selector, c: &mut E::Context) -> Self::Cursor;
}