[][src]Struct pushrod::core::main::Pushrod

pub struct Pushrod {
    pub widget_store: RefCell<WidgetStore>,
    // some fields omitted
}

This structure is returned when instantiating a new Pushrod main object.

Fields

widget_store: RefCell<WidgetStore>

This is the WidgetStore object that is used to store the Widget list in the current display stack.

Methods

impl Pushrod[src]

Pushrod implementation. Create a Pushrod::new( PistonWindow ) object to create a new main loop. Only one of these should be set for the entire application runtime.

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 and font textures.

pub fn add_widget(&mut self, name: &str, widget: Box<dyn Widget>) -> i32[src]

Convenience method that adds a Widget to the GUI display stack.

pub fn add_widget_to_parent(
    &mut self,
    name: &str,
    widget: Box<dyn Widget>,
    parent_id: i32
) -> i32
[src]

Convenience method that adds a Widget to a parent by its ID. This guarantees a refresh if the top level parent becomes invalidated.

pub fn run(&mut self, event_handler: &mut dyn PushrodCallbackEvents)[src]

This is the main run loop for Pushrod. A run loop requires the use of an assigned PushrodCallbackEvents event handler. This is how all communications take place when an action occurs within the GUI window.

Auto Trait Implementations

impl !Send for Pushrod

impl !Sync for Pushrod

Blanket Implementations

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.

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

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

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

impl<T> Erased for T

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.