This commit is contained in:
dabreegster 2022-10-26 13:19:14 +00:00
parent 0f64413b18
commit ee6b2d3c90
54 changed files with 516 additions and 121 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -40,9 +40,9 @@ the <code>State</code>-specific state appropriately. <a>Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.on_destroy-8" class="method trait-impl has-srclink"><a href="#method.on_destroy-8" class="anchor"></a><h4 class="code-header">fn <a class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&amp;mut </a>A)</h4></section></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.recreate-8" class="method trait-impl has-srclink"><a href="#method.recreate-8" class="anchor"></a><h4 class="code-header">fn <a class="fnname">recreate</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut EventCtx&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&amp;mut </a>A<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;A&gt; + 'static, <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4></section></summary><div class='docblock'><p>Respond to <code>Transition::Recreate</code> by assuming state in the app has changed, but preserving
the <code>State</code>-specific state appropriately. <a>Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-State%3CApp%3E-for-Crossings" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/crossings.rs.html#64-148">source</a></span><a href="#impl-State%3CApp%3E-for-Crossings" class="anchor"></a><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct ltn::app::App">App</a>&gt; for <a class="struct" href="../crossings/struct.Crossings.html" title="struct ltn::crossings::Crossings">Crossings</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.event-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/crossings.rs.html#65-131">source</a></span><a href="#method.event-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct ltn::app::App">App</a>) -&gt; <a class="type" href="type.Transition.html" title="type ltn::app::Transition">Transition</a></h4></section></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw-2" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/crossings.rs.html#133-143">source</a></span><a href="#method.draw-2" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="struct.App.html" title="struct ltn::app::App">App</a>)</h4></section></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.recreate-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/crossings.rs.html#145-147">source</a></span><a href="#method.recreate-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">recreate</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="struct.App.html" title="struct ltn::app::App">App</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="struct.App.html" title="struct ltn::app::App">App</a>&gt;&gt;</h4></section></summary><div class='docblock'><p>Respond to <code>Transition::Recreate</code> by assuming state in the app has changed, but preserving
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-State%3CApp%3E-for-Crossings" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/crossings.rs.html#78-177">source</a></span><a href="#impl-State%3CApp%3E-for-Crossings" class="anchor"></a><h3 class="code-header in-band">impl State&lt;<a class="struct" href="struct.App.html" title="struct ltn::app::App">App</a>&gt; for <a class="struct" href="../crossings/struct.Crossings.html" title="struct ltn::crossings::Crossings">Crossings</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.event-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/crossings.rs.html#79-157">source</a></span><a href="#method.event-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="struct.App.html" title="struct ltn::app::App">App</a>) -&gt; <a class="type" href="type.Transition.html" title="type ltn::app::Transition">Transition</a></h4></section></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw-2" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/crossings.rs.html#159-172">source</a></span><a href="#method.draw-2" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="struct.App.html" title="struct ltn::app::App">App</a>)</h4></section></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.recreate-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/crossings.rs.html#174-176">source</a></span><a href="#method.recreate-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">recreate</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="struct.App.html" title="struct ltn::app::App">App</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="struct.App.html" title="struct ltn::app::App">App</a>&gt;&gt;</h4></section></summary><div class='docblock'><p>Respond to <code>Transition::Recreate</code> by assuming state in the app has changed, but preserving
the <code>State</code>-specific state appropriately. <a>Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw_baselayer-2" class="method trait-impl has-srclink"><a href="#method.draw_baselayer-2" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4></section></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.on_destroy-1" class="method trait-impl has-srclink"><a href="#method.on_destroy-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&amp;mut </a>A)</h4></section></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>

View File

@ -1 +1 @@
<!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="API documentation for the Rust `make_left_panel` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, make_left_panel"><title>make_left_panel in ltn::components::appwide_panel - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../../ltn/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="../../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::components::appwide_panel</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../ltn/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">components</a>::<wbr><a href="index.html">appwide_panel</a>::<wbr><a class="fn" href="#">make_left_panel</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/ltn/components/appwide_panel.rs.html#233-271">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn make_left_panel(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct ltn::app::App">App</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;top_panel: &amp;Panel,<br>&nbsp;&nbsp;&nbsp;&nbsp;mode: <a class="enum" href="../enum.Mode.html" title="enum ltn::components::Mode">Mode</a><br>) -&gt; Panel</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></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="API documentation for the Rust `make_left_panel` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, make_left_panel"><title>make_left_panel in ltn::components::appwide_panel - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../../ltn/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="../../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::components::appwide_panel</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../ltn/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">components</a>::<wbr><a href="index.html">appwide_panel</a>::<wbr><a class="fn" href="#">make_left_panel</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/ltn/components/appwide_panel.rs.html#234-272">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn make_left_panel(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct ltn::app::App">App</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;top_panel: &amp;Panel,<br>&nbsp;&nbsp;&nbsp;&nbsp;mode: <a class="enum" href="../enum.Mode.html" title="enum ltn::components::Mode">Mode</a><br>) -&gt; Panel</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

View File

@ -1 +1 @@
<!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="API documentation for the Rust `make_top_panel` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, make_top_panel"><title>make_top_panel in ltn::components::appwide_panel - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../../ltn/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="../../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::components::appwide_panel</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../ltn/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">components</a>::<wbr><a href="index.html">appwide_panel</a>::<wbr><a class="fn" href="#">make_top_panel</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/ltn/components/appwide_panel.rs.html#122-231">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn make_top_panel(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct ltn::app::App">App</a>, mode: <a class="enum" href="../enum.Mode.html" title="enum ltn::components::Mode">Mode</a>) -&gt; Panel</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></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="API documentation for the Rust `make_top_panel` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, make_top_panel"><title>make_top_panel in ltn::components::appwide_panel - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../../ltn/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="../../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::components::appwide_panel</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../ltn/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">components</a>::<wbr><a href="index.html">appwide_panel</a>::<wbr><a class="fn" href="#">make_top_panel</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/ltn/components/appwide_panel.rs.html#122-232">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn make_top_panel(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../app/struct.App.html" title="struct ltn::app::App">App</a>, mode: <a class="enum" href="../enum.Mode.html" title="enum ltn::components::Mode">Mode</a>) -&gt; Panel</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

View File

@ -1,2 +1,2 @@
<!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="API documentation for the Rust `appwide_panel` mod in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, appwide_panel"><title>ltn::components::appwide_panel - 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 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">&#9776;</button><a class="sidebar-logo" href="../../../ltn/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="../../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module appwide_panel</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div></section></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../ltn/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></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">ltn</a>::<wbr><a href="../index.html">components</a>::<wbr><a class="mod" href="#">appwide_panel</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/ltn/components/appwide_panel.rs.html#1-271">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></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.AppwidePanel.html" title="ltn::components::appwide_panel::AppwidePanel struct">AppwidePanel</a></div><div class="item-right docblock-short"><p>Both the top panel and the collapsible left sidebar.</p>
<!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="API documentation for the Rust `appwide_panel` mod in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, appwide_panel"><title>ltn::components::appwide_panel - 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 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">&#9776;</button><a class="sidebar-logo" href="../../../ltn/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="../../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module appwide_panel</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div></section></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../ltn/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></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">ltn</a>::<wbr><a href="../index.html">components</a>::<wbr><a class="mod" href="#">appwide_panel</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/ltn/components/appwide_panel.rs.html#1-272">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></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.AppwidePanel.html" title="ltn::components::appwide_panel::AppwidePanel struct">AppwidePanel</a></div><div class="item-right docblock-short"><p>Both the top panel and the collapsible left sidebar.</p>
</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.launch_impact.html" title="ltn::components::appwide_panel::launch_impact fn">launch_impact</a><span title="Restricted Visibility">&nbsp;🔒</span> </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_left_panel.html" title="ltn::components::appwide_panel::make_left_panel fn">make_left_panel</a><span title="Restricted Visibility">&nbsp;🔒</span> </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_top_panel.html" title="ltn::components::appwide_panel::make_top_panel fn">make_top_panel</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

View File

@ -5,7 +5,7 @@
RoutePlanner,
Crossings,
Impact,
}</code></pre></div><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor"></a></h2><h3 id="variant.PickArea" class="variant small-section-header"><a href="#variant.PickArea" class="anchor field"></a><code>PickArea</code></h3><h3 id="variant.ModifyNeighbourhood" class="variant small-section-header"><a href="#variant.ModifyNeighbourhood" class="anchor field"></a><code>ModifyNeighbourhood</code></h3><h3 id="variant.SelectBoundary" class="variant small-section-header"><a href="#variant.SelectBoundary" class="anchor field"></a><code>SelectBoundary</code></h3><h3 id="variant.RoutePlanner" class="variant small-section-header"><a href="#variant.RoutePlanner" class="anchor field"></a><code>RoutePlanner</code></h3><h3 id="variant.Crossings" class="variant small-section-header"><a href="#variant.Crossings" class="anchor field"></a><code>Crossings</code></h3><h3 id="variant.Impact" class="variant small-section-header"><a href="#variant.Impact" class="anchor field"></a><code>Impact</code></h3><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Mode" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/components/layers.rs.html#214-315">source</a></span><a href="#impl-Mode" class="anchor"></a><h3 class="code-header in-band">impl <a class="enum" href="enum.Mode.html" title="enum ltn::components::Mode">Mode</a></h3></section></summary><div class="impl-items"><section id="method.legend" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/components/layers.rs.html#215-314">source</a></span><h4 class="code-header">fn <a href="#method.legend" class="fnname">legend</a>(&amp;self, ctx: &amp;mut EventCtx&lt;'_&gt;, cs: &amp;<a class="struct" href="../../map_gui/colors/struct.ColorScheme.html" title="struct map_gui::colors::ColorScheme">ColorScheme</a>) -&gt; Widget</h4></section></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-Mode" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/components/mod.rs.html#10">source</a></span><a href="#impl-Clone-for-Mode" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.Mode.html" title="enum ltn::components::Mode">Mode</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/components/mod.rs.html#10">source</a></span><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="enum" href="enum.Mode.html" title="enum ltn::components::Mode">Mode</a></h4></section></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
}</code></pre></div><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor"></a></h2><h3 id="variant.PickArea" class="variant small-section-header"><a href="#variant.PickArea" class="anchor field"></a><code>PickArea</code></h3><h3 id="variant.ModifyNeighbourhood" class="variant small-section-header"><a href="#variant.ModifyNeighbourhood" class="anchor field"></a><code>ModifyNeighbourhood</code></h3><h3 id="variant.SelectBoundary" class="variant small-section-header"><a href="#variant.SelectBoundary" class="anchor field"></a><code>SelectBoundary</code></h3><h3 id="variant.RoutePlanner" class="variant small-section-header"><a href="#variant.RoutePlanner" class="anchor field"></a><code>RoutePlanner</code></h3><h3 id="variant.Crossings" class="variant small-section-header"><a href="#variant.Crossings" class="anchor field"></a><code>Crossings</code></h3><h3 id="variant.Impact" class="variant small-section-header"><a href="#variant.Impact" class="anchor field"></a><code>Impact</code></h3><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Mode" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/components/layers.rs.html#244-345">source</a></span><a href="#impl-Mode" class="anchor"></a><h3 class="code-header in-band">impl <a class="enum" href="enum.Mode.html" title="enum ltn::components::Mode">Mode</a></h3></section></summary><div class="impl-items"><section id="method.legend" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/components/layers.rs.html#245-344">source</a></span><h4 class="code-header">fn <a href="#method.legend" class="fnname">legend</a>(&amp;self, ctx: &amp;mut EventCtx&lt;'_&gt;, cs: &amp;<a class="struct" href="../../map_gui/colors/struct.ColorScheme.html" title="struct map_gui::colors::ColorScheme">ColorScheme</a>) -&gt; Widget</h4></section></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-Mode" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/components/mod.rs.html#10">source</a></span><a href="#impl-Clone-for-Mode" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="enum.Mode.html" title="enum ltn::components::Mode">Mode</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/components/mod.rs.html#10">source</a></span><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="enum" href="enum.Mode.html" title="enum ltn::components::Mode">Mode</a></h4></section></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.64.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&amp;</a>Self)</h4></section></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.64.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CMode%3E-for-Mode" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/components/mod.rs.html#10">source</a></span><a href="#impl-PartialEq%3CMode%3E-for-Mode" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="enum.Mode.html" title="enum ltn::components::Mode">Mode</a>&gt; for <a class="enum" href="enum.Mode.html" title="enum ltn::components::Mode">Mode</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/components/mod.rs.html#10">source</a></span><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="enum" href="enum.Mode.html" title="enum ltn::components::Mode">Mode</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>. <a href="https://doc.rust-lang.org/1.64.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>

