mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-30 09:54:05 +03:00
48 lines
23 KiB
HTML
48 lines
23 KiB
HTML
<!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="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><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="../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.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"></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="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../../map_gui/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div>
|
||
</a><h2 class="location"></h2>
|
||
</nav>
|
||
<nav class="sidebar"><a class="sidebar-logo" href="../../map_gui/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div>
|
||
</a><h2 class="location"><a href="#">Module tools</a></h2><div class="sidebar-elems"><section><div class="block"><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></section><div id="sidebar-vars" data-name="tools" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../map_gui/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||
<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></h1><span class="out-of-band"><a class="srclink" href="../../src/map_gui/tools/mod.rs.html#1-431">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><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="small-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><span title="Restricted Visibility"> 🔒</span> </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><span title="Restricted Visibility"> 🔒</span> </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><span title="Restricted Visibility"> 🔒</span> </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><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="compare_counts/index.html" title="map_gui::tools::compare_counts mod">compare_counts</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="draw_overlapping_paths/index.html" title="map_gui::tools::draw_overlapping_paths mod">draw_overlapping_paths</a><span title="Restricted Visibility"> 🔒</span> </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><span title="Restricted Visibility"> 🔒</span> </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><span title="Restricted Visibility"> 🔒</span> </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><span title="Restricted Visibility"> 🔒</span> </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><span title="Restricted Visibility"> 🔒</span> </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><span title="Restricted Visibility"> 🔒</span> </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><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="polygon/index.html" title="map_gui::tools::polygon mod">polygon</a><span title="Restricted Visibility"> 🔒</span> </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><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="trip_files/index.html" title="map_gui::tools::trip_files mod">trip_files</a><span title="Restricted Visibility"> 🔒</span> </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><span title="Restricted Visibility"> 🔒</span> </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><span title="Restricted Visibility"> 🔒</span> </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><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="waypoints/index.html" title="map_gui::tools::waypoints mod">waypoints</a><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div></div><h2 id="structs" class="small-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.EditPolygon.html" title="map_gui::tools::EditPolygon struct">EditPolygon</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.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.InputWaypoints.html" title="map_gui::tools::InputWaypoints struct">InputWaypoints</a></div><div class="item-right docblock-short"><p>Click to add waypoints, drag them, see the list on a panel and delete them. The caller owns the
|
||
Panel and the World, since there’s probably more stuff there too.</p>
|
||
</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.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.TripManagement.html" title="map_gui::tools::TripManagement struct">TripManagement</a></div><div class="item-right docblock-short"><p>Save sequences of waypoints as named trips. Basic file management – save, load, browse. This
|
||
is useful to define “test cases,” then edit the bike network and “run the tests” to compare
|
||
results.</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.WaypointID.html" title="map_gui::tools::WaypointID struct">WaypointID</a></div><div class="item-right docblock-short"></div></div></div><h2 id="enums" class="small-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="small-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><span title="Restricted Visibility"> 🔒</span> </div><div class="item-right docblock-short"></div></div></div><h2 id="traits" class="small-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 class="item-row"><div class="item-left module-item"><a class="trait" href="trait.TripManagementState.html" title="map_gui::tools::TripManagementState trait">TripManagementState</a></div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="small-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.checkbox_per_mode.html" title="map_gui::tools::checkbox_per_mode fn">checkbox_per_mode</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.cmp_count.html" title="map_gui::tools::cmp_count fn">cmp_count</a></div><div class="item-right docblock-short"><p>Less is better</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.cmp_dist.html" title="map_gui::tools::cmp_dist fn">cmp_dist</a></div><div class="item-right docblock-short"><p>Shorter is better</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.cmp_duration.html" title="map_gui::tools::cmp_duration fn">cmp_duration</a></div><div class="item-right docblock-short"><p>Shorter is better</p>
|
||
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.color_for_mode.html" title="map_gui::tools::color_for_mode fn">color_for_mode</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.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.draw_overlapping_paths.html" title="map_gui::tools::draw_overlapping_paths fn">draw_overlapping_paths</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.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.intersections_from_roads.html" title="map_gui::tools::intersections_from_roads fn">intersections_from_roads</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.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.percentage_bar.html" title="map_gui::tools::percentage_bar fn">percentage_bar</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"></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.update_url_map_name.html" title="map_gui::tools::update_url_map_name fn">update_url_map_name</a></div><div class="item-right docblock-short"><p>Modify the current URL to set the first free parameter to the current map name.</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></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="map_gui" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.61.0 (fe5b13d68 2022-05-18)" ></div>
|
||
</body></html> |