<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="API documentation for the Rust `widgetry` crate."><metaname="keywords"content="rust, rustlang, rust-lang, widgetry"><title>widgetry - Rust</title><linkrel="stylesheet"type="text/css"href="../normalize.css"><linkrel="stylesheet"type="text/css"href="../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../light.css"id="themeStyle"><linkrel="stylesheet"type="text/css"href="../dark.css"disabled><linkrel="stylesheet"type="text/css"href="../ayu.css"disabled><scriptsrc="../storage.js"></script><noscript><linkrel="stylesheet"href="../noscript.css"></noscript><linkrel="shortcut icon"href="../favicon.ico"><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>
<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
</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