[][src]Struct pushrod::widget::timer_widget::TimerWidget

pub struct TimerWidget { /* fields omitted */ }

This is the TimerWidget. It contains no base widget, it only contains a start and end time,

Methods

impl TimerWidget[src]

Implementation of the constructor for the TimerWidget. Timer widgets are not accessible on the screen, so they have an origin of 0x0 and width of 0x0.

pub fn new() -> Self[src]

pub fn tick(&mut self)[src]

pub fn set_enabled(&mut self, enabled: bool)[src]

pub fn set_timeout(&mut self, timeout: u128)[src]

Trait Implementations

impl Widget for TimerWidget[src]

Implementation of the TimerWidget object with the Widget traits implemented.

Example usage:

   let mut timer_widget = TimerWidget::new();

   // (OR)

fn draw(&mut self, _context: Context, _graphics: &mut GlGraphics)[src]

Draws the contents of the widget in this order:

  • Base widget first
  • Box graphic for the specified width

fn invalidate(&mut self)[src]

Indicates that a widget needs to be redrawn/refreshed.

fn clear_invalidate(&mut self)[src]

Clears the invalidation flag.

fn set_origin(&mut self, x: i32, y: i32)[src]

Sets the Point of origin for this widget, given the X and Y origin points. Invalidates the widget afterward.

fn set_size(&mut self, w: i32, h: i32)[src]

Sets the Size for this widget, given a width and height. Invalidates the widget afterward.

fn set_color(&mut self, color: Color)[src]

Sets the color for this widget. Invalidates the widget afterward.

fn get_color(&mut self) -> Color[src]

Retrieves the color of this widget. Defaults to white color [1.0; 4] if not set. Read more

Auto Trait Implementations

impl Send for TimerWidget

impl Sync for TimerWidget

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> Erased for T