[−][src]Struct pushrod::core::main::Pushrod
This structure is returned when instantiating a new Pushrod main object.
It stores the OpenGL configuration that is desired for drawing, a list of references
to a managed set of PushrodWindow objects, registered EventListeners, and
PushrodEvent objects that are pending dispatch.
The objects contained within this structure are used by the Pushrod run loop, and
are not intended to be modified except through methods in the Pushrod impl.
Fields
widget_store: WidgetStoreMethods
impl Pushrod[src]
Pushrod implementation. Create a Pushrod::new( OpenGL ) object to create a new
main loop. Only one of these should be set for the entire application runtime.
Example usage:
// Create a PushrodWindow container to store the PistonWindow
let mut prod: Pushrod = Pushrod::new(
WindowSettings::new("Pushrod Window", [640, 480])
.opengl(OpenGL::V3_2)
.build()
.unwrap_or_else(|error| panic!("Failed to build PistonWindow: {}", error)));
// Initiate the run loop.
prod.run();pub fn new(window: PistonWindow) -> Self[src]
Pushrod Object Constructor. Takes in a single OpenGL configuration type.
pub fn get_factory(&mut self) -> &mut GfxFactory[src]
Retrieves the window GfxFactory factory object for graphics textures.
pub fn run(&mut self)[src]
This is the main run loop that is called to process all UI events. This loop is responsible for handling events from the OS, converting them to workable objects, and passing them off to quick callback dispatchers.
The run loop handles events in the following order:
- Mouse events
- Movement events
- Button events
- Scroll button events
- Custom events are then dispatched to any registered event listeners
- Draw loop
- Draw only widgets whose states have become invalidated
- Swap display buffers if required
This event is handled window-by-window. Once a window has processed all of its pending events, the next window is then processed. No particular window takes precidence - any window that has events to process gets handled in order.
Auto Trait Implementations
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 = 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> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
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> SetParameter for T
default 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.