<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!"aria-haspopup="menu"><imgsrc="../brush.svg"width="18"alt="Pick another theme!"></button><divid="theme-choices"role="menu"></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>
<aid="settings-menu"href="../settings.html"><imgsrc="../wheel.svg"width="18"alt="Change settings"></a></div></form></nav><sectionid="main"class="content"><h1class="fqn"><spanclass="out-of-band"><spanid="render-detail"><aid="toggle-all-docs"href="javascript:void(0)"title="collapse all docs">[<spanclass="inner">−</span>]</a></span><aclass="srclink"href="../src/widgetry/lib.rs.html#1-173"title="goto source code">[src]</a></span><spanclass="in-band">Crate <aclass="mod"href="">widgetry</a></span></h1><divclass="docblock"><h1id="widgets"class="section-header"><ahref="#widgets">Widgets</a></h1>
<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>
<li><ahref="../widgetry/table/struct.Table.html"title="table::Table"><code>table::Table</code></a> - rows and columns, supporting filtering and pagination</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
<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.Cached.html"title="widgetry::Cached struct">Cached</a></td><tdclass="docblock-short"><p>Store a cached key/value pair, only recalculating when the key changes.</p>
</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
</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>
</td></tr><trclass="module-item"><td><aclass="struct"href="struct.Series.html"title="widgetry::Series struct">Series</a></td><tdclass="docblock-short"></td></tr><trclass="module-item"><td><aclass="struct"href="struct.Settings.html"title="widgetry::Settings struct">Settings</a></td><tdclass="docblock-short"><p>Customize how widgetry works. These settings can't be changed after starting.</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"><p>A way to transform all colors in a GeomBatch.</p>
</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
</td></tr><trclass="module-item"><td><aclass="trait"href="trait.SimpleState.html"title="widgetry::SimpleState trait">SimpleState</a></td><tdclass="docblock-short"><p>Many states fit a pattern of managing a single panel, handling mouseover events, and other
</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
</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