<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Assorted tools and UI states that’re useful for applications built to display maps."><meta name="keywords" content="rust, rustlang, rust-lang, tools"><title>map_gui::tools - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module tools</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="tools" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">map_gui</a>::<wbr><a class="mod" href="#">tools</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/map_gui/tools/mod.rs.html#1-375" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Assorted tools and UI states that’re useful for applications built to display maps.</p> </div></details><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2> <div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="camera/index.html" title="map_gui::tools::camera mod">camera</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="city_picker/index.html" title="map_gui::tools::city_picker mod">city_picker</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="colors/index.html" title="map_gui::tools::colors mod">colors</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="command/index.html" title="map_gui::tools::command mod">command</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="heatmap/index.html" title="map_gui::tools::heatmap mod">heatmap</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="icons/index.html" title="map_gui::tools::icons mod">icons</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="importer/index.html" title="map_gui::tools::importer mod">importer</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="labels/index.html" title="map_gui::tools::labels mod">labels</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="minimap/index.html" title="map_gui::tools::minimap mod">minimap</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="navigate/index.html" title="map_gui::tools::navigate mod">navigate</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="title_screen/index.html" title="map_gui::tools::title_screen mod">title_screen</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="turn_explorer/index.html" title="map_gui::tools::turn_explorer mod">turn_explorer</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="ui/index.html" title="map_gui::tools::ui mod">ui</a></div><div class="item-right docblock-short"><p>Generic UI tools. Some of this should perhaps be lifted to widgetry.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="updater/index.html" title="map_gui::tools::updater mod">updater</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="url/index.html" title="map_gui::tools::url mod">url</a></div><div class="item-right docblock-short"></div></div></div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2> <div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.CameraState.html" title="map_gui::tools::CameraState struct">CameraState</a></div><div class="item-right docblock-short"><p>Represents the state of a widgetry Canvas.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ChooseSomething.html" title="map_gui::tools::ChooseSomething struct">ChooseSomething</a></div><div class="item-right docblock-short"><p>Choose something from a menu, then feed the answer to a callback.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.CityPicker.html" title="map_gui::tools::CityPicker struct">CityPicker</a></div><div class="item-right docblock-short"><p>Lets the player switch maps.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ColorDiscrete.html" title="map_gui::tools::ColorDiscrete struct">ColorDiscrete</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ColorLegend.html" title="map_gui::tools::ColorLegend struct">ColorLegend</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ColorNetwork.html" title="map_gui::tools::ColorNetwork struct">ColorNetwork</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ColorScale.html" title="map_gui::tools::ColorScale struct">ColorScale</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DefaultMap.html" title="map_gui::tools::DefaultMap struct">DefaultMap</a></div><div class="item-right docblock-short"><p>Track the last map used, to resume next session.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DivergingScale.html" title="map_gui::tools::DivergingScale struct">DivergingScale</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DrawRoadLabels.html" title="map_gui::tools::DrawRoadLabels struct">DrawRoadLabels</a></div><div class="item-right docblock-short"><p>Labels roads when unzoomed. Label size and frequency depends on the zoom level.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.FilePicker.html" title="map_gui::tools::FilePicker struct">FilePicker</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Grid.html" title="map_gui::tools::Grid struct">Grid</a></div><div class="item-right docblock-short"><p>A 2D grid containing some arbitrary data.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.HeatmapOptions.html" title="map_gui::tools::HeatmapOptions struct">HeatmapOptions</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Minimap.html" title="map_gui::tools::Minimap struct">Minimap</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Navigator.html" title="map_gui::tools::Navigator struct">Navigator</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.PopupMsg.html" title="map_gui::tools::PopupMsg struct">PopupMsg</a></div><div class="item-right docblock-short"><p>Display a message dialog.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.PromptInput.html" title="map_gui::tools::PromptInput struct">PromptInput</a></div><div class="item-right docblock-short"><p>Prompt for arbitrary text input, then feed the answer to a callback.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.RunCommand.html" title="map_gui::tools::RunCommand struct">RunCommand</a></div><div class="item-right docblock-short"><p>Executes a command and displays STDOUT and STDERR in a loading screen window. Only works on native, of course.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TitleScreen.html" title="map_gui::tools::TitleScreen struct">TitleScreen</a></div><div class="item-right docblock-short"><p>A title screen shared among all of the A/B Street apps.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TurnExplorer.html" title="map_gui::tools::TurnExplorer struct">TurnExplorer</a></div><div class="item-right docblock-short"><p>A tool to explore all of the turns from a single lane.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.URLManager.html" title="map_gui::tools::URLManager struct">URLManager</a></div><div class="item-right docblock-short"><p>Utilities for reflecting the current map and viewport in the URL on the web. No effect on native.</p> </div></div></div><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2> <div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Executable.html" title="map_gui::tools::Executable enum">Executable</a></div><div class="item-right docblock-short"></div></div></div><h2 id="constants" class="section-header"><a href="#constants">Constants</a></h2> <div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.NEXT_RELEASE.html" title="map_gui::tools::NEXT_RELEASE constant">NEXT_RELEASE</a></div><div class="item-right docblock-short"></div></div></div><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2> <div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.MinimapControls.html" title="map_gui::tools::MinimapControls trait">MinimapControls</a></div><div class="item-right docblock-short"><p>Customize the appearance and behavior of a minimap.</p> </div></div></div><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2> <div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.app_header.html" title="map_gui::tools::app_header fn">app_header</a></div><div class="item-right docblock-short"><p>A standard way to group a home button back to the title screen, the title of the current app, and a button to change maps. Callers must handle the <code>change map</code> and <code>home</code> click events.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.change_map_btn.html" title="map_gui::tools::change_map_btn fn">change_map_btn</a></div><div class="item-right docblock-short"><p>A button to change maps, with default keybindings</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.draw_isochrone.html" title="map_gui::tools::draw_isochrone fn">draw_isochrone</a></div><div class="item-right docblock-short"><p>Thresholds are Durations, in units of seconds</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.find_exe.html" title="map_gui::tools::find_exe fn">find_exe</a></div><div class="item-right docblock-short"><p>Returns the path to an executable. Native-only.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.goal_marker.html" title="map_gui::tools::goal_marker fn">goal_marker</a></div><div class="item-right docblock-short"><p>Draw a goal marker pointing at something.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.grey_out_map.html" title="map_gui::tools::grey_out_map fn">grey_out_map</a></div><div class="item-right docblock-short"><p>Make it clear the map can’t be interacted with right now.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.home_btn.html" title="map_gui::tools::home_btn fn">home_btn</a></div><div class="item-right docblock-short"><p>A button to return to the title screen</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.loading_tips.html" title="map_gui::tools::loading_tips fn">loading_tips</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.make_heatmap.html" title="map_gui::tools::make_heatmap fn">make_heatmap</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.nice_country_name.html" title="map_gui::tools::nice_country_name fn">nice_country_name</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.nice_map_name.html" title="map_gui::tools::nice_map_name fn">nice_map_name</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.open_browser.html" title="map_gui::tools::open_browser fn">open_browser</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.prompt_to_download_missing_data.html" title="map_gui::tools::prompt_to_download_missing_data fn">prompt_to_download_missing_data</a></div><div class="item-right docblock-short"><p>Prompt to download a missing city. On either success or failure (maybe the player choosing to not download, maybe a network error), the new map isn’t automatically loaded or anything; up to the caller to handle that.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.start_marker.html" title="map_gui::tools::start_marker fn">start_marker</a></div><div class="item-right docblock-short"><p>Draw a start marker pointing at something.</p> </div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.version.html" title="map_gui::tools::version fn">version</a></div><div class="item-right docblock-short"><p>Returns the version of A/B Street to link to. When building for a release, this points to that new release. Otherwise it points to the current dev version.</p> </div></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="map_gui" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div> <script src="../../main.js"></script> </body></html>