[][src]Struct arcs::window::Window

pub struct Window(pub Entity);

A wrapper around the "window" object.

Implementations

impl Window[src]

pub fn create(world: &mut World) -> Self[src]

Creates a new Window entity populated with all default components.

pub fn render_system<'a, R>(
    &'a self,
    backend: R,
    window_size: Size2D<f64, CanvasSpace>
) -> impl System<'a> + 'a where
    R: RenderContext + 'a, 
[src]

Get a System which will render using a particular RenderContext.

Note

This snapshots the window's state and styling (e.g. Viewport and WindowStyle) so you shouldn't keep this system around for any length of time.

impl Window[src]

Accessors for the various components attached to this Window.

pub fn viewport<'a>(
    &self,
    storage: &'a ReadStorage<'a, Viewport>
) -> &'a Viewport
[src]

Get a reference to the Window's Viewport component.

pub fn viewport_mut<'a, 'world: 'a>(
    &self,
    storage: &'a mut WriteStorage<'world, Viewport>
) -> &'a mut Viewport
[src]

Get a mutable reference to the Window's Viewport component.

pub fn default_point_style<'a>(
    &self,
    storage: &'a ReadStorage<'a, PointStyle>
) -> &'a PointStyle
[src]

Get a reference to the Window's PointStyle component.

pub fn default_point_style_mut<'a, 'world: 'a>(
    &self,
    storage: &'a mut WriteStorage<'world, PointStyle>
) -> &'a mut PointStyle
[src]

Get a mutable reference to the Window's PointStyle component.

pub fn default_line_style<'a>(
    &self,
    storage: &'a ReadStorage<'a, LineStyle>
) -> &'a LineStyle
[src]

Get a reference to the Window's LineStyle component.

pub fn default_line_style_mut<'a, 'world: 'a>(
    &self,
    storage: &'a mut WriteStorage<'world, LineStyle>
) -> &'a mut LineStyle
[src]

Get a mutable reference to the Window's LineStyle component.

pub fn style<'a>(
    &self,
    storage: &'a ReadStorage<'a, WindowStyle>
) -> &'a WindowStyle
[src]

Get a reference to the Window's WindowStyle component.

pub fn style_mut<'a, 'world: 'a>(
    &self,
    storage: &'a mut WriteStorage<'world, WindowStyle>
) -> &'a mut WindowStyle
[src]

Get a mutable reference to the Window's WindowStyle component.

Trait Implementations

impl Clone for Window[src]

impl Debug for Window[src]

impl PartialEq<Window> for Window[src]

impl StructuralPartialEq for Window[src]

Auto Trait Implementations

impl RefUnwindSafe for Window

impl Send for Window

impl Sync for Window

impl Unpin for Window

impl UnwindSafe for Window

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

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

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

impl<T> Event for T where
    T: Send + Sync + 'static, 
[src]

impl<T> From<T> for T[src]

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

impl<T> Resource for T where
    T: Any + Send + Sync
[src]

impl<T> RoundFrom<T> for T[src]

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.