[][src]Struct map_gui::SimpleApp

pub struct SimpleApp {
    pub map: Map,
    pub draw_map: DrawMap,
    pub cs: ColorScheme,
    pub opts: Options,
    pub current_selection: Option<ID>,
}

Simple app state that just renders a static map, without any dynamic agents on the map.

Fields

map: Mapdraw_map: DrawMapcs: ColorSchemeopts: Optionscurrent_selection: Option<ID>

Implementations

impl SimpleApp[src]

pub fn new(ctx: &mut EventCtx<'_>, args: CmdArgs) -> SimpleApp[src]

pub fn new_with_opts(
    ctx: &mut EventCtx<'_>,
    args: CmdArgs,
    opts: Options
) -> SimpleApp
[src]

pub fn draw_unzoomed(&self, g: &mut GfxCtx<'_>)[src]

pub fn draw_zoomed(&self, g: &mut GfxCtx<'_>, opts: DrawOptions)[src]

pub fn recalculate_current_selection(&mut self, ctx: &EventCtx<'_>)[src]

Assumes some defaults.

pub fn mouseover_unzoomed_roads_and_intersections(
    &self,
    ctx: &EventCtx<'_>
) -> Option<ID>
[src]

pub fn mouseover_unzoomed_buildings(&self, ctx: &EventCtx<'_>) -> Option<ID>[src]

Only select buildings, and work whether zoomed in or not.

fn calculate_current_selection(
    &self,
    ctx: &EventCtx<'_>,
    unzoomed_roads_and_intersections: bool,
    unzoomed_buildings: bool
) -> Option<ID>
[src]

Trait Implementations

impl AppLike for SimpleApp[src]

impl SharedAppState for SimpleApp[src]

impl State<SimpleApp> for SimpleWarper[src]

Auto Trait Implementations

impl !RefUnwindSafe for SimpleApp

impl !Send for SimpleApp

impl !Sync for SimpleApp

impl Unpin for SimpleApp

impl UnwindSafe for SimpleApp

Blanket Implementations

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

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

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

impl<T> Downcast for T where
    T: Any

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>,