[−][src]Struct map_gui::simple_app::SimpleApp
Simple app state that just renders a static map, without any dynamic agents on the map.
Fields
map: Map
draw_map: DrawMap
cs: ColorScheme
opts: Options
current_selection: Option<ID>
session: T
Custom per-app state can be stored here
time: Time
If desired, this can be advanced to render traffic signals changing.
Implementations
impl<T> SimpleApp<T>
[src]
pub fn new(ctx: &mut EventCtx<'_>, args: CmdArgs, session: T) -> SimpleApp<T>
[src]
pub fn new_with_opts(
ctx: &mut EventCtx<'_>,
args: CmdArgs,
opts: Options,
session: T
) -> SimpleApp<T>
[src]
ctx: &mut EventCtx<'_>,
args: CmdArgs,
opts: Options,
session: T
) -> SimpleApp<T>
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]
&self,
ctx: &EventCtx<'_>
) -> Option<ID>
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]
&self,
ctx: &EventCtx<'_>,
unzoomed_roads_and_intersections: bool,
unzoomed_buildings: bool
) -> Option<ID>
Trait Implementations
impl<T> AppLike for SimpleApp<T>
[src]
fn map(&self) -> &Map
[src]
fn sim(&self) -> &Sim
[src]
fn cs(&self) -> &ColorScheme
[src]
fn mut_cs(&mut self) -> &mut ColorScheme
[src]
fn draw_map(&self) -> &DrawMap
[src]
fn mut_draw_map(&mut self) -> &mut DrawMap
[src]
fn opts(&self) -> &Options
[src]
fn mut_opts(&mut self) -> &mut Options
[src]
fn map_switched(
&mut self,
ctx: &mut EventCtx<'_>,
map: Map,
timer: &mut Timer<'_>
)
[src]
&mut self,
ctx: &mut EventCtx<'_>,
map: Map,
timer: &mut Timer<'_>
)
fn draw_with_opts(&self, g: &mut GfxCtx<'_>, opts: DrawOptions)
[src]
fn make_warper(
&mut self,
ctx: &EventCtx<'_>,
pt: Pt2D,
target_cam_zoom: Option<f64>,
_: Option<ID>
) -> Box<dyn State<SimpleApp<T>>>
[src]
&mut self,
ctx: &EventCtx<'_>,
pt: Pt2D,
target_cam_zoom: Option<f64>,
_: Option<ID>
) -> Box<dyn State<SimpleApp<T>>>
fn sim_time(&self) -> Time
[src]
fn current_stage_and_remaining_time(
&self,
id: IntersectionID
) -> (usize, Duration)
[src]
&self,
id: IntersectionID
) -> (usize, Duration)
fn change_color_scheme(
&mut self,
ctx: &mut EventCtx<'_>,
cs: ColorSchemeChoice
) -> bool
[src]
&mut self,
ctx: &mut EventCtx<'_>,
cs: ColorSchemeChoice
) -> bool
impl<T> SharedAppState for SimpleApp<T>
[src]
fn draw_default(&self, g: &mut GfxCtx<'_>)
[src]
fn dump_before_abort(&self, canvas: &Canvas)
[src]
fn before_quit(&self, canvas: &Canvas)
[src]
fn before_event(&mut self)
impl<T> State<SimpleApp<T>> for SimpleWarper
[src]
fn event(
&mut self,
ctx: &mut EventCtx<'_>,
_: &mut SimpleApp<T>
) -> Transition<SimpleApp<T>>
[src]
&mut self,
ctx: &mut EventCtx<'_>,
_: &mut SimpleApp<T>
) -> Transition<SimpleApp<T>>
fn draw(&self, _: &mut GfxCtx<'_>, _: &SimpleApp<T>)
[src]
fn draw_baselayer(&self) -> DrawBaselayer
fn on_destroy(&mut self, &mut EventCtx<'_>, &mut A)
Auto Trait Implementations
impl<T> !RefUnwindSafe for SimpleApp<T>
impl<T> !Send for SimpleApp<T>
impl<T> !Sync for SimpleApp<T>
impl<T> Unpin for SimpleApp<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for SimpleApp<T> where
T: UnwindSafe,
T: UnwindSafe,
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> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
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>,
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,