[−][src]Struct pushrod::engine::Engine
This is a Pushrod
main loop struct. All of the members of this object are
private, and used to track interaction with widgets on the screen, and other SDL2
-related
events.
Implementations
impl Engine
[src]
This is an implementation of Pushrod
, the main loop handler. Multiple Pushrod
s
can be created for multiple windows if your application provides more than one window
with which to interact.
pub fn new(handler: Box<dyn EventHandler>, window: &Window) -> Self
[src]
Creates a new Pushrod
run loop, taking a reference to the EventHandler
that handles
run loop events for this Window
.
pub fn stop(&mut self)
[src]
Stops the Pushrod run loop.
pub fn get_cache(&mut self) -> &mut WidgetCache
[src]
Retrieves the WidgetCache
.
pub fn run(&mut self, sdl: Sdl, window: Window)
[src]
This is the main event handler for the application. It handles all of the events generated
by the SDL2
manager, and translates them into events that can be used by the handle_event
method.
Auto Trait Implementations
impl !RefUnwindSafe for Engine
impl !Send for Engine
impl !Sync for Engine
impl Unpin for Engine
impl !UnwindSafe for Engine
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,