[−][src]Struct pushrod::widget::timer_widget::TimerWidget
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 config(&mut self) -> &mut Configurable[src]
fn is_invalidated(&mut self) -> bool[src]
fn get_origin(&mut self) -> Point[src]
fn get_size(&mut self) -> Size[src]
fn mouse_entered(&mut self, _widget_id: i32)[src]
fn mouse_exited(&mut self, _widget_id: i32)[src]
fn mouse_scrolled(&mut self, _widget_id: i32, _point: Point)[src]
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]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value as a parameter of self.