[−][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>
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]
ctx: &mut EventCtx<'_>,
args: CmdArgs,
opts: Options
) -> SimpleApp
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 AppLike for SimpleApp
[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>>
[src]
&mut self,
ctx: &EventCtx<'_>,
pt: Pt2D,
target_cam_zoom: Option<f64>,
_: Option<ID>
) -> Box<dyn State<SimpleApp>>
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 SharedAppState for SimpleApp
[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 State<SimpleApp> for SimpleWarper
[src]
fn event(
&mut self,
ctx: &mut EventCtx<'_>,
_: &mut SimpleApp
) -> Transition<SimpleApp>
[src]
&mut self,
ctx: &mut EventCtx<'_>,
_: &mut SimpleApp
) -> Transition<SimpleApp>
fn draw(&self, _: &mut GfxCtx<'_>, _: &SimpleApp)
[src]
fn draw_baselayer(&self) -> DrawBaselayer
fn on_destroy(&mut self, &mut EventCtx<'_>, &mut A)
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]
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>,