Trait map_gui::tools::minimap::MinimapControls [−][src]
pub trait MinimapControls<A: AppLike> { fn has_zorder(&self, app: &A) -> bool; fn has_layer(&self, _: &A) -> bool { ... } fn draw_extra(&self, _: &mut GfxCtx<'_>, _: &A) { ... } fn make_unzoomed_panel(&self, ctx: &mut EventCtx<'_>, _: &A) -> Panel { ... } fn make_legend(&self, _: &mut EventCtx<'_>, _: &A) -> Widget { ... } fn make_zoomed_side_panel(&self, _: &mut EventCtx<'_>, _: &A) -> Widget { ... } fn panel_clicked(
&self,
_: &mut EventCtx<'_>,
_: &mut A,
_: &str
) -> Option<Transition<A>> { ... } fn panel_changed(&self, _: &mut EventCtx<'_>, _: &mut A, _: &Panel) { ... } }
Expand description
Customize the appearance and behavior of a minimap.
Required methods
fn has_zorder(&self, app: &A) -> bool
[src]
fn has_zorder(&self, app: &A) -> bool
[src]Should the user be able to control the z-order visible? The control is only present when zoomed in, placed beneath the zoom column.
Provided methods
Is there some additional layer displayed on the minimap? If this changes, the panel gets recalculated.
fn draw_extra(&self, _: &mut GfxCtx<'_>, _: &A)
[src]
fn draw_extra(&self, _: &mut GfxCtx<'_>, _: &A)
[src]Draw extra stuff on the minimap, just pulling from the app.
fn make_unzoomed_panel(&self, ctx: &mut EventCtx<'_>, _: &A) -> Panel
[src]
fn make_unzoomed_panel(&self, ctx: &mut EventCtx<'_>, _: &A) -> Panel
[src]When unzoomed, display this panel. By default, no controls when unzoomed.
fn make_legend(&self, _: &mut EventCtx<'_>, _: &A) -> Widget
[src]
fn make_legend(&self, _: &mut EventCtx<'_>, _: &A) -> Widget
[src]A row beneath the minimap in the zoomed view, usually used as a legend for things on the minimap.
fn make_zoomed_side_panel(&self, _: &mut EventCtx<'_>, _: &A) -> Widget
[src]
fn make_zoomed_side_panel(&self, _: &mut EventCtx<'_>, _: &A) -> Widget
[src]Controls to be placed to the left to the zoomed-in panel
fn panel_clicked(
&self,
_: &mut EventCtx<'_>,
_: &mut A,
_: &str
) -> Option<Transition<A>>
[src]
fn panel_clicked(
&self,
_: &mut EventCtx<'_>,
_: &mut A,
_: &str
) -> Option<Transition<A>>
[src]If a button is clicked that was produced by some method in this trait, respond to it here.
fn panel_changed(&self, _: &mut EventCtx<'_>, _: &mut A, _: &Panel)
[src]
fn panel_changed(&self, _: &mut EventCtx<'_>, _: &mut A, _: &Panel)
[src]Called for Outcome::Changed
on the panel.