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

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.

Draw extra stuff on the minimap, just pulling from the app.

When unzoomed, display this panel. By default, no controls when unzoomed.

A row beneath the minimap in the zoomed view, usually used as a legend for things on the minimap.

Controls to be placed to the left to the zoomed-in panel

If a button is clicked that was produced by some method in this trait, respond to it here.

Called for Outcome::Changed on the panel.

Implementors