[][src]Trait mergui::widgets::Widget

pub trait Widget {
    fn contains(&self, pos: &Vector) -> bool;
fn is_focusable(&self, pos: &Vector) -> bool;
fn render(&self, assets: &dyn Assets, window: &mut Window, z: u32); fn get_cursor_on_hover(&self) -> MouseCursor { ... }
fn set_focus(&mut self, _: &Vector, _: bool) { ... }
fn set_hover(&mut self, _: &Vector, _: bool) { ... }
fn on_click(&mut self, _location: &Vector) { ... }
fn on_key_press(&mut self, _key: Key, _state: ButtonState) { ... }
fn on_typed(&mut self, _char: char) { ... } }

This is the real widget. It isn't meant to interact directly with except when creating other widgets that exist of multiple smaller ones

Required methods

fn contains(&self, pos: &Vector) -> bool

fn is_focusable(&self, pos: &Vector) -> bool

fn render(&self, assets: &dyn Assets, window: &mut Window, z: u32)

Loading content...

Provided methods

fn get_cursor_on_hover(&self) -> MouseCursor

fn set_focus(&mut self, _: &Vector, _: bool)

fn set_hover(&mut self, _: &Vector, _: bool)

fn on_click(&mut self, _location: &Vector)

fn on_key_press(&mut self, _key: Key, _state: ButtonState)

fn on_typed(&mut self, _char: char)

Loading content...

Implementors

impl Widget for ImageButton[src]

impl Widget for Image[src]

impl Widget for TextButton[src]

impl Widget for Button[src]

impl<W: Widget> Widget for Concealer<W>[src]

Loading content...