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

pub trait Widget {
    pub fn contains(&self, pos: Vector) -> bool;
pub fn is_focusable(&self, pos: Vector) -> bool;
pub fn render(&mut self, gfx: &mut Graphics, window: &Window) -> Result<()>; pub fn get_cursor_on_hover(&self, _: Vector) -> CursorIcon { ... }
pub fn set_focus(&mut self, _: Vector, _: bool) { ... }
pub fn set_hover(&mut self, _: Vector, _: bool) { ... }
pub fn on_click(&mut self, _location: Vector) { ... }
pub fn on_key_press(&mut self, _key: Key, _state: bool) { ... }
pub 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

pub fn contains(&self, pos: Vector) -> bool[src]

pub fn is_focusable(&self, pos: Vector) -> bool[src]

pub fn render(&mut self, gfx: &mut Graphics, window: &Window) -> Result<()>[src]

Loading content...

Provided methods

pub fn get_cursor_on_hover(&self, _: Vector) -> CursorIcon[src]

pub fn set_focus(&mut self, _: Vector, _: bool)[src]

pub fn set_hover(&mut self, _: Vector, _: bool)[src]

pub fn on_click(&mut self, _location: Vector)[src]

pub fn on_key_press(&mut self, _key: Key, _state: bool)[src]

pub fn on_typed(&mut self, _char: char)[src]

Loading content...

Implementors

impl Widget for ImageButton[src]

impl Widget for Image[src]

impl Widget for Text[src]

impl Widget for TextButton[src]

impl Widget for Button[src]

impl Widget for Concealer[src]

impl Widget for ConcealerManager[src]

impl Widget for Input[src]

impl<T: Clone> Widget for DropDown<T>[src]

Loading content...