Skip to main content

TheStyle

Trait TheStyle 

Source
pub trait TheStyle: Send {
    // Required methods
    fn new() -> Self
       where Self: Sized;
    fn theme(&mut self) -> &mut Box<dyn TheTheme>;

    // Provided methods
    fn draw_widget_border(
        &mut self,
        buffer: &mut TheRGBABuffer,
        widget: &mut dyn TheWidget,
        shrinker: &mut TheDimShrinker,
        ctx: &mut TheContext,
    ) { ... }
    fn draw_text_edit_border(
        &mut self,
        buffer: &mut TheRGBABuffer,
        widget: &dyn TheWidget,
        shrinker: &mut TheDimShrinker,
        ctx: &mut TheContext,
        draw_focus: bool,
        disabled: bool,
    ) { ... }
    fn draw_text_area_border(
        &mut self,
        buffer: &mut TheRGBABuffer,
        widget: &dyn TheWidget,
        shrinker: &mut TheDimShrinker,
        ctx: &mut TheContext,
        draw_focus: bool,
        disabled: bool,
    ) { ... }
    fn create_drop_image(&mut self, drop: &mut TheDrop, ctx: &mut TheContext) { ... }
}

Required Methods§

Source

fn new() -> Self
where Self: Sized,

Source

fn theme(&mut self) -> &mut Box<dyn TheTheme>

Returns the current theme of the style

Provided Methods§

Source

fn draw_widget_border( &mut self, buffer: &mut TheRGBABuffer, widget: &mut dyn TheWidget, shrinker: &mut TheDimShrinker, ctx: &mut TheContext, )

Draw the widget border

Source

fn draw_text_edit_border( &mut self, buffer: &mut TheRGBABuffer, widget: &dyn TheWidget, shrinker: &mut TheDimShrinker, ctx: &mut TheContext, draw_focus: bool, disabled: bool, )

Draw the widget border

Source

fn draw_text_area_border( &mut self, buffer: &mut TheRGBABuffer, widget: &dyn TheWidget, shrinker: &mut TheDimShrinker, ctx: &mut TheContext, draw_focus: bool, disabled: bool, )

Draw the widget border

Source

fn create_drop_image(&mut self, drop: &mut TheDrop, ctx: &mut TheContext)

Creates a preview image for the drop.

Implementors§

Source§

impl TheStyle for TheClassicStyle

Implements TheStyle trait for the default Classic look.