View File

@ -1 +1 @@
<!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="API documentation for the Rust `color_grid` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, color_grid"><title>color_grid in ltn::components::layers - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../../ltn/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="../../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::components::layers</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../ltn/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">components</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">color_grid</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/ltn/components/layers.rs.html#332-347">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn color_grid(ctx: &amp;mut EventCtx&lt;'_&gt;) -&gt; Widget</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></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="API documentation for the Rust `color_grid` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, color_grid"><title>color_grid in ltn::components::layers - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../../ltn/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="../../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::components::layers</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../ltn/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">components</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">color_grid</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/ltn/components/layers.rs.html#362-377">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn color_grid(ctx: &amp;mut EventCtx&lt;'_&gt;) -&gt; Widget</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

View File

@ -1 +1 @@
<!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="API documentation for the Rust `entry` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, entry"><title>entry in ltn::components::layers - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../../ltn/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="../../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::components::layers</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../ltn/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">components</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">entry</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/ltn/components/layers.rs.html#317-330">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn entry(ctx: &amp;mut EventCtx&lt;'_&gt;, color: Color, label: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>) -&gt; Widget</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></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="API documentation for the Rust `entry` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, entry"><title>entry in ltn::components::layers - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../../ltn/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="../../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::components::layers</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../ltn/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">components</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">entry</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/ltn/components/layers.rs.html#347-360">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn entry(ctx: &amp;mut EventCtx&lt;'_&gt;, color: Color, label: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>) -&gt; Widget</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

View File

