[][src]Struct pushrod_widgets::system_widgets::checkbox_widget::CheckBoxWidget

pub struct CheckBoxWidget { /* fields omitted */ }

Base Widget.

Trait Implementations

impl Default for CheckBoxWidget[src]

impl Widget for CheckBoxWidget[src]

Implementation for drawing a CheckBoxWidget, with the Widget trait objects applied.

fn draw(
    &mut self,
    c: &mut Canvas<Window>,
    t: &mut TextureCache
) -> Option<&Texture>
[src]

This is a ButtonWidget that is used as a standard blank Widget.

  • PROPERTY_MAIN_COLOR: the Color of the body of the Widget
  • PROPERTY_BORDER_WIDTH: the width of the border to draw
  • PROPERTY_BORDER_COLOR: the Color of the border
  • PROPERTY_FONT_COLOR: the color of the font
  • PROPERTY_FONT_NAME: full or relative path to the font file to use to render the text
  • PROPERTY_FONT_SIZE: the size in points of the font
  • PROPERTY_FONT_STYLE: the FontStyle to apply to the font
  • PROPERTY_TEXT_JUSTIFICATION: The TEXT_JUSTIFY_* constant to use to position the text inside the Widget (only left or right are allowed)
  • PROPERTY_TEXT: String containing the text to display
  • PROPERTY_TOGGLED: boolean indicating whether or not the button is in a selected state

fn handle_event(&mut self, event: PushrodEvent) -> Option<PushrodEvent>[src]

Overrides the handle_event function, which handles the mouse button, widget entering and exiting events.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.