<linkrel="alternate icon"type="image/png"href="../favicon-32x32.png"><styletype="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><bodyclass="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="sidebar"><divclass="sidebar-menu">☰</div><ahref='../widgetry/index.html'><divclass='logo-container rust-logo'><imgsrc='../rust-logo.png'alt='logo'></div></a><pclass='location'>Crate widgetry</p><divclass='block version'><p>Version 0.1.0</p></div><divclass="sidebar-elems"><aid='all-types'href='all.html'><p>See all widgetry's items</p></a><divclass="block items"><ul><li><ahref="#modules">Modules</a></li><li><ahref="#structs">Structs</a></li><li><ahref="#enums">Enums</a></li><li><ahref="#traits">Traits</a></li><li><ahref="#functions">Functions</a></li></ul></div><pclass='location'></p><script>window.sidebarCurrent={name:'widgetry',ty:'mod',relpath:'../'};</script></div></nav><divclass="theme-picker"><buttonid="theme-picker"aria-label="Pick another theme!"><imgsrc="../brush.svg"width="18"alt="Pick another theme!"></button><divid="theme-choices"></div></div><scriptsrc="../theme.js"></script><navclass="sub"><formclass="search-form"><divclass="search-container"><div><selectid="crate-search"><optionvalue="All crates">All crates</option></select><inputclass="search-input"name="search"disabledautocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"></div><spanclass="help-button">?</span>
<p>If none of these do what you need, implementing a new <ahref="../widgetry/widgets/trait.WidgetImpl.html"title="WidgetImpl"><code>WidgetImpl</code></a> isn't tough.</p>
<li><ahref="../widgetry/struct.Autocomplete.html"title="Autocomplete"><code>Autocomplete</code></a> - select predefined value by combining text entry with menus</li>
<li><ahref="../widgetry/widgets/button/struct.Button.html"title="Button"><code>Button</code></a> - clickable buttons with keybindings and tooltips</li>
<li><ahref="../widgetry/struct.Checkbox.html"title="Checkbox"><code>Checkbox</code></a> - toggle between two buttons</li>
<li><ahref="../widgetry/struct.CompareTimes.html"title="CompareTimes"><code>CompareTimes</code></a> - a scatter plot specialized for comparing times</li>
<li><ahref="../widgetry/struct.DrawWithTooltips.html"title="DrawWithTooltips"><code>DrawWithTooltips</code></a> - draw static geometry, with mouse tooltips in certain regions</li>
<li><ahref="../widgetry/widgets/dropdown/struct.Dropdown.html"title="Dropdown"><code>Dropdown</code></a> - a button that expands into a menu</li>
<li><ahref="../widgetry/struct.FanChart.html"title="FanChart"><code>FanChart</code></a> - visualize a range of values over time</li>
<li><ahref="../widgetry/struct.Filler.html"title="Filler"><code>Filler</code></a> - just carve out space in the layout for something else</li>
<li><ahref="../widgetry/widgets/just_draw/struct.JustDraw.html"title="JustDraw"><code>JustDraw</code></a> (argh private) - just draw text, <code>GeomBatch</code>es, SVGs</li>
<li><ahref="../widgetry/struct.LinePlot.html"title="LinePlot"><code>LinePlot</code></a> - visualize 2 variables with a line plot</li>
<li><ahref="../widgetry/struct.Menu.html"title="Menu"><code>Menu</code></a> - select something from a menu, with keybindings</li>
<li><ahref="../widgetry/struct.MultiButton.html"title="MultiButton"><code>MultiButton</code></a> - clickable regions in one batch of geometry</li>
<li><ahref="../widgetry/struct.PersistentSplit.html"title="PersistentSplit"><code>PersistentSplit</code></a> - a button with a dropdown to change its state</li>
<li><ahref="../widgetry/struct.ScatterPlot.html"title="ScatterPlot"><code>ScatterPlot</code></a> - visualize 2 variables with a scatter plot</li>
<li><ahref="../widgetry/struct.Slider.html"title="Slider"><code>Slider</code></a> - horizontal and vertical sliders</li>
<li><ahref="../widgetry/struct.Spinner.html"title="Spinner"><code>Spinner</code></a> - numeric input with up/down buttons</li>
<table><trclass='module-item'><td><aclass="mod"href="app_state/index.html"title='widgetry::app_state mod'>app_state</a></td><tdclass='docblock-short'><p>A widgetry application splits its state into two pieces: global shared state that lasts for the
entire lifetime of the application, and a stack of smaller states, only one of which is active
at a time. For example, imagine an application to view a map. The shared state would include
the map and pre-rendered geometry for it. The individual states might start with a splash
screen or menu to choose a map, then a map viewer, then maybe a state to drill down into pieces
<table><trclass='module-item'><td><aclass="struct"href="struct.Autocomplete.html"title='widgetry::Autocomplete struct'>Autocomplete</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.Btn.html"title='widgetry::Btn struct'>Btn</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.Canvas.html"title='widgetry::Canvas struct'>Canvas</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.Checkbox.html"title='widgetry::Checkbox struct'>Checkbox</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.Choice.html"title='widgetry::Choice struct'>Choice</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.Color.html"title='widgetry::Color struct'>Color</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.CompareTimes.html"title='widgetry::CompareTimes struct'>CompareTimes</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.DrawWithTooltips.html"title='widgetry::DrawWithTooltips struct'>DrawWithTooltips</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.Drawable.html"title='widgetry::Drawable struct'>Drawable</a></td><tdclass='docblock-short'><p>Geometry that's been uploaded to the GPU once and can be quickly redrawn many times. Create by
creating a <code>GeomBatch</code> and calling <code>ctx.upload(batch)</code>.</p>
</td></tr><trclass='module-item'><td><aclass="struct"href="struct.EdgeInsets.html"title='widgetry::EdgeInsets struct'>EdgeInsets</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.EventCtx.html"title='widgetry::EventCtx struct'>EventCtx</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.FanChart.html"title='widgetry::FanChart struct'>FanChart</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.Filler.html"title='widgetry::Filler struct'>Filler</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.GeomBatch.html"title='widgetry::GeomBatch struct'>GeomBatch</a></td><tdclass='docblock-short'><p>A mutable builder for a group of colored polygons.</p>
</td></tr><trclass='module-item'><td><aclass="struct"href="struct.GfxCtx.html"title='widgetry::GfxCtx struct'>GfxCtx</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.LinePlot.html"title='widgetry::LinePlot struct'>LinePlot</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.LinearGradient.html"title='widgetry::LinearGradient struct'>LinearGradient</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.Menu.html"title='widgetry::Menu struct'>Menu</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.MultiButton.html"title='widgetry::MultiButton struct'>MultiButton</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.Panel.html"title='widgetry::Panel struct'>Panel</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.PersistentSplit.html"title='widgetry::PersistentSplit struct'>PersistentSplit</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.PlotOptions.html"title='widgetry::PlotOptions struct'>PlotOptions</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.Prerender.html"title='widgetry::Prerender struct'>Prerender</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.ScatterPlot.html"title='widgetry::ScatterPlot struct'>ScatterPlot</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="struct"href="struct.ScreenDims.html"title='widgetry::ScreenDims struct'>ScreenDims</a></td><tdclass='docblock-short'><p>ScreenDims is in units of logical pixels, as opposed to physical pixels.</p>
</td></tr><trclass='module-item'><td><aclass="struct"href="struct.ScreenPt.html"title='widgetry::ScreenPt struct'>ScreenPt</a></td><tdclass='docblock-short'><p>ScreenPt is in units of logical pixels, as opposed to physical pixels.</p>
</td></tr><trclass='module-item'><td><aclass="struct"href="struct.ScreenRectangle.html"title='widgetry::ScreenRectangle struct'>ScreenRectangle</a></td><tdclass='docblock-short'><p>ScreenRectangle is in units of logical pixels, as opposed to physical pixels.</p>
<table><trclass='module-item'><td><aclass="enum"href="enum.DrawBaselayer.html"title='widgetry::DrawBaselayer enum'>DrawBaselayer</a></td><tdclass='docblock-short'><p>Before <code>State::draw</code> is called, draw something else.</p>
</td></tr><trclass='module-item'><td><aclass="enum"href="enum.Event.html"title='widgetry::Event enum'>Event</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="enum"href="enum.Fill.html"title='widgetry::Fill enum'>Fill</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="enum"href="enum.HorizontalAlignment.html"title='widgetry::HorizontalAlignment enum'>HorizontalAlignment</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="enum"href="enum.Key.html"title='widgetry::Key enum'>Key</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="enum"href="enum.MultiKey.html"title='widgetry::MultiKey enum'>MultiKey</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="enum"href="enum.Outcome.html"title='widgetry::Outcome enum'>Outcome</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="enum"href="enum.RewriteColor.html"title='widgetry::RewriteColor enum'>RewriteColor</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="enum"href="enum.Transition.html"title='widgetry::Transition enum'>Transition</a></td><tdclass='docblock-short'><p>When a state responds to an event, it can specify some way to manipulate the stack of states.</p>
<table><trclass='module-item'><td><aclass="trait"href="trait.SharedAppState.html"title='widgetry::SharedAppState trait'>SharedAppState</a></td><tdclass='docblock-short'><p>Any data that should last the entire lifetime of the application should be stored in the struct
implementing this trait.</p>
</td></tr><trclass='module-item'><td><aclass="trait"href="trait.State.html"title='widgetry::State trait'>State</a></td><tdclass='docblock-short'><p>A temporary state of an application. There's a stack of these, with the most recent being the
active one.</p>
</td></tr><trclass='module-item'><td><aclass="trait"href="trait.TextExt.html"title='widgetry::TextExt trait'>TextExt</a></td><tdclass='docblock-short'></td></tr><trclass='module-item'><td><aclass="trait"href="trait.WidgetImpl.html"title='widgetry::WidgetImpl trait'>WidgetImpl</a></td><tdclass='docblock-short'><p>Create a new widget by implementing this trait. You can instantiate your widget by calling