use backend::Backend;
use color::{Color, hsl, hsla, rgb, rgba};
use ui::Ui;
pub type FontSize = u32;
pub trait Labelable<'a>: Sized {
fn label(self, text: &'a str) -> Self;
fn label_color(self, color: Color) -> Self;
fn label_rgba(self, r: f32, g: f32, b: f32, a: f32) -> Self {
self.label_color(rgba(r, g, b, a))
}
fn label_rgb(self, r: f32, g: f32, b: f32) -> Self {
self.label_color(rgb(r, g, b))
}
fn label_hsla(self, h: f32, s: f32, l: f32, a: f32) -> Self {
self.label_color(hsla(h, s, l, a))
}
fn label_hsl(self, h: f32, s: f32, l: f32) -> Self {
self.label_color(hsl(h, s, l))
}
fn label_font_size(self, size: FontSize) -> Self;
fn small_font<B: Backend>(self, ui: &Ui<B>) -> Self {
self.label_font_size(ui.theme.font_size_small)
}
fn medium_font<B: Backend>(self, ui: &Ui<B>) -> Self {
self.label_font_size(ui.theme.font_size_medium)
}
fn large_font<B: Backend>(self, ui: &Ui<B>) -> Self {
self.label_font_size(ui.theme.font_size_large)
}
}