@ -1 +1 @@
<!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="API documentation for the Rust `make_zoom_controls` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, make_zoom_controls"><title>make_zoom_controls in ltn::components::layers - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../../ltn/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="../../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::components::layers</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../ltn/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">components</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">make_zoom_controls</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/ltn/components/layers.rs.html#178-212">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn make_zoom_controls(ctx: &amp;mut EventCtx&lt;'_&gt;) -&gt; Widget</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></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="API documentation for the Rust `make_zoom_controls` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, make_zoom_controls"><title>make_zoom_controls in ltn::components::layers - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../../ltn/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="../../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::components::layers</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../ltn/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">ltn</a>::<wbr><a href="../index.html">components</a>::<wbr><a href="index.html">layers</a>::<wbr><a class="fn" href="#">make_zoom_controls</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/ltn/components/layers.rs.html#208-242">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn make_zoom_controls(ctx: &amp;mut EventCtx&lt;'_&gt;) -&gt; Widget</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<!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="API documentation for the Rust `boundary_roads` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, boundary_roads"><title>boundary_roads in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">boundary_roads</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/ltn/crossings.rs.html#157-165">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn boundary_roads(app: &amp;<a class="struct" href="../app/struct.App.html" title="struct ltn::app::App">App</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></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="API documentation for the Rust `boundary_roads` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, boundary_roads"><title>boundary_roads in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">boundary_roads</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/ltn/crossings.rs.html#186-194">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn boundary_roads(app: &amp;<a class="struct" href="../app/struct.App.html" title="struct ltn::app::App">App</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>&gt;</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

View File

@ -1 +1 @@
<!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="API documentation for the Rust `draw_crossings` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, draw_crossings"><title>draw_crossings in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">draw_crossings</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/ltn/crossings.rs.html#167-222">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn draw_crossings(ctx: &amp;EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct ltn::app::App">App</a>) -&gt; <a class="struct" href="../filters/struct.Toggle3Zoomed.html" title="struct ltn::filters::Toggle3Zoomed">Toggle3Zoomed</a></code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></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="API documentation for the Rust `draw_crossings` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, draw_crossings"><title>draw_crossings in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">draw_crossings</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/ltn/crossings.rs.html#196-251">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn draw_crossings(ctx: &amp;EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct ltn::app::App">App</a>) -&gt; <a class="struct" href="../filters/struct.Toggle3Zoomed.html" title="struct ltn::filters::Toggle3Zoomed">Toggle3Zoomed</a></code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

View File

@ -0,0 +1 @@
<!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="API documentation for the Rust `draw_nearest_crossing` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, draw_nearest_crossing"><title>draw_nearest_crossing in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">draw_nearest_crossing</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/ltn/crossings.rs.html#414-483">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn draw_nearest_crossing(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;EventCtx&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../app/struct.App.html" title="struct ltn::app::App">App</a><br>) -&gt; (Drawable, <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <a class="struct" href="../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>&gt;)</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

View File

@ -1 +1 @@
<!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="API documentation for the Rust `draw_porosity` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, draw_porosity"><title>draw_porosity in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">draw_porosity</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/ltn/crossings.rs.html#276-299">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn draw_porosity(ctx: &amp;EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct ltn::app::App">App</a>) -&gt; Drawable</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></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="API documentation for the Rust `draw_porosity` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, draw_porosity"><title>draw_porosity in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">draw_porosity</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/ltn/crossings.rs.html#316-339">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn draw_porosity(ctx: &amp;EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct ltn::app::App">App</a>) -&gt; Drawable</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<!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="API documentation for the Rust `make_bottom_panel` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, make_bottom_panel"><title>make_bottom_panel in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">make_bottom_panel</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/ltn/crossings.rs.html#301-353">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn make_bottom_panel(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct ltn::app::App">App</a>) -&gt; Widget</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></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="API documentation for the Rust `make_bottom_panel` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, make_bottom_panel"><title>make_bottom_panel in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">make_bottom_panel</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/ltn/crossings.rs.html#341-393">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn make_bottom_panel(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct ltn::app::App">App</a>) -&gt; Widget</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

View File

@ -1 +1 @@
<!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="API documentation for the Rust `make_world` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, make_world"><title>make_world in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">make_world</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/ltn/crossings.rs.html#234-274">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn make_world(ctx: &amp;EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../app/struct.App.html" title="struct ltn::app::App">App</a>) -&gt; World&lt;<a class="enum" href="enum.Obj.html" title="enum ltn::crossings::Obj">Obj</a>&gt;</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></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="API documentation for the Rust `make_world` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, make_world"><title>make_world in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">make_world</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/ltn/crossings.rs.html#263-314">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn make_world(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;EventCtx&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../app/struct.App.html" title="struct ltn::app::App">App</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;time_to_nearest_crossing: &amp;<a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <a class="struct" href="../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>&gt;<br>) -&gt; World&lt;<a class="enum" href="enum.Obj.html" title="enum ltn::crossings::Obj">Obj</a>&gt;</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

View File

@ -1 +1 @@
<!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="API documentation for the Rust `populate_existing_crossings` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, populate_existing_crossings"><title>populate_existing_crossings in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">populate_existing_crossings</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/ltn/crossings.rs.html#355-372">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn populate_existing_crossings(app: &amp;mut <a class="struct" href="../app/struct.App.html" title="struct ltn::app::App">App</a>)</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></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="API documentation for the Rust `populate_existing_crossings` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, populate_existing_crossings"><title>populate_existing_crossings in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">populate_existing_crossings</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/ltn/crossings.rs.html#395-412">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn populate_existing_crossings(app: &amp;mut <a class="struct" href="../app/struct.App.html" title="struct ltn::app::App">App</a>)</code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

View File

@ -1 +1 @@
<!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="API documentation for the Rust `svg_path` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, svg_path"><title>svg_path in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">svg_path</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/ltn/crossings.rs.html#16-21">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn svg_path(ct: CrossingType) -&gt; &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a></code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></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="API documentation for the Rust `svg_path` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, svg_path"><title>svg_path in ltn::crossings - 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 defer src="sidebar-items.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 fn"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../ltn/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="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::crossings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">crossings</a>::<wbr><a class="fn" href="#">svg_path</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/ltn/crossings.rs.html#17-22">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn svg_path(ct: CrossingType) -&gt; &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a></code></pre></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
window.SIDEBAR_ITEMS = {"enum":[["Obj",""]],"fn":[["boundary_roads",""],["draw_crossings",""],["draw_porosity",""],["help",""],["make_bottom_panel",""],["make_world",""],["populate_existing_crossings",""],["svg_path",""]],"struct":[["Crossings",""]]};
window.SIDEBAR_ITEMS = {"enum":[["Obj",""]],"fn":[["boundary_roads",""],["draw_crossings",""],["draw_nearest_crossing",""],["draw_porosity",""],["help",""],["make_bottom_panel",""],["make_world",""],["populate_existing_crossings",""],["svg_path",""]],"struct":[["Crossings",""],["Item",""]]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -40,9 +40,9 @@ the <code>State</code>-specific state appropriately. <a>Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.on_destroy-8" class="method trait-impl has-srclink"><a href="#method.on_destroy-8" class="anchor"></a><h4 class="code-header">fn <a class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&amp;mut </a>A)</h4></section></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.recreate-8" class="method trait-impl has-srclink"><a href="#method.recreate-8" class="anchor"></a><h4 class="code-header">fn <a class="fnname">recreate</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut EventCtx&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&amp;mut </a>A<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;A&gt; + 'static, <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</h4></section></summary><div class='docblock'><p>Respond to <code>Transition::Recreate</code> by assuming state in the app has changed, but preserving
the <code>State</code>-specific state appropriately. <a>Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-State%3CApp%3E-for-Crossings" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/crossings.rs.html#64-148">source</a></span><a href="#impl-State%3CApp%3E-for-Crossings" class="anchor"></a><h3 class="code-header in-band">impl State&lt;<a class="struct" href="app/struct.App.html" title="struct ltn::app::App">App</a>&gt; for <a class="struct" href="crossings/struct.Crossings.html" title="struct ltn::crossings::Crossings">Crossings</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.event-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/crossings.rs.html#65-131">source</a></span><a href="#method.event-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="app/struct.App.html" title="struct ltn::app::App">App</a>) -&gt; <a class="type" href="app/type.Transition.html" title="type ltn::app::Transition">Transition</a></h4></section></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw-2" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/crossings.rs.html#133-143">source</a></span><a href="#method.draw-2" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="app/struct.App.html" title="struct ltn::app::App">App</a>)</h4></section></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.recreate-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/crossings.rs.html#145-147">source</a></span><a href="#method.recreate-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">recreate</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="app/struct.App.html" title="struct ltn::app::App">App</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="app/struct.App.html" title="struct ltn::app::App">App</a>&gt;&gt;</h4></section></summary><div class='docblock'><p>Respond to <code>Transition::Recreate</code> by assuming state in the app has changed, but preserving
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-State%3CApp%3E-for-Crossings" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/crossings.rs.html#78-177">source</a></span><a href="#impl-State%3CApp%3E-for-Crossings" class="anchor"></a><h3 class="code-header in-band">impl State&lt;<a class="struct" href="app/struct.App.html" title="struct ltn::app::App">App</a>&gt; for <a class="struct" href="crossings/struct.Crossings.html" title="struct ltn::crossings::Crossings">Crossings</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.event-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/crossings.rs.html#79-157">source</a></span><a href="#method.event-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="app/struct.App.html" title="struct ltn::app::App">App</a>) -&gt; <a class="type" href="app/type.Transition.html" title="type ltn::app::Transition">Transition</a></h4></section></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw-2" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/crossings.rs.html#159-172">source</a></span><a href="#method.draw-2" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="app/struct.App.html" title="struct ltn::app::App">App</a>)</h4></section></summary><div class='docblock'><p>Draw</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.recreate-1" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/crossings.rs.html#174-176">source</a></span><a href="#method.recreate-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">recreate</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="app/struct.App.html" title="struct ltn::app::App">App</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="app/struct.App.html" title="struct ltn::app::App">App</a>&gt;&gt;</h4></section></summary><div class='docblock'><p>Respond to <code>Transition::Recreate</code> by assuming state in the app has changed, but preserving
the <code>State</code>-specific state appropriately. <a>Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw_baselayer-2" class="method trait-impl has-srclink"><a href="#method.draw_baselayer-2" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</h4></section></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.on_destroy-1" class="method trait-impl has-srclink"><a href="#method.on_destroy-1" class="anchor"></a><h4 class="code-header">fn <a class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&amp;mut </a>A)</h4></section></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>

View File

@ -1,2 +1,2 @@
<!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="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in map_gui::tools::title_screen::built_info - 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 defer src="sidebar-items.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 constant"><!--[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">&#9776;</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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In map_gui::tools::title_screen::built_info</a></h2></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"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</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/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-d80b0ab9c81dfa7c/out/built.rs.html#78">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>pub const BUILT_TIME_UTC: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a> = r&quot;Mon, 24 Oct 2022 11:38:20 +0000&quot;;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
<!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="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in map_gui::tools::title_screen::built_info - 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 defer src="sidebar-items.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 constant"><!--[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">&#9776;</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><div class="sidebar-elems"><h2 class="location"><a href="index.html">In map_gui::tools::title_screen::built_info</a></h2></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"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</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/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-d80b0ab9c81dfa7c/out/built.rs.html#78">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>pub const BUILT_TIME_UTC: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a> = r&quot;Wed, 26 Oct 2022 13:17:57 +0000&quot;;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
</div></details></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.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -269,6 +269,7 @@
<span id="269">269</span>
<span id="270">270</span>
<span id="271">271</span>
<span id="272">272</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">widgetry::tools::ChooseSomething</span>;
<span class="kw">use</span> <span class="ident">widgetry::tools::PopupMsg</span>;
<span class="kw">use</span> <span class="ident">widgetry</span>::{
@ -440,6 +441,7 @@
<span class="ident">ctx</span>.<span class="ident">style</span>()
.<span class="ident">btn_outline</span>
.<span class="ident">text</span>(<span class="string">&quot;Crossings&quot;</span>)
.<span class="ident">hotkey</span>(<span class="ident">Key::C</span>)
.<span class="ident">disabled</span>(<span class="ident">app</span>.<span class="ident">per_map</span>.<span class="ident">consultation</span>.<span class="ident">is_some</span>())
.<span class="ident">disabled_tooltip</span>(<span class="string">&quot;Not supported here yet&quot;</span>)
.<span class="ident">build_def</span>(<span class="ident">ctx</span>)

View File

@ -345,6 +345,36 @@
<span id="345">345</span>
<span id="346">346</span>
<span id="347">347</span>
<span id="348">348</span>
<span id="349">349</span>
<span id="350">350</span>
<span id="351">351</span>
<span id="352">352</span>
<span id="353">353</span>
<span id="354">354</span>
<span id="355">355</span>
<span id="356">356</span>
<span id="357">357</span>
<span id="358">358</span>
<span id="359">359</span>
<span id="360">360</span>
<span id="361">361</span>
<span id="362">362</span>
<span id="363">363</span>
<span id="364">364</span>
<span id="365">365</span>
<span id="366">366</span>
<span id="367">367</span>
<span id="368">368</span>
<span id="369">369</span>
<span id="370">370</span>
<span id="371">371</span>
<span id="372">372</span>
<span id="373">373</span>
<span id="374">374</span>
<span id="375">375</span>
<span id="376">376</span>
<span id="377">377</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">geom::Polygon</span>;
<span class="kw">use</span> <span class="ident">map_gui::colors::ColorScheme</span>;
<span class="kw">use</span> <span class="ident">osm2streets::CrossingType</span>;
@ -366,6 +396,7 @@
<span class="comment">// (Mode, max zoom, min zoom, bottom bar position)</span>
<span class="ident">panel_cache_key</span>: (<span class="ident">Mode</span>, <span class="ident">bool</span>, <span class="ident">bool</span>, <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">f64</span><span class="op">&gt;</span>),
<span class="ident">show_bus_routes</span>: <span class="ident">bool</span>,
<span class="kw">pub</span> <span class="ident">show_crossing_time</span>: <span class="ident">bool</span>,
}
<span class="kw">impl</span> <span class="ident">Layers</span> {
@ -376,6 +407,7 @@
<span class="ident">minimized</span>: <span class="bool-val">true</span>,
<span class="ident">panel_cache_key</span>: (<span class="ident">Mode::Impact</span>, <span class="bool-val">false</span>, <span class="bool-val">false</span>, <span class="prelude-val">None</span>),
<span class="ident">show_bus_routes</span>: <span class="bool-val">false</span>,
<span class="ident">show_crossing_time</span>: <span class="bool-val">false</span>,
}
}
@ -411,6 +443,11 @@
<span class="self">self</span>.<span class="ident">show_bus_routes</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;show bus routes&quot;</span>);
<span class="self">self</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>, <span class="ident">cs</span>, <span class="ident">bottom_panel</span>);
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">Transition::Keep</span>);
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">x</span> <span class="op">==</span> <span class="string">&quot;show time to nearest crossing&quot;</span> {
<span class="self">self</span>.<span class="ident">show_crossing_time</span> <span class="op">=</span>
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">is_checked</span>(<span class="string">&quot;show time to nearest crossing&quot;</span>);
<span class="self">self</span>.<span class="ident">update_panel</span>(<span class="ident">ctx</span>, <span class="ident">cs</span>, <span class="ident">bottom_panel</span>);
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">Transition::Keep</span>);
}
<span class="ident">ctx</span>.<span class="ident">set_scale_factor</span>(<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">spinner</span>::<span class="op">&lt;</span><span class="ident">RoundedF64</span><span class="op">&gt;</span>(<span class="string">&quot;scale_factor&quot;</span>).<span class="number">0</span>);
@ -507,6 +544,29 @@
<span class="ident">checkbox</span>
}
},
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">panel_cache_key</span>.<span class="number">0</span> <span class="op">==</span> <span class="ident">Mode::Crossings</span> {
<span class="ident">Widget::col</span>(<span class="macro">vec!</span>[
<span class="ident">Toggle::checkbox</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;show time to nearest crossing&quot;</span>,
<span class="prelude-val">None</span>,
<span class="self">self</span>.<span class="ident">show_crossing_time</span>,
),
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
<span class="comment">// TODO White = none</span>
<span class="string">&quot;Time:&quot;</span>.<span class="ident">text_widget</span>(<span class="ident">ctx</span>),
<span class="ident">ColorLegend::gradient_with_width</span>(
<span class="ident">ctx</span>,
<span class="kw-2">&amp;</span><span class="ident">cs</span>.<span class="ident">good_to_bad_red</span>,
<span class="macro">vec!</span>[<span class="string">&quot;&lt; 1 min&quot;</span>, <span class="string">&quot;&gt; 5 mins&quot;</span>],
<span class="number">150.0</span>,
),
])
.<span class="ident">hide</span>(<span class="op">!</span><span class="self">self</span>.<span class="ident">show_crossing_time</span>),
])
} <span class="kw">else</span> {
<span class="ident">Widget::nothing</span>()
},
<span class="ident">Widget::row</span>(<span class="macro">vec!</span>[
<span class="string">&quot;Adjust the size of text:&quot;</span>.<span class="ident">text_widget</span>(<span class="ident">ctx</span>).<span class="ident">centered_vert</span>(),
<span class="ident">Spinner::f64_widget</span>(

View File

@ -370,9 +370,143 @@
<span id="370">370</span>
<span id="371">371</span>
<span id="372">372</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections</span>::{<span class="ident">BTreeMap</span>, <span class="ident">BTreeSet</span>};
<span id="373">373</span>
<span id="374">374</span>
<span id="375">375</span>
<span id="376">376</span>
<span id="377">377</span>
<span id="378">378</span>
<span id="379">379</span>
<span id="380">380</span>
<span id="381">381</span>
<span id="382">382</span>
<span id="383">383</span>
<span id="384">384</span>
<span id="385">385</span>
<span id="386">386</span>
<span id="387">387</span>
<span id="388">388</span>
<span id="389">389</span>
<span id="390">390</span>
<span id="391">391</span>
<span id="392">392</span>
<span id="393">393</span>
<span id="394">394</span>
<span id="395">395</span>
<span id="396">396</span>
<span id="397">397</span>
<span id="398">398</span>
<span id="399">399</span>
<span id="400">400</span>
<span id="401">401</span>
<span id="402">402</span>
<span id="403">403</span>
<span id="404">404</span>
<span id="405">405</span>
<span id="406">406</span>
<span id="407">407</span>
<span id="408">408</span>
<span id="409">409</span>
<span id="410">410</span>
<span id="411">411</span>
<span id="412">412</span>
<span id="413">413</span>
<span id="414">414</span>
<span id="415">415</span>
<span id="416">416</span>
<span id="417">417</span>
<span id="418">418</span>
<span id="419">419</span>
<span id="420">420</span>
<span id="421">421</span>
<span id="422">422</span>
<span id="423">423</span>
<span id="424">424</span>
<span id="425">425</span>
<span id="426">426</span>
<span id="427">427</span>
<span id="428">428</span>
<span id="429">429</span>
<span id="430">430</span>
<span id="431">431</span>
<span id="432">432</span>
<span id="433">433</span>
<span id="434">434</span>
<span id="435">435</span>
<span id="436">436</span>
<span id="437">437</span>
<span id="438">438</span>
<span id="439">439</span>
<span id="440">440</span>
<span id="441">441</span>
<span id="442">442</span>
<span id="443">443</span>
<span id="444">444</span>
<span id="445">445</span>
<span id="446">446</span>
<span id="447">447</span>
<span id="448">448</span>
<span id="449">449</span>
<span id="450">450</span>
<span id="451">451</span>
<span id="452">452</span>
<span id="453">453</span>
<span id="454">454</span>
<span id="455">455</span>
<span id="456">456</span>
<span id="457">457</span>
<span id="458">458</span>
<span id="459">459</span>
<span id="460">460</span>
<span id="461">461</span>
<span id="462">462</span>
<span id="463">463</span>
<span id="464">464</span>
<span id="465">465</span>
<span id="466">466</span>
<span id="467">467</span>
<span id="468">468</span>
<span id="469">469</span>
<span id="470">470</span>
<span id="471">471</span>
<span id="472">472</span>
<span id="473">473</span>
<span id="474">474</span>
<span id="475">475</span>
<span id="476">476</span>
<span id="477">477</span>
<span id="478">478</span>
<span id="479">479</span>
<span id="480">480</span>
<span id="481">481</span>
<span id="482">482</span>
<span id="483">483</span>
<span id="484">484</span>
<span id="485">485</span>
<span id="486">486</span>
<span id="487">487</span>
<span id="488">488</span>
<span id="489">489</span>
<span id="490">490</span>
<span id="491">491</span>
<span id="492">492</span>
<span id="493">493</span>
<span id="494">494</span>
<span id="495">495</span>
<span id="496">496</span>
<span id="497">497</span>
<span id="498">498</span>
<span id="499">499</span>
<span id="500">500</span>
<span id="501">501</span>
<span id="502">502</span>
<span id="503">503</span>
<span id="504">504</span>
<span id="505">505</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::cmp::Ordering</span>;
<span class="kw">use</span> <span class="ident">std::collections</span>::{<span class="ident">BTreeMap</span>, <span class="ident">BTreeSet</span>, <span class="ident">BinaryHeap</span>};
<span class="kw">use</span> <span class="ident">geom::Circle</span>;
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Circle</span>, <span class="ident">Duration</span>};
<span class="kw">use</span> <span class="ident">map_gui::tools::DrawSimpleRoadLabels</span>;
<span class="kw">use</span> <span class="ident">map_model::RoadID</span>;
<span class="kw">use</span> <span class="ident">osm2streets::CrossingType</span>;
@ -399,6 +533,8 @@
<span class="ident">labels</span>: <span class="ident">DrawSimpleRoadLabels</span>,
<span class="ident">draw_porosity</span>: <span class="ident">Drawable</span>,
<span class="ident">draw_crossings</span>: <span class="ident">Toggle3Zoomed</span>,
<span class="ident">draw_nearest_crossing</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Drawable</span><span class="op">&gt;</span>,
<span class="ident">time_to_nearest_crossing</span>: <span class="ident">BTreeMap</span><span class="op">&lt;</span><span class="ident">RoadID</span>, <span class="ident">Duration</span><span class="op">&gt;</span>,
}
<span class="kw">impl</span> <span class="ident">Crossings</span> {
@ -419,17 +555,28 @@
<span class="ident">labels</span>: <span class="ident">DrawSimpleRoadLabels::only_major_roads</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">colors::ROAD_LABEL</span>),
<span class="ident">draw_porosity</span>: <span class="ident">Drawable::empty</span>(<span class="ident">ctx</span>),
<span class="ident">draw_crossings</span>: <span class="ident">Toggle3Zoomed::empty</span>(<span class="ident">ctx</span>),
<span class="ident">draw_nearest_crossing</span>: <span class="prelude-val">None</span>,
<span class="ident">time_to_nearest_crossing</span>: <span class="ident">BTreeMap::new</span>(),
};
<span class="ident">state</span>.<span class="ident">update</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="ident">Box::new</span>(<span class="ident">state</span>)
}
<span class="kw">fn</span> <span class="ident">update</span>(<span class="kw-2">&amp;mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="self">self</span>.<span class="ident">world</span> <span class="op">=</span> <span class="ident">make_world</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">draw_porosity</span> <span class="op">=</span> <span class="ident">draw_porosity</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">draw_crossings</span> <span class="op">=</span> <span class="ident">draw_crossings</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="kw">let</span> <span class="ident">contents</span> <span class="op">=</span> <span class="ident">make_bottom_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">bottom_panel</span> <span class="op">=</span> <span class="ident">BottomPanel::new</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">appwide_panel</span>, <span class="ident">contents</span>);
<span class="self">self</span>.<span class="ident">draw_nearest_crossing</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="self">self</span>.<span class="ident">time_to_nearest_crossing</span>.<span class="ident">clear</span>();
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">layers</span>.<span class="ident">show_crossing_time</span> {
<span class="kw">let</span> (<span class="ident">draw</span>, <span class="ident">time</span>) <span class="op">=</span> <span class="ident">draw_nearest_crossing</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">draw_nearest_crossing</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">draw</span>);
<span class="self">self</span>.<span class="ident">time_to_nearest_crossing</span> <span class="op">=</span> <span class="ident">time</span>;
}
<span class="self">self</span>.<span class="ident">world</span> <span class="op">=</span> <span class="ident">make_world</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">time_to_nearest_crossing</span>);
}
}
@ -446,6 +593,18 @@
.<span class="ident">layers</span>
.<span class="ident">event</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">cs</span>, <span class="ident">Mode::Crossings</span>, <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">bottom_panel</span>))
{
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">layers</span>.<span class="ident">show_crossing_time</span> <span class="op">!</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">draw_nearest_crossing</span>.<span class="ident">is_some</span>() {
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">layers</span>.<span class="ident">show_crossing_time</span> {
<span class="kw">let</span> (<span class="ident">draw</span>, <span class="ident">time</span>) <span class="op">=</span> <span class="ident">draw_nearest_crossing</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">draw_nearest_crossing</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">draw</span>);
<span class="self">self</span>.<span class="ident">time_to_nearest_crossing</span> <span class="op">=</span> <span class="ident">time</span>;
} <span class="kw">else</span> {
<span class="self">self</span>.<span class="ident">draw_nearest_crossing</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="self">self</span>.<span class="ident">time_to_nearest_crossing</span>.<span class="ident">clear</span>();
}
<span class="self">self</span>.<span class="ident">world</span> <span class="op">=</span> <span class="ident">make_world</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">time_to_nearest_crossing</span>);
}
<span class="kw">return</span> <span class="ident">t</span>;
}
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">Outcome::Clicked</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">bottom_panel</span>.<span class="ident">event</span>(<span class="ident">ctx</span>) {
@ -509,6 +668,9 @@
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">draw_porosity</span>);
<span class="self">self</span>.<span class="ident">labels</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
<span class="ident">app</span>.<span class="ident">per_map</span>.<span class="ident">draw_poi_icons</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="kw-2">ref</span> <span class="ident">draw</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">draw_nearest_crossing</span> {
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="ident">draw</span>);
}
<span class="self">self</span>.<span class="ident">draw_crossings</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
<span class="comment">// Draw on top of crossings, so hover state is visible</span>
<span class="self">self</span>.<span class="ident">world</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
@ -603,7 +765,11 @@
<span class="kw">impl</span> <span class="ident">ObjectID</span> <span class="kw">for</span> <span class="ident">Obj</span> {}
<span class="kw">fn</span> <span class="ident">make_world</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) -&gt; <span class="ident">World</span><span class="op">&lt;</span><span class="ident">Obj</span><span class="op">&gt;</span> {
<span class="kw">fn</span> <span class="ident">make_world</span>(
<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>,
<span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>,
<span class="ident">time_to_nearest_crossing</span>: <span class="kw-2">&amp;</span><span class="ident">BTreeMap</span><span class="op">&lt;</span><span class="ident">RoadID</span>, <span class="ident">Duration</span><span class="op">&gt;</span>,
) -&gt; <span class="ident">World</span><span class="op">&lt;</span><span class="ident">Obj</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">per_map</span>.<span class="ident">map</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">world</span> <span class="op">=</span> <span class="ident">World::bounded</span>(<span class="ident">map</span>.<span class="ident">get_bounds</span>());
@ -638,6 +804,13 @@
.<span class="ident">hover_color</span>(<span class="ident">colors::HOVER</span>)
.<span class="ident">zorder</span>(<span class="number">0</span>)
.<span class="ident">clickable</span>()
.<span class="ident">maybe_tooltip</span>(<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">time</span>) <span class="op">=</span> <span class="ident">time_to_nearest_crossing</span>.<span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="ident">r</span>) {
<span class="prelude-val">Some</span>(<span class="ident">Text::from</span>(<span class="ident">Line</span>(<span class="macro">format!</span>(
<span class="string">&quot;{time} walking to the nearest crossing&quot;</span>
))))
} <span class="kw">else</span> {
<span class="prelude-val">None</span>
})
.<span class="ident">build</span>(<span class="ident">ctx</span>);
}
@ -742,5 +915,98 @@
}
}
}
<span class="kw">fn</span> <span class="ident">draw_nearest_crossing</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) -&gt; (<span class="ident">Drawable</span>, <span class="ident">BTreeMap</span><span class="op">&lt;</span><span class="ident">RoadID</span>, <span class="ident">Duration</span><span class="op">&gt;</span>) {
<span class="comment">// Consider the undirected graph of boundary roads. Floodfill from each crossing and count the</span>
<span class="comment">// walking time to the nearest crossing, at road segment granularity.</span>
<span class="comment">//</span>
<span class="comment">// Note this is weird -- the nearest crossing might not be in the direction someone wants to</span>
<span class="comment">// go!</span>
<span class="kw">let</span> <span class="ident">boundary_roads</span> <span class="op">=</span> <span class="ident">boundary_roads</span>(<span class="ident">app</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">queue</span>: <span class="ident">BinaryHeap</span><span class="op">&lt;</span><span class="ident">Item</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">BinaryHeap::new</span>();
<span class="kw">for</span> <span class="ident">r</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">boundary_roads</span> {
<span class="kw">if</span> <span class="ident">app</span>.<span class="ident">edits</span>().<span class="ident">crossings</span>.<span class="ident">contains_key</span>(<span class="ident">r</span>) {
<span class="ident">queue</span>.<span class="ident">push</span>(<span class="ident">Item</span> {
<span class="ident">cost</span>: <span class="ident">Duration::ZERO</span>,
<span class="ident">node</span>: <span class="kw-2">*</span><span class="ident">r</span>,
});
}
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">cost_per_node</span>: <span class="ident">BTreeMap</span><span class="op">&lt;</span><span class="ident">RoadID</span>, <span class="ident">Duration</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">BTreeMap::new</span>();
<span class="kw">while</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">current</span>) <span class="op">=</span> <span class="ident">queue</span>.<span class="ident">pop</span>() {
<span class="kw">if</span> <span class="ident">cost_per_node</span>.<span class="ident">contains_key</span>(<span class="kw-2">&amp;</span><span class="ident">current</span>.<span class="ident">node</span>) {
<span class="kw">continue</span>;
}
<span class="ident">cost_per_node</span>.<span class="ident">insert</span>(<span class="ident">current</span>.<span class="ident">node</span>, <span class="ident">current</span>.<span class="ident">cost</span>);
<span class="comment">// Walk to all boundary roads connected at either endpoint</span>
<span class="kw">for</span> <span class="ident">next</span> <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">per_map</span>.<span class="ident">map</span>.<span class="ident">get_next_roads</span>(<span class="ident">current</span>.<span class="ident">node</span>) {
<span class="kw">if</span> <span class="ident">boundary_roads</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">next</span>) {
<span class="kw">let</span> <span class="ident">cost</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">per_map</span>.<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="ident">next</span>).<span class="ident">length</span>() <span class="op">/</span> <span class="ident">map_model::MAX_WALKING_SPEED</span>;
<span class="ident">queue</span>.<span class="ident">push</span>(<span class="ident">Item</span> {
<span class="ident">cost</span>: <span class="ident">current</span>.<span class="ident">cost</span> <span class="op">+</span> <span class="ident">cost</span>,
<span class="ident">node</span>: <span class="ident">next</span>,
});
}
}
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">drawn_intersections</span> <span class="op">=</span> <span class="ident">BTreeSet::new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch::new</span>();
<span class="kw">for</span> (<span class="ident">r</span>, <span class="ident">time</span>) <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">cost_per_node</span> {
<span class="kw">let</span> <span class="ident">scale</span> <span class="op">=</span> <span class="kw">if</span> <span class="kw-2">*</span><span class="ident">time</span> <span class="op">&lt;</span> <span class="ident">Duration::minutes</span>(<span class="number">1</span>) {
<span class="kw">continue</span>;
} <span class="kw">else</span> <span class="kw">if</span> <span class="kw-2">*</span><span class="ident">time</span> <span class="op">&lt;</span> <span class="ident">Duration::minutes</span>(<span class="number">2</span>) {
<span class="number">0.2</span>
} <span class="kw">else</span> <span class="kw">if</span> <span class="kw-2">*</span><span class="ident">time</span> <span class="op">&lt;</span> <span class="ident">Duration::minutes</span>(<span class="number">3</span>) {
<span class="number">0.4</span>
} <span class="kw">else</span> <span class="kw">if</span> <span class="kw-2">*</span><span class="ident">time</span> <span class="op">&lt;</span> <span class="ident">Duration::minutes</span>(<span class="number">4</span>) {
<span class="number">0.6</span>
} <span class="kw">else</span> <span class="kw">if</span> <span class="kw-2">*</span><span class="ident">time</span> <span class="op">&lt;</span> <span class="ident">Duration::minutes</span>(<span class="number">5</span>) {
<span class="number">0.8</span>
} <span class="kw">else</span> {
<span class="number">1.0</span>
};
<span class="kw">let</span> <span class="ident">color</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">good_to_bad_red</span>.<span class="ident">eval</span>(<span class="ident">scale</span>);
<span class="kw">let</span> <span class="ident">road</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">per_map</span>.<span class="ident">map</span>.<span class="ident">get_r</span>(<span class="kw-2">*</span><span class="ident">r</span>);
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">color</span>, <span class="ident">road</span>.<span class="ident">get_thick_polygon</span>());
<span class="comment">// Color the intersections too, and don&#39;t worry if the colors differ. Just be less weird</span>
<span class="comment">// looking.</span>
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> [<span class="ident">road</span>.<span class="ident">src_i</span>, <span class="ident">road</span>.<span class="ident">dst_i</span>] {
<span class="kw">if</span> <span class="ident">drawn_intersections</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">i</span>) {
<span class="kw">continue</span>;
}
<span class="ident">drawn_intersections</span>.<span class="ident">insert</span>(<span class="ident">i</span>);
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">color</span>, <span class="ident">app</span>.<span class="ident">per_map</span>.<span class="ident">map</span>.<span class="ident">get_i</span>(<span class="ident">i</span>).<span class="ident">polygon</span>.<span class="ident">clone</span>());
}
}
(<span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">batch</span>), <span class="ident">cost_per_node</span>)
}
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">PartialEq</span>, <span class="ident">Eq</span>)]</span>
<span class="kw">struct</span> <span class="ident">Item</span> {
<span class="ident">cost</span>: <span class="ident">Duration</span>,
<span class="ident">node</span>: <span class="ident">RoadID</span>,
}
<span class="kw">impl</span> <span class="ident">PartialOrd</span> <span class="kw">for</span> <span class="ident">Item</span> {
<span class="kw">fn</span> <span class="ident">partial_cmp</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&amp;</span><span class="ident">Item</span>) -&gt; <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Ordering</span><span class="op">&gt;</span> {
<span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">cmp</span>(<span class="ident">other</span>))
}
}
<span class="kw">impl</span> <span class="ident">Ord</span> <span class="kw">for</span> <span class="ident">Item</span> {
<span class="kw">fn</span> <span class="ident">cmp</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&amp;</span><span class="ident">Item</span>) -&gt; <span class="ident">Ordering</span> {
<span class="comment">// BinaryHeap is a max-heap, so reverse the comparison to get smallest times first.</span>
<span class="kw">let</span> <span class="ident">ord</span> <span class="op">=</span> <span class="ident">other</span>.<span class="ident">cost</span>.<span class="ident">cmp</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">cost</span>);
<span class="kw">if</span> <span class="ident">ord</span> <span class="op">!</span><span class="op">=</span> <span class="ident">Ordering::Equal</span> {
<span class="kw">return</span> <span class="ident">ord</span>;
}
<span class="self">self</span>.<span class="ident">node</span>.<span class="ident">cmp</span>(<span class="kw-2">&amp;</span><span class="ident">other</span>.<span class="ident">node</span>)
}
}
</code></pre></div>
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>

View File

@ -174,7 +174,7 @@
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;rustdoc 1.64.0 (a55dd71d5 2022-09-19)&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The build time in RFC2822, UTC.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Mon, 24 Oct 2022 11:38:20 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Wed, 26 Oct 2022 13:17:57 +0000&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The target architecture, given by `CARGO_CFG_TARGET_ARCH`.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;x86_64&quot;</span>;

View File

@ -681,6 +681,15 @@
<span id="681">681</span>
<span id="682">682</span>
<span id="683">683</span>
<span id="684">684</span>
<span id="685">685</span>
<span id="686">686</span>
<span id="687">687</span>
<span id="688">688</span>
<span id="689">689</span>
<span id="690">690</span>
<span id="691">691</span>
<span id="692">692</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections::HashMap</span>;
<span class="kw">use</span> <span class="ident">std::fmt::Debug</span>;
<span class="kw">use</span> <span class="ident">std::hash::Hash</span>;
@ -927,6 +936,15 @@
<span class="self">self</span>.<span class="ident">draw_hovered</span>(<span class="ident">GeomBatch::new</span>())
}
<span class="doccomment">/// Maybe draw a tooltip while hovering over this object.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">maybe_tooltip</span>(<span class="self">self</span>, <span class="ident">txt</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Text</span><span class="op">&gt;</span>) -&gt; <span class="self">Self</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">txt</span>) <span class="op">=</span> <span class="ident">txt</span> {
<span class="self">self</span>.<span class="ident">tooltip</span>(<span class="ident">txt</span>)
} <span class="kw">else</span> {
<span class="self">self</span>
}
}
<span class="doccomment">/// Draw a tooltip while hovering over this object.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">tooltip</span>(<span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">txt</span>: <span class="ident">Text</span>) -&gt; <span class="self">Self</span> {
<span class="macro">assert!</span>(<span class="self">self</span>.<span class="ident">tooltip</span>.<span class="ident">is_none</span>(), <span class="string">&quot;already specified tooltip&quot;</span>);

File diff suppressed because one or more lines are too long

View File

@ -6,38 +6,38 @@
dragging_from: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a>)&gt;,
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>World</code> manages objects that exist in “map-space”, the zoomable and pannable canvas. These
objects can be drawn, hovered on, clicked, dragged, etc.</p>
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.objects" class="structfield small-section-header"><a href="#structfield.objects" class="anchor field"></a><code>objects: <a class="struct" href="https://doc.rust-lang.org/1.64.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a>&lt;ID, <a class="struct" href="world/struct.Object.html" title="struct widgetry::mapspace::world::Object">Object</a>&lt;ID&gt;&gt;</code></span><span id="structfield.quadtree" class="structfield small-section-header"><a href="#structfield.quadtree" class="anchor field"></a><code>quadtree: QuadTree&lt;ID&gt;</code></span><span id="structfield.draw_master_batches" class="structfield small-section-header"><a href="#structfield.draw_master_batches" class="anchor field"></a><code>draw_master_batches: <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>&gt;</code></span><span id="structfield.hovering" class="structfield small-section-header"><a href="#structfield.hovering" class="anchor field"></a><code>hovering: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</code></span><span id="structfield.dragging_from" class="structfield small-section-header"><a href="#structfield.dragging_from" class="anchor field"></a><code>dragging_from: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a>)&gt;</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-World%3CID%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#337-666">source</a></span><a href="#impl-World%3CID%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;ID:&nbsp;<a class="trait" href="world/trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>&gt; <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.unbounded" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#339-352">source</a></span><h4 class="code-header">pub fn <a href="#method.unbounded" class="fnname">unbounded</a>() -&gt; <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist anywhere from (0, 0) to the max f64.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.bounded" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#355-365">source</a></span><h4 class="code-header">pub fn <a href="#method.bounded" class="fnname">bounded</a>(bounds: &amp;<a class="struct" href="../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>) -&gt; <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist in the provided rectangular boundary.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#369-384">source</a></span><h4 class="code-header">pub fn <a href="#method.add" class="fnname">add</a>(&amp;mut self, id: ID) -&gt; <a class="struct" href="world/struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a>&lt;'_, ID&gt;</h4></section></summary><div class="docblock"><p>Start adding an object to the <code>World</code>. The caller should specify the object with methods on
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.objects" class="structfield small-section-header"><a href="#structfield.objects" class="anchor field"></a><code>objects: <a class="struct" href="https://doc.rust-lang.org/1.64.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a>&lt;ID, <a class="struct" href="world/struct.Object.html" title="struct widgetry::mapspace::world::Object">Object</a>&lt;ID&gt;&gt;</code></span><span id="structfield.quadtree" class="structfield small-section-header"><a href="#structfield.quadtree" class="anchor field"></a><code>quadtree: QuadTree&lt;ID&gt;</code></span><span id="structfield.draw_master_batches" class="structfield small-section-header"><a href="#structfield.draw_master_batches" class="anchor field"></a><code>draw_master_batches: <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>&gt;</code></span><span id="structfield.hovering" class="structfield small-section-header"><a href="#structfield.hovering" class="anchor field"></a><code>hovering: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</code></span><span id="structfield.dragging_from" class="structfield small-section-header"><a href="#structfield.dragging_from" class="anchor field"></a><code>dragging_from: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a>)&gt;</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-World%3CID%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#346-675">source</a></span><a href="#impl-World%3CID%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;ID:&nbsp;<a class="trait" href="world/trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>&gt; <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.unbounded" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#348-361">source</a></span><h4 class="code-header">pub fn <a href="#method.unbounded" class="fnname">unbounded</a>() -&gt; <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist anywhere from (0, 0) to the max f64.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.bounded" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#364-374">source</a></span><h4 class="code-header">pub fn <a href="#method.bounded" class="fnname">bounded</a>(bounds: &amp;<a class="struct" href="../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>) -&gt; <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist in the provided rectangular boundary.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#378-393">source</a></span><h4 class="code-header">pub fn <a href="#method.add" class="fnname">add</a>(&amp;mut self, id: ID) -&gt; <a class="struct" href="world/struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a>&lt;'_, ID&gt;</h4></section></summary><div class="docblock"><p>Start adding an object to the <code>World</code>. The caller should specify the object with methods on
<code>ObjectBuilder</code>, then call <code>build</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.delete" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#388-397">source</a></span><h4 class="code-header">pub fn <a href="#method.delete" class="fnname">delete</a>(&amp;mut self, id: ID)</h4></section></summary><div class="docblock"><p>Delete an object. Not idempotent this will panic if the object doesnt exist. Will panic
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.delete" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#397-406">source</a></span><h4 class="code-header">pub fn <a href="#method.delete" class="fnname">delete</a>(&amp;mut self, id: ID)</h4></section></summary><div class="docblock"><p>Delete an object. Not idempotent this will panic if the object doesnt exist. Will panic
if the object is deleted in the middle of being dragged.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.delete_before_replacement" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#401-411">source</a></span><h4 class="code-header">pub fn <a href="#method.delete_before_replacement" class="fnname">delete_before_replacement</a>(&amp;mut self, id: ID)</h4></section></summary><div class="docblock"><p>Delete an object, with the promise to recreate it with the same ID before the next call to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.delete_before_replacement" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#410-420">source</a></span><h4 class="code-header">pub fn <a href="#method.delete_before_replacement" class="fnname">delete_before_replacement</a>(&amp;mut self, id: ID)</h4></section></summary><div class="docblock"><p>Delete an object, with the promise to recreate it with the same ID before the next call to
<code>event</code>. This may be called while the object is being hovered on or dragged.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.maybe_delete" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#414-429">source</a></span><h4 class="code-header">pub fn <a href="#method.maybe_delete" class="fnname">maybe_delete</a>(&amp;mut self, id: ID)</h4></section></summary><div class="docblock"><p>Like delete, but doesnt crash if the object doesnt exist</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.initialize_hover" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#437-442">source</a></span><h4 class="code-header">pub fn <a href="#method.initialize_hover" class="fnname">initialize_hover</a>(&amp;mut self, ctx: &amp;<a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;)</h4></section></summary><div class="docblock"><p>After adding all objects to a <code>World</code>, call this to initially detect if the cursor is
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.maybe_delete" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#423-438">source</a></span><h4 class="code-header">pub fn <a href="#method.maybe_delete" class="fnname">maybe_delete</a>(&amp;mut self, id: ID)</h4></section></summary><div class="docblock"><p>Like delete, but doesnt crash if the object doesnt exist</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.initialize_hover" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#446-451">source</a></span><h4 class="code-header">pub fn <a href="#method.initialize_hover" class="fnname">initialize_hover</a>(&amp;mut self, ctx: &amp;<a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;)</h4></section></summary><div class="docblock"><p>After adding all objects to a <code>World</code>, call this to initially detect if the cursor is
hovering on an object. This may also be called after adding or deleting objects to
immediately recalculate hover before the mouse moves.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hack_unset_hovering" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#446-448">source</a></span><h4 class="code-header">pub fn <a href="#method.hack_unset_hovering" class="fnname">hack_unset_hovering</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Forcibly reset the hovering state to empty. This is a necessary hack when launching a new
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hack_unset_hovering" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#455-457">source</a></span><h4 class="code-header">pub fn <a href="#method.hack_unset_hovering" class="fnname">hack_unset_hovering</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Forcibly reset the hovering state to empty. This is a necessary hack when launching a new
state that uses <code>DrawBaselayer::PreviousState</code> and has tooltips.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rebuilt_during_drag" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#457-463">source</a></span><h4 class="code-header">pub fn <a href="#method.rebuilt_during_drag" class="fnname">rebuilt_during_drag</a>(&amp;mut self, prev_world: &amp;<a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;)</h4></section></summary><div class="docblock"><p>If a drag event causes the world to be totally rebuilt, call this with the previous world
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rebuilt_during_drag" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#466-472">source</a></span><h4 class="code-header">pub fn <a href="#method.rebuilt_during_drag" class="fnname">rebuilt_during_drag</a>(&amp;mut self, prev_world: &amp;<a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;)</h4></section></summary><div class="docblock"><p>If a drag event causes the world to be totally rebuilt, call this with the previous world
to preserve the ongoing drag.</p>
<p>This should be called after <code>initialize_hover</code>.</p>
<p>Important: the rebuilt world must include the same object ID thats currently being dragged
from the previous world.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw_master_batch" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#467-469">source</a></span><h4 class="code-header">pub fn <a href="#method.draw_master_batch" class="fnname">draw_master_batch</a>&lt;I:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="struct.ToggleZoomedBuilder.html" title="struct widgetry::mapspace::ToggleZoomedBuilder">ToggleZoomedBuilder</a>&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;<a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;draw: I<br>)</h4></section></summary><div class="docblock"><p>Draw something underneath all objects. This is useful for performance, when a large number
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw_master_batch" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#476-478">source</a></span><h4 class="code-header">pub fn <a href="#method.draw_master_batch" class="fnname">draw_master_batch</a>&lt;I:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="struct.ToggleZoomedBuilder.html" title="struct widgetry::mapspace::ToggleZoomedBuilder">ToggleZoomedBuilder</a>&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;<a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;draw: I<br>)</h4></section></summary><div class="docblock"><p>Draw something underneath all objects. This is useful for performance, when a large number
of objects never change appearance.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw_master_batch_built" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#472-474">source</a></span><h4 class="code-header">pub fn <a href="#method.draw_master_batch_built" class="fnname">draw_master_batch_built</a>(&amp;mut self, draw: <a class="struct" href="struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>)</h4></section></summary><div class="docblock"><p>Like <code>draw_master_batch</code>, but for already-built objects.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.event" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#477-578">source</a></span><h4 class="code-header">pub fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="enum" href="world/enum.WorldOutcome.html" title="enum widgetry::mapspace::world::WorldOutcome">WorldOutcome</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Let objects in the world respond to something happening.</p>
</div></details><section id="method.calculate_hover" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#580-602">source</a></span><h4 class="code-header">fn <a href="#method.calculate_hover" class="fnname">calculate_hover</a>(&amp;self, cursor: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#605-633">source</a></span><h4 class="code-header">pub fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="../drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4></section></summary><div class="docblock"><p>Draw objects in the world thatre currently visible.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_hovering" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#636-638">source</a></span><h4 class="code-header">pub fn <a href="#method.get_hovering" class="fnname">get_hovering</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Returns the object currently hovered on.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.override_tooltip" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#641-648">source</a></span><h4 class="code-header">pub fn <a href="#method.override_tooltip" class="fnname">override_tooltip</a>(&amp;mut self, id: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&amp;</a>ID, tooltip: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../text/struct.Text.html" title="struct widgetry::text::Text">Text</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Change an objects tooltip. Returns true for success, false if the object didnt exist.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.calculate_hovering" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#653-659">source</a></span><h4 class="code-header">pub fn <a href="#method.calculate_hovering" class="fnname">calculate_hovering</a>(&amp;self, ctx: &amp;<a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Calculate the object currently underneath the cursor. This should only be used when the
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw_master_batch_built" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#481-483">source</a></span><h4 class="code-header">pub fn <a href="#method.draw_master_batch_built" class="fnname">draw_master_batch_built</a>(&amp;mut self, draw: <a class="struct" href="struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>)</h4></section></summary><div class="docblock"><p>Like <code>draw_master_batch</code>, but for already-built objects.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.event" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#486-587">source</a></span><h4 class="code-header">pub fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="enum" href="world/enum.WorldOutcome.html" title="enum widgetry::mapspace::world::WorldOutcome">WorldOutcome</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Let objects in the world respond to something happening.</p>
</div></details><section id="method.calculate_hover" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#589-611">source</a></span><h4 class="code-header">fn <a href="#method.calculate_hover" class="fnname">calculate_hover</a>(&amp;self, cursor: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#614-642">source</a></span><h4 class="code-header">pub fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="../drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4></section></summary><div class="docblock"><p>Draw objects in the world thatre currently visible.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_hovering" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#645-647">source</a></span><h4 class="code-header">pub fn <a href="#method.get_hovering" class="fnname">get_hovering</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Returns the object currently hovered on.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.override_tooltip" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#650-657">source</a></span><h4 class="code-header">pub fn <a href="#method.override_tooltip" class="fnname">override_tooltip</a>(&amp;mut self, id: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&amp;</a>ID, tooltip: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../text/struct.Text.html" title="struct widgetry::text::Text">Text</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Change an objects tooltip. Returns true for success, false if the object didnt exist.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.calculate_hovering" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#662-668">source</a></span><h4 class="code-header">pub fn <a href="#method.calculate_hovering" class="fnname">calculate_hovering</a>(&amp;self, ctx: &amp;<a class="struct" href="../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Calculate the object currently underneath the cursor. This should only be used when the
<code>World</code> is not being actively updated by calling <code>event</code>. If another state temporarily
needs to disable most interactions with objects, it can poll this instead.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_hovered_keybindings" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#663-665">source</a></span><h4 class="code-header">pub fn <a href="#method.get_hovered_keybindings" class="fnname">get_hovered_keybindings</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;(<a class="enum" href="../event/enum.MultiKey.html" title="enum widgetry::event::MultiKey">MultiKey</a>, &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>)&gt;&gt;</h4></section></summary><div class="docblock"><p>If an object is currently being hovered on, return its keybindings. This should be used to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_hovered_keybindings" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#672-674">source</a></span><h4 class="code-header">pub fn <a href="#method.get_hovered_keybindings" class="fnname">get_hovered_keybindings</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;(<a class="enum" href="../event/enum.MultiKey.html" title="enum widgetry::event::MultiKey">MultiKey</a>, &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>)&gt;&gt;</h4></section></summary><div class="docblock"><p>If an object is currently being hovered on, return its keybindings. This should be used to
describe interactions; to detect the keypresses, listen for <code>WorldOutcome::Keypress</code>.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-World%3CDummyID%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#673-683">source</a></span><a href="#impl-World%3CDummyID%3E" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;<a class="struct" href="world/struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add_unnamed" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#680-682">source</a></span><h4 class="code-header">pub fn <a href="#method.add_unnamed" class="fnname">add_unnamed</a>(&amp;mut self) -&gt; <a class="struct" href="world/struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a>&lt;'_, <a class="struct" href="world/struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>&gt;</h4></section></summary><div class="docblock"><p>Begin adding an unnamed object to the <code>World</code>.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-World%3CDummyID%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#682-692">source</a></span><a href="#impl-World%3CDummyID%3E" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="world/struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;<a class="struct" href="world/struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add_unnamed" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/widgetry/mapspace/world.rs.html#689-691">source</a></span><h4 class="code-header">pub fn <a href="#method.add_unnamed" class="fnname">add_unnamed</a>(&amp;mut self) -&gt; <a class="struct" href="world/struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a>&lt;'_, <a class="struct" href="world/struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>&gt;</h4></section></summary><div class="docblock"><p>Begin adding an unnamed object to the <code>World</code>.</p>
<p>Note: You must call <code>build</code> on this object before calling <code>add_unnamed</code> again. Otherwise,
the object IDs will collide.</p>
<p>TODO This will break when objects are deleted!</p>

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
<!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="API documentation for the Rust `world` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, world"><title>widgetry::mapspace::world - 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 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">&#9776;</button><a class="sidebar-logo" href="../../../widgetry/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="../../../widgetry/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module world</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li></ul></div></section></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../widgetry/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></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">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a class="mod" href="#">world</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/widgetry/mapspace/world.rs.html#1-683">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></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.DummyID.html" title="widgetry::mapspace::world::DummyID struct">DummyID</a></div><div class="item-right docblock-short"><p>If you dont ever need to refer to objects in a <code>World</code>, you can auto-assign dummy IDs.</p>
<!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="API documentation for the Rust `world` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, world"><title>widgetry::mapspace::world - 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 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">&#9776;</button><a class="sidebar-logo" href="../../../widgetry/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="../../../widgetry/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module world</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li></ul></div></section></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../widgetry/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><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"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></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">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a class="mod" href="#">world</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/widgetry/mapspace/world.rs.html#1-692">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></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.DummyID.html" title="widgetry::mapspace::world::DummyID struct">DummyID</a></div><div class="item-right docblock-short"><p>If you dont ever need to refer to objects in a <code>World</code>, you can auto-assign dummy IDs.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Object.html" title="widgetry::mapspace::world::Object struct">Object</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ObjectBuilder.html" title="widgetry::mapspace::world::ObjectBuilder struct">ObjectBuilder</a></div><div class="item-right docblock-short"><p>This provides a builder API for adding objects to a <code>World</code>.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.World.html" title="widgetry::mapspace::world::World struct">World</a></div><div class="item-right docblock-short"><p>A <code>World</code> manages objects that exist in “map-space”, the zoomable and pannable canvas. These
objects can be drawn, hovered on, clicked, dragged, etc.</p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,38 +6,38 @@
dragging_from: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a>)&gt;,
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A <code>World</code> manages objects that exist in “map-space”, the zoomable and pannable canvas. These
objects can be drawn, hovered on, clicked, dragged, etc.</p>
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.objects" class="structfield small-section-header"><a href="#structfield.objects" class="anchor field"></a><code>objects: <a class="struct" href="https://doc.rust-lang.org/1.64.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a>&lt;ID, <a class="struct" href="struct.Object.html" title="struct widgetry::mapspace::world::Object">Object</a>&lt;ID&gt;&gt;</code></span><span id="structfield.quadtree" class="structfield small-section-header"><a href="#structfield.quadtree" class="anchor field"></a><code>quadtree: QuadTree&lt;ID&gt;</code></span><span id="structfield.draw_master_batches" class="structfield small-section-header"><a href="#structfield.draw_master_batches" class="anchor field"></a><code>draw_master_batches: <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>&gt;</code></span><span id="structfield.hovering" class="structfield small-section-header"><a href="#structfield.hovering" class="anchor field"></a><code>hovering: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</code></span><span id="structfield.dragging_from" class="structfield small-section-header"><a href="#structfield.dragging_from" class="anchor field"></a><code>dragging_from: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a>)&gt;</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-World%3CID%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#337-666">source</a></span><a href="#impl-World%3CID%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;ID:&nbsp;<a class="trait" href="trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>&gt; <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.unbounded" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#339-352">source</a></span><h4 class="code-header">pub fn <a href="#method.unbounded" class="fnname">unbounded</a>() -&gt; <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist anywhere from (0, 0) to the max f64.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.bounded" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#355-365">source</a></span><h4 class="code-header">pub fn <a href="#method.bounded" class="fnname">bounded</a>(bounds: &amp;<a class="struct" href="../../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>) -&gt; <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist in the provided rectangular boundary.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#369-384">source</a></span><h4 class="code-header">pub fn <a href="#method.add" class="fnname">add</a>(&amp;mut self, id: ID) -&gt; <a class="struct" href="struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a>&lt;'_, ID&gt;</h4></section></summary><div class="docblock"><p>Start adding an object to the <code>World</code>. The caller should specify the object with methods on
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.objects" class="structfield small-section-header"><a href="#structfield.objects" class="anchor field"></a><code>objects: <a class="struct" href="https://doc.rust-lang.org/1.64.0/std/collections/hash/map/struct.HashMap.html" title="struct std::collections::hash::map::HashMap">HashMap</a>&lt;ID, <a class="struct" href="struct.Object.html" title="struct widgetry::mapspace::world::Object">Object</a>&lt;ID&gt;&gt;</code></span><span id="structfield.quadtree" class="structfield small-section-header"><a href="#structfield.quadtree" class="anchor field"></a><code>quadtree: QuadTree&lt;ID&gt;</code></span><span id="structfield.draw_master_batches" class="structfield small-section-header"><a href="#structfield.draw_master_batches" class="anchor field"></a><code>draw_master_batches: <a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>&gt;</code></span><span id="structfield.hovering" class="structfield small-section-header"><a href="#structfield.hovering" class="anchor field"></a><code>hovering: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</code></span><span id="structfield.dragging_from" class="structfield small-section-header"><a href="#structfield.dragging_from" class="anchor field"></a><code>dragging_from: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>, <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a>)&gt;</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-World%3CID%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#346-675">source</a></span><a href="#impl-World%3CID%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;ID:&nbsp;<a class="trait" href="trait.ObjectID.html" title="trait widgetry::mapspace::world::ObjectID">ObjectID</a>&gt; <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.unbounded" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#348-361">source</a></span><h4 class="code-header">pub fn <a href="#method.unbounded" class="fnname">unbounded</a>() -&gt; <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist anywhere from (0, 0) to the max f64.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.bounded" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#364-374">source</a></span><h4 class="code-header">pub fn <a href="#method.bounded" class="fnname">bounded</a>(bounds: &amp;<a class="struct" href="../../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a>) -&gt; <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Creates an empty <code>World</code>, whose objects can exist in the provided rectangular boundary.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#378-393">source</a></span><h4 class="code-header">pub fn <a href="#method.add" class="fnname">add</a>(&amp;mut self, id: ID) -&gt; <a class="struct" href="struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a>&lt;'_, ID&gt;</h4></section></summary><div class="docblock"><p>Start adding an object to the <code>World</code>. The caller should specify the object with methods on
<code>ObjectBuilder</code>, then call <code>build</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.delete" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#388-397">source</a></span><h4 class="code-header">pub fn <a href="#method.delete" class="fnname">delete</a>(&amp;mut self, id: ID)</h4></section></summary><div class="docblock"><p>Delete an object. Not idempotent this will panic if the object doesnt exist. Will panic
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.delete" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#397-406">source</a></span><h4 class="code-header">pub fn <a href="#method.delete" class="fnname">delete</a>(&amp;mut self, id: ID)</h4></section></summary><div class="docblock"><p>Delete an object. Not idempotent this will panic if the object doesnt exist. Will panic
if the object is deleted in the middle of being dragged.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.delete_before_replacement" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#401-411">source</a></span><h4 class="code-header">pub fn <a href="#method.delete_before_replacement" class="fnname">delete_before_replacement</a>(&amp;mut self, id: ID)</h4></section></summary><div class="docblock"><p>Delete an object, with the promise to recreate it with the same ID before the next call to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.delete_before_replacement" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#410-420">source</a></span><h4 class="code-header">pub fn <a href="#method.delete_before_replacement" class="fnname">delete_before_replacement</a>(&amp;mut self, id: ID)</h4></section></summary><div class="docblock"><p>Delete an object, with the promise to recreate it with the same ID before the next call to
<code>event</code>. This may be called while the object is being hovered on or dragged.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.maybe_delete" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#414-429">source</a></span><h4 class="code-header">pub fn <a href="#method.maybe_delete" class="fnname">maybe_delete</a>(&amp;mut self, id: ID)</h4></section></summary><div class="docblock"><p>Like delete, but doesnt crash if the object doesnt exist</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.initialize_hover" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#437-442">source</a></span><h4 class="code-header">pub fn <a href="#method.initialize_hover" class="fnname">initialize_hover</a>(&amp;mut self, ctx: &amp;<a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;)</h4></section></summary><div class="docblock"><p>After adding all objects to a <code>World</code>, call this to initially detect if the cursor is
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.maybe_delete" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#423-438">source</a></span><h4 class="code-header">pub fn <a href="#method.maybe_delete" class="fnname">maybe_delete</a>(&amp;mut self, id: ID)</h4></section></summary><div class="docblock"><p>Like delete, but doesnt crash if the object doesnt exist</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.initialize_hover" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#446-451">source</a></span><h4 class="code-header">pub fn <a href="#method.initialize_hover" class="fnname">initialize_hover</a>(&amp;mut self, ctx: &amp;<a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;)</h4></section></summary><div class="docblock"><p>After adding all objects to a <code>World</code>, call this to initially detect if the cursor is
hovering on an object. This may also be called after adding or deleting objects to
immediately recalculate hover before the mouse moves.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hack_unset_hovering" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#446-448">source</a></span><h4 class="code-header">pub fn <a href="#method.hack_unset_hovering" class="fnname">hack_unset_hovering</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Forcibly reset the hovering state to empty. This is a necessary hack when launching a new
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hack_unset_hovering" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#455-457">source</a></span><h4 class="code-header">pub fn <a href="#method.hack_unset_hovering" class="fnname">hack_unset_hovering</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Forcibly reset the hovering state to empty. This is a necessary hack when launching a new
state that uses <code>DrawBaselayer::PreviousState</code> and has tooltips.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rebuilt_during_drag" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#457-463">source</a></span><h4 class="code-header">pub fn <a href="#method.rebuilt_during_drag" class="fnname">rebuilt_during_drag</a>(&amp;mut self, prev_world: &amp;<a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;)</h4></section></summary><div class="docblock"><p>If a drag event causes the world to be totally rebuilt, call this with the previous world
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rebuilt_during_drag" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#466-472">source</a></span><h4 class="code-header">pub fn <a href="#method.rebuilt_during_drag" class="fnname">rebuilt_during_drag</a>(&amp;mut self, prev_world: &amp;<a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;ID&gt;)</h4></section></summary><div class="docblock"><p>If a drag event causes the world to be totally rebuilt, call this with the previous world
to preserve the ongoing drag.</p>
<p>This should be called after <code>initialize_hover</code>.</p>
<p>Important: the rebuilt world must include the same object ID thats currently being dragged
from the previous world.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw_master_batch" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#467-469">source</a></span><h4 class="code-header">pub fn <a href="#method.draw_master_batch" class="fnname">draw_master_batch</a>&lt;I:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../struct.ToggleZoomedBuilder.html" title="struct widgetry::mapspace::ToggleZoomedBuilder">ToggleZoomedBuilder</a>&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;<a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;draw: I<br>)</h4></section></summary><div class="docblock"><p>Draw something underneath all objects. This is useful for performance, when a large number
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw_master_batch" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#476-478">source</a></span><h4 class="code-header">pub fn <a href="#method.draw_master_batch" class="fnname">draw_master_batch</a>&lt;I:&nbsp;<a class="trait" href="https://doc.rust-lang.org/1.64.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="../struct.ToggleZoomedBuilder.html" title="struct widgetry::mapspace::ToggleZoomedBuilder">ToggleZoomedBuilder</a>&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;<a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;draw: I<br>)</h4></section></summary><div class="docblock"><p>Draw something underneath all objects. This is useful for performance, when a large number
of objects never change appearance.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw_master_batch_built" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#472-474">source</a></span><h4 class="code-header">pub fn <a href="#method.draw_master_batch_built" class="fnname">draw_master_batch_built</a>(&amp;mut self, draw: <a class="struct" href="../struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>)</h4></section></summary><div class="docblock"><p>Like <code>draw_master_batch</code>, but for already-built objects.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.event" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#477-578">source</a></span><h4 class="code-header">pub fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="enum" href="enum.WorldOutcome.html" title="enum widgetry::mapspace::world::WorldOutcome">WorldOutcome</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Let objects in the world respond to something happening.</p>
</div></details><section id="method.calculate_hover" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#580-602">source</a></span><h4 class="code-header">fn <a href="#method.calculate_hover" class="fnname">calculate_hover</a>(&amp;self, cursor: <a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#605-633">source</a></span><h4 class="code-header">pub fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="../../drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4></section></summary><div class="docblock"><p>Draw objects in the world thatre currently visible.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_hovering" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#636-638">source</a></span><h4 class="code-header">pub fn <a href="#method.get_hovering" class="fnname">get_hovering</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Returns the object currently hovered on.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.override_tooltip" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#641-648">source</a></span><h4 class="code-header">pub fn <a href="#method.override_tooltip" class="fnname">override_tooltip</a>(&amp;mut self, id: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&amp;</a>ID, tooltip: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../text/struct.Text.html" title="struct widgetry::text::Text">Text</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Change an objects tooltip. Returns true for success, false if the object didnt exist.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.calculate_hovering" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#653-659">source</a></span><h4 class="code-header">pub fn <a href="#method.calculate_hovering" class="fnname">calculate_hovering</a>(&amp;self, ctx: &amp;<a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Calculate the object currently underneath the cursor. This should only be used when the
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw_master_batch_built" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#481-483">source</a></span><h4 class="code-header">pub fn <a href="#method.draw_master_batch_built" class="fnname">draw_master_batch_built</a>(&amp;mut self, draw: <a class="struct" href="../struct.ToggleZoomed.html" title="struct widgetry::mapspace::ToggleZoomed">ToggleZoomed</a>)</h4></section></summary><div class="docblock"><p>Like <code>draw_master_batch</code>, but for already-built objects.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.event" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#486-587">source</a></span><h4 class="code-header">pub fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut <a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="enum" href="enum.WorldOutcome.html" title="enum widgetry::mapspace::world::WorldOutcome">WorldOutcome</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Let objects in the world respond to something happening.</p>
</div></details><section id="method.calculate_hover" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#589-611">source</a></span><h4 class="code-header">fn <a href="#method.calculate_hover" class="fnname">calculate_hover</a>(&amp;self, cursor: <a class="struct" href="../../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#614-642">source</a></span><h4 class="code-header">pub fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut <a class="struct" href="../../drawing/struct.GfxCtx.html" title="struct widgetry::drawing::GfxCtx">GfxCtx</a>&lt;'_&gt;)</h4></section></summary><div class="docblock"><p>Draw objects in the world thatre currently visible.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_hovering" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#645-647">source</a></span><h4 class="code-header">pub fn <a href="#method.get_hovering" class="fnname">get_hovering</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Returns the object currently hovered on.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.override_tooltip" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#650-657">source</a></span><h4 class="code-header">pub fn <a href="#method.override_tooltip" class="fnname">override_tooltip</a>(&amp;mut self, id: <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.reference.html">&amp;</a>ID, tooltip: <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../text/struct.Text.html" title="struct widgetry::text::Text">Text</a>&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Change an objects tooltip. Returns true for success, false if the object didnt exist.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.calculate_hovering" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#662-668">source</a></span><h4 class="code-header">pub fn <a href="#method.calculate_hovering" class="fnname">calculate_hovering</a>(&amp;self, ctx: &amp;<a class="struct" href="../../event_ctx/struct.EventCtx.html" title="struct widgetry::event_ctx::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;ID&gt;</h4></section></summary><div class="docblock"><p>Calculate the object currently underneath the cursor. This should only be used when the
<code>World</code> is not being actively updated by calling <code>event</code>. If another state temporarily
needs to disable most interactions with objects, it can poll this instead.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_hovered_keybindings" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#663-665">source</a></span><h4 class="code-header">pub fn <a href="#method.get_hovered_keybindings" class="fnname">get_hovered_keybindings</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;(<a class="enum" href="../../event/enum.MultiKey.html" title="enum widgetry::event::MultiKey">MultiKey</a>, &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>)&gt;&gt;</h4></section></summary><div class="docblock"><p>If an object is currently being hovered on, return its keybindings. This should be used to
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_hovered_keybindings" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#672-674">source</a></span><h4 class="code-header">pub fn <a href="#method.get_hovered_keybindings" class="fnname">get_hovered_keybindings</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.64.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="https://doc.rust-lang.org/1.64.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;(<a class="enum" href="../../event/enum.MultiKey.html" title="enum widgetry::event::MultiKey">MultiKey</a>, &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.64.0/std/primitive.str.html">str</a>)&gt;&gt;</h4></section></summary><div class="docblock"><p>If an object is currently being hovered on, return its keybindings. This should be used to
describe interactions; to detect the keypresses, listen for <code>WorldOutcome::Keypress</code>.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-World%3CDummyID%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#673-683">source</a></span><a href="#impl-World%3CDummyID%3E" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;<a class="struct" href="struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add_unnamed" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#680-682">source</a></span><h4 class="code-header">pub fn <a href="#method.add_unnamed" class="fnname">add_unnamed</a>(&amp;mut self) -&gt; <a class="struct" href="struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a>&lt;'_, <a class="struct" href="struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>&gt;</h4></section></summary><div class="docblock"><p>Begin adding an unnamed object to the <code>World</code>.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-World%3CDummyID%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#682-692">source</a></span><a href="#impl-World%3CDummyID%3E" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.World.html" title="struct widgetry::mapspace::world::World">World</a>&lt;<a class="struct" href="struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>&gt;</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add_unnamed" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/widgetry/mapspace/world.rs.html#689-691">source</a></span><h4 class="code-header">pub fn <a href="#method.add_unnamed" class="fnname">add_unnamed</a>(&amp;mut self) -&gt; <a class="struct" href="struct.ObjectBuilder.html" title="struct widgetry::mapspace::world::ObjectBuilder">ObjectBuilder</a>&lt;'_, <a class="struct" href="struct.DummyID.html" title="struct widgetry::mapspace::world::DummyID">DummyID</a>&gt;</h4></section></summary><div class="docblock"><p>Begin adding an unnamed object to the <code>World</code>.</p>
<p>Note: You must call <code>build</code> on this object before calling <code>add_unnamed</code> again. Otherwise,
the object IDs will collide.</p>
<p>TODO This will break when objects are deleted!</p>

File diff suppressed because one or more lines are too long