<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 struct"><!--[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"role="button">☰</div><ahref='../../../widgetry/index.html'><divclass='logo-container rust-logo'><imgsrc='../../../rust-logo.png'alt='logo'></div></a><pclass="location">Struct Panel</p><divclass="sidebar-elems"><divclass="block items"><aclass="sidebar-title"href="#fields">Fields</a><divclass="sidebar-links"><ahref="#structfield.clip_rect">clip_rect</a><ahref="#structfield.container_dims">container_dims</a><ahref="#structfield.contents_dims">contents_dims</a><ahref="#structfield.dims">dims</a><ahref="#structfield.horiz">horiz</a><ahref="#structfield.scrollable_x">scrollable_x</a><ahref="#structfield.scrollable_y">scrollable_y</a><ahref="#structfield.top_level">top_level</a><ahref="#structfield.vert">vert</a></div><aclass="sidebar-title"href="#implementations">Methods</a><divclass="sidebar-links"><ahref="#method.align">align</a><ahref="#method.autocomplete_done">autocomplete_done</a><ahref="#method.center_of">center_of</a><ahref="#method.center_of_panel">center_of_panel</a><ahref="#method.clicked_outside">clicked_outside</a><ahref="#method.clone_stashed">clone_stashed</a><ahref="#method.currently_hovering">currently_hovering</a><ahref="#method.draw">draw</a><ahref="#method.dropdown_value">dropdown_value</a><ahref="#method.empty">empty</a><ahref="#method.event">event</a><ahref="#method.find">find</a><ahref="#method.find_mut">find_mut</a><ahref="#method.get_all_click_actions">get_all_click_actions</a><ahref="#method.has_widget">has_widget</a><ahref="#method.is_button_enabled">is_button_enabled</a><ahref="#method.is_checked">is_checked</a><ahref="#method.maybe_dropdown_value">maybe_dropdown_value</a><ahref="#method.maybe_find">maybe_find</a><ahref="#method.maybe_is_checked">maybe_is_checked</a><ahref="#method.modify_spinner">modify_spinner</a><ahref="#method.new">new</a><ahref="#method.panel_dims">panel_dims</a><ahref="#method.persistent_split_value">persistent_split_value</a><ahref="#method.recompute_layout">recompute_layout</a><ahref="#method.recompute_scrollbar_layout">recompute_scrollbar_layout</a><ahref="#method.rect_of">rect_of</a><ahref="#method.replace">replace</a><ahref="#method.restore">restore</a><ahref="#method.scroll_offset">scroll_offset</a><ahref="#method.scroll_to_member">scroll_to_member</a><ahref="#method.set_scroll_offset">set_scroll_offset</a><ahref="#method.slider">slider</a><ahref="#method.slider_mut">slider_mut</a><ahref="#method.spinner">spinner</a><ahref="#method.stash">stash</a><ahref="#method.swap_inner_content">swap_inner_content</a><ahref="#method.take">take</a><ahref="#method.take_menu_choice">take_menu_choice</a><ahref="#method.text_box">text_box</a><ahref="#method.update_container_dims_for_canvas_dims">update_container_dims_for_canvas_dims</a><ahref="#method.update_scroll_sliders">update_scroll_sliders</a></div><aclass="sidebar-title"href="#synthetic-implementations">Auto Trait Implementations</a><divclass="sidebar-links"><ahref="#impl-RefUnwindSafe">!RefUnwindSafe</a><ahref="#impl-Send">!Send</a><ahref="#impl-Sync">!Sync</a><ahref="#impl-Unpin">Unpin</a><ahref="#impl-UnwindSafe">!UnwindSafe</a></div><aclass="sidebar-title"href="#blanket-implementations">Blanket Implementations</a><divclass="sidebar-links"><ahref="#impl-Any">Any</a><ahref="#impl-Borrow%3CT%3E">Borrow<T></a><ahref="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><ahref="#impl-Downcast">Downcast</a><ahref="#impl-From%3CT%3E">From<T></a><ahref="#impl-Into%3CU%3E">Into<U></a><ahref="#impl-Same%3CT%3E">Same<T></a><ahref="#impl-TryFrom%3CU%3E">TryFrom<U></a><ahref="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><pclass="location"><
</div><h4id="method.take"class="method"><code>pub fn <ahref="#method.take"class="fnname">take</a>(&mut self, id: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -><aclass="struct"href="../../../widgetry/widgets/struct.Widget.html"title="struct widgetry::widgets::Widget">Widget</a></code><aclass="srclink"href="../../../src/widgetry/widgets/panel.rs.html#516-518"title="goto source code">[src]</a></h4><divclass="docblock"><p>Removes a widget from the panel. Does not recalculate layout!</p>
</div><h4id="method.clicked_outside"class="method"><code>pub fn <ahref="#method.clicked_outside"class="fnname">clicked_outside</a>(&self, ctx: &mut <aclass="struct"href="../../../widgetry/event_ctx/struct.EventCtx.html"title="struct widgetry::event_ctx::EventCtx">EventCtx</a><'_>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass="srclink"href="../../../src/widgetry/widgets/panel.rs.html#520-523"title="goto source code">[src]</a></h4><h4id="method.currently_hovering"class="method"><code>pub fn <ahref="#method.currently_hovering"class="fnname">currently_hovering</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html"title="struct alloc::string::String">String</a>></code><aclass="srclink"href="../../../src/widgetry/widgets/panel.rs.html#525-527"title="goto source code">[src]</a></h4></div><h2id="synthetic-implementations"class="small-section-header">Auto Trait Implementations<ahref="#synthetic-implementations"class="anchor"></a></h2><divid="synthetic-implementations-list"><h3id="impl-RefUnwindSafe"class="impl"><codeclass="in-band">impl !<aclass="trait"href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html"title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <aclass="struct"href="../../../widgetry/widgets/panel/struct.Panel.html"title="struct widgetry::widgets::panel::Panel">Panel</a></code><ahref="#impl-RefUnwindSafe"class="anchor"></a></h3><divclass="impl-items"></div><h3id="impl-Send"class="impl"><codeclass="in-band">impl !<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> for <aclass="struct"href="../../../widgetry/widgets/panel/struct.Panel.html"title="struct widgetry::widgets::panel::Panel">Panel</a></code><ahref="#impl-Send"class="anchor"></a></h3><divclass="impl-items"></div><h3id="impl-Sync"class="impl"><codeclass="in-band">impl !<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> for <aclass="struct"href="../../../widgetry/widgets/panel/struct.Panel.html"title="struct widgetry::widgets::panel::Panel">Panel</a></code><ahref="#impl-Sync"class="anchor"></a></h3><divclass="impl-items"></div><h3id="impl-Unpin"class="impl"><codeclass="in-band">impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html"title="trait core::marker::Unpin">Unpin</a> for <aclass="struct"href="../../../widgetry/widgets/panel/struct.Panel.html"title="struct widgetry::widgets::panel::Panel">Panel</a></code><ahref="#impl-Unpin"class="anchor"></a></h3><divclass="impl-items"></div><h3id="impl-UnwindSafe"class="impl"><codeclass="in-band">impl !<aclass="trait"href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html"title="trait std::panic::UnwindSafe">UnwindSafe</a> for <aclass="struct"href="../../../widgetry/widgets/panel/struct.Panel.html"title="struct widgetry::widgets::panel::Panel">Panel</a></code><ahref="#impl-UnwindSafe"class="anchor"></a></h3><divclass="impl-items"></div></div><h2id="blanket-implementations"class="small-section-header">Blanket Implementations<ahref="#blanket-implementations"class="anchor"></a></h2><divid="blanket-implementations-list"><h3id="impl-Any"class="impl"><codeclass="in-band">impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html"title="trait core::any::Any">Any</a> for T <spanclass="where fmt-newline">where<br> T: 'static + ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref="#impl-Any"class="anchor"></a><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/c
then be further <code>downcast</code> into <code>Box<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <ahref="#tymethod.into_any">Read more</a></p>
further <code>downcast</code> into <code>Rc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <ahref="#tymethod.into_any_rc">Read more</a></p>
</div></div><h3id="impl-Same%3CT%3E"class="impl"><codeclass="in-band">impl<T> Same<T> for T</code><ahref="#impl-Same%3CT%3E"class="anchor"></a></h3><divclass="impl-items"><h4id="associatedtype.Output"class="type"><code>type <ahref="#associatedtype.Output"class="type">Output</a> = T</code></h4><divclass='docblock'><p>Should always be <code>Self</code></p>
</div></div><h3id="impl-TryFrom%3CU%3E"class="impl"><codeclass="in-band">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>, </span></code><ahref="#impl-TryFrom%3CU%3E"class="anchor"></a><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-590"title="goto source code">[src]</a></h3><divclass="impl-items"><h4id="associatedtype.Error"class="type"><code>type <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"class="type">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></code></h4><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id="method.try_from"class="method hidden"><code>pub fn <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from"class="fnname">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#587"title="goto source code">[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id="impl-TryInto%3CU%3E"class="impl"><codeclass="in-band">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><ahref="#impl-TryInto%3CU%3E"class="anchor"></a><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#567-576"title="goto source code">[src]</a></h3><divclass="impl-items"><h4id="associatedtype.Error-1"class="type"><code>type <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error"class="type">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></code></h4><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id="method.try_into"class="method hidden"><code>pub fn <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into"class="fnname">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass="srclink"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#573"title="goto source code">[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>