Files
phy/egui/struct.Response.html
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

286 lines
94 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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 result of adding a widget to a `Ui`."><title>Response in egui - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="egui" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../egui/index.html">egui</a><span class="version">0.30.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Response</a></h2><h3><a href="#fields">Fields</a></h3><ul class="block structfield"><li><a href="#structfield.ctx" title="ctx">ctx</a></li><li><a href="#structfield.id" title="id">id</a></li><li><a href="#structfield.interact_rect" title="interact_rect">interact_rect</a></li><li><a href="#structfield.intrinsic_size" title="intrinsic_size">intrinsic_size</a></li><li><a href="#structfield.layer_id" title="layer_id">layer_id</a></li><li><a href="#structfield.rect" title="rect">rect</a></li><li><a href="#structfield.sense" title="sense">sense</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.changed" title="changed">changed</a></li><li><a href="#method.clicked" title="clicked">clicked</a></li><li><a href="#method.clicked_by" title="clicked_by">clicked_by</a></li><li><a href="#method.clicked_elsewhere" title="clicked_elsewhere">clicked_elsewhere</a></li><li><a href="#method.contains_pointer" title="contains_pointer">contains_pointer</a></li><li><a href="#method.context_menu" title="context_menu">context_menu</a></li><li><a href="#method.context_menu_opened" title="context_menu_opened">context_menu_opened</a></li><li><a href="#method.dnd_hover_payload" title="dnd_hover_payload">dnd_hover_payload</a></li><li><a href="#method.dnd_release_payload" title="dnd_release_payload">dnd_release_payload</a></li><li><a href="#method.dnd_set_drag_payload" title="dnd_set_drag_payload">dnd_set_drag_payload</a></li><li><a href="#method.double_clicked" title="double_clicked">double_clicked</a></li><li><a href="#method.double_clicked_by" title="double_clicked_by">double_clicked_by</a></li><li><a href="#method.drag_delta" title="drag_delta">drag_delta</a></li><li><a href="#method.drag_motion" title="drag_motion">drag_motion</a></li><li><a href="#method.drag_released" title="drag_released">drag_released</a></li><li><a href="#method.drag_released_by" title="drag_released_by">drag_released_by</a></li><li><a href="#method.drag_started" title="drag_started">drag_started</a></li><li><a href="#method.drag_started_by" title="drag_started_by">drag_started_by</a></li><li><a href="#method.drag_stopped" title="drag_stopped">drag_stopped</a></li><li><a href="#method.drag_stopped_by" title="drag_stopped_by">drag_stopped_by</a></li><li><a href="#method.dragged" title="dragged">dragged</a></li><li><a href="#method.dragged_by" title="dragged_by">dragged_by</a></li><li><a href="#method.enabled" title="enabled">enabled</a></li><li><a href="#method.gained_focus" title="gained_focus">gained_focus</a></li><li><a href="#method.has_focus" title="has_focus">has_focus</a></li><li><a href="#method.highlight" title="highlight">highlight</a></li><li><a href="#method.hover_pos" title="hover_pos">hover_pos</a></li><li><a href="#method.hovered" title="hovered">hovered</a></li><li><a href="#method.interact" title="interact">interact</a></li><li><a href="#method.interact_pointer_pos" title="interact_pointer_pos">interact_pointer_pos</a></li><li><a href="#method.is_pointer_button_down_on" title="is_pointer_button_down_on">is_pointer_button_down_on</a></li><li><a href="#method.is_tooltip_open" title="is_tooltip_open">is_tooltip_open</a></li><li><a href="#method.labelled_by" title="labelled_by">labelled_by</a></li><li><a href="#method.long_touched" title="long_touched">long_touched</a></li><li><a href="#method.lost_focus" title="lost_focus">lost_focus</a></li><li><a href="#method.mark_changed" title="mark_changed">mark_changed</a></li><li><a href="#method.middle_clicked" title="middle_clicked">middle_clicked</a></li><li><a href="#method.on_disabled_hover_text" title="on_disabled_hover_text">on_disabled_hover_text</a></li><li><a href="#method.on_disabled_hover_ui" title="on_disabled_hover_ui">on_disabled_hover_ui</a></li><li><a href="#method.on_hover_and_drag_cursor" title="on_hover_and_drag_cursor">on_hover_and_drag_cursor</a></li><li><a href="#method.on_hover_cursor" title="on_hover_cursor">on_hover_cursor</a></li><li><a href="#method.on_hover_text" title="on_hover_text">on_hover_text</a></li><li><a href="#method.on_hover_text_at_pointer" title="on_hover_text_at_pointer">on_hover_text_at_pointer</a></li><li><a href="#method.on_hover_ui" title="on_hover_ui">on_hover_ui</a></li><li><a href="#method.on_hover_ui_at_pointer" title="on_hover_ui_at_pointer">on_hover_ui_at_pointer</a></li><li><a href="#method.output_event" title="output_event">output_event</a></li><li><a href="#method.paint_debug_info" title="paint_debug_info">paint_debug_info</a></li><li><a href="#method.request_focus" title="request_focus">request_focus</a></li><li><a href="#method.scroll_to_me" title="scroll_to_me">scroll_to_me</a></li><li><a href="#method.scroll_to_me_animation" title="scroll_to_me_animation">scroll_to_me_animation</a></li><li><a href="#method.secondary_clicked" title="secondary_clicked">secondary_clicked</a></li><li><a href="#method.show_tooltip_text" title="show_tooltip_text">show_tooltip_text</a></li><li><a href="#method.show_tooltip_ui" title="show_tooltip_ui">show_tooltip_ui</a></li><li><a href="#method.surrender_focus" title="surrender_focus">surrender_focus</a></li><li><a href="#method.triple_clicked" title="triple_clicked">triple_clicked</a></li><li><a href="#method.triple_clicked_by" title="triple_clicked_by">triple_clicked_by</a></li><li><a href="#method.union" title="union">union</a></li><li><a href="#method.widget_info" title="widget_info">widget_info</a></li><li><a href="#method.with_new_rect" title="with_new_rect">with_new_rect</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-BitOr-for-Response" title="BitOr">BitOr</a></li><li><a href="#impl-BitOrAssign-for-Response" title="BitOrAssign">BitOrAssign</a></li><li><a href="#impl-Clone-for-Response" title="Clone">Clone</a></li><li><a href="#impl-Debug-for-Response" title="Debug">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Response" title="!RefUnwindSafe">!RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-Response" title="!UnwindSafe">!UnwindSafe</a></li><li><a href="#impl-Freeze-for-Response" title="Freeze">Freeze</a></li><li><a href="#impl-Send-for-Response" title="Send">Send</a></li><li><a href="#impl-Sync-for-Response" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Response" title="Unpin">Unpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-CloneToUninit-for-T" title="CloneToUninit">CloneToUninit</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-SerializableAny-for-T" title="SerializableAny">SerializableAny</a></li><li><a href="#impl-ToOwned-for-T" title="ToOwned">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate egui</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">egui</a></span><h1>Struct <span class="struct">Response</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/egui/response.rs.html#22-136">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Response {
pub ctx: <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a>,
pub layer_id: <a class="struct" href="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</a>,
pub id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a>,
pub rect: <a class="struct" href="struct.Rect.html" title="struct egui::Rect">Rect</a>,
pub interact_rect: <a class="struct" href="struct.Rect.html" title="struct egui::Rect">Rect</a>,
pub sense: <a class="struct" href="struct.Sense.html" title="struct egui::Sense">Sense</a>,
pub intrinsic_size: <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.Vec2.html" title="struct egui::Vec2">Vec2</a>&gt;,
<span class="comment">/* private fields */</span>
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The result of adding a widget to a <a href="struct.Ui.html" title="struct egui::Ui"><code>Ui</code></a>.</p>
<p>A <a href="struct.Response.html" title="struct egui::Response"><code>Response</code></a> lets you know whether or not a widget is being hovered, clicked or dragged.
It also lets you easily show a tooltip on hover.</p>
<p>Whenever something gets added to a <a href="struct.Ui.html" title="struct egui::Ui"><code>Ui</code></a>, a <a href="struct.Response.html" title="struct egui::Response"><code>Response</code></a> object is returned.
[<code>ui.add</code>] returns a <a href="struct.Response.html" title="struct egui::Response"><code>Response</code></a>, as does [<code>ui.button</code>], and all similar shortcuts.</p>
<p>⚠️ The <code>Response</code> contains a clone of <a href="struct.Context.html" title="struct egui::Context"><code>Context</code></a>, and many methods lock the <code>Context</code>.
It can therefor be a deadlock to use <code>Context</code> from within a context-locking closures,
such as <a href="struct.Context.html#method.input" title="method egui::Context::input"><code>Context::input</code></a>.</p>
</div></details><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.ctx" class="structfield section-header"><a href="#structfield.ctx" class="anchor field">§</a><code>ctx: <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></code></span><div class="docblock"><p>Used for optionally showing a tooltip and checking for more interactions.</p>
</div><span id="structfield.layer_id" class="structfield section-header"><a href="#structfield.layer_id" class="anchor field">§</a><code>layer_id: <a class="struct" href="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</a></code></span><div class="docblock"><p>Which layer the widget is part of.</p>
</div><span id="structfield.id" class="structfield section-header"><a href="#structfield.id" class="anchor field">§</a><code>id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a></code></span><div class="docblock"><p>The <a href="struct.Id.html" title="struct egui::Id"><code>Id</code></a> of the widget/area this response pertains.</p>
</div><span id="structfield.rect" class="structfield section-header"><a href="#structfield.rect" class="anchor field">§</a><code>rect: <a class="struct" href="struct.Rect.html" title="struct egui::Rect">Rect</a></code></span><div class="docblock"><p>The area of the screen we are talking about.</p>
</div><span id="structfield.interact_rect" class="structfield section-header"><a href="#structfield.interact_rect" class="anchor field">§</a><code>interact_rect: <a class="struct" href="struct.Rect.html" title="struct egui::Rect">Rect</a></code></span><div class="docblock"><p>The rectangle sensing interaction.</p>
<p>This is sometimes smaller than <a href="struct.Response.html#structfield.rect" title="field egui::Response::rect"><code>Self::rect</code></a> because of clipping
(e.g. when inside a scroll area).</p>
</div><span id="structfield.sense" class="structfield section-header"><a href="#structfield.sense" class="anchor field">§</a><code>sense: <a class="struct" href="struct.Sense.html" title="struct egui::Sense">Sense</a></code></span><div class="docblock"><p>The senses (click and/or drag) that the widget was interested in (if any).</p>
<p>Note: if <a href="struct.Response.html#method.enabled" title="method egui::Response::enabled"><code>Self::enabled</code></a> is <code>false</code>, then
the widget <em>effectively</em> doesnt sense anything,
but can still have the same <code>Sense</code>.
This is because the sense informs the styling of the widget,
but we dont want to change the style when a widget is disabled
(that is handled by the <code>Painter</code> directly).</p>
</div><span id="structfield.intrinsic_size" class="structfield section-header"><a href="#structfield.intrinsic_size" class="anchor field">§</a><code>intrinsic_size: <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.Vec2.html" title="struct egui::Vec2">Vec2</a>&gt;</code></span><div class="docblock"><p>The intrinsic / desired size of the widget.</p>
<p>For a button, this will be the size of the label + the frames padding,
even if the button is laid out in a justified layout and the actual size will be larger.</p>
<p>If this is <code>None</code>, use <a href="struct.Response.html#structfield.rect" title="field egui::Response::rect"><code>Self::rect</code></a> instead.</p>
<p>At the time of writing, this is only used by external crates
for improved layouting.
See for instance <a href="https://github.com/lucasmerlin/hello_egui/tree/main/crates/egui_flex"><code>egui_flex</code></a>.</p>
</div><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Response" class="impl"><a class="src rightside" href="../src/egui/response.rs.html#138-1137">Source</a><a href="#impl-Response" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clicked" class="method"><a class="src rightside" href="../src/egui/response.rs.html#152-154">Source</a><h4 class="code-header">pub fn <a href="#method.clicked" class="fn">clicked</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if this widget was clicked this frame by the primary button.</p>
<p>A click is registered when the mouse or touch is released within
a certain amount of time and distance from when and where it was pressed.</p>
<p>This will also return true if the widget was clicked via accessibility integration,
or if the widget had keyboard focus and the use pressed Space/Enter.</p>
<p>Note that the widget must be sensing clicks with <a href="struct.Sense.html#method.click" title="associated function egui::Sense::click"><code>Sense::click</code></a>.
<a href="widgets/struct.Button.html" title="struct egui::widgets::Button"><code>crate::Button</code></a> senses clicks; <a href="widgets/struct.Label.html" title="struct egui::widgets::Label"><code>crate::Label</code></a> does not (unless you call <a href="widgets/struct.Label.html#method.sense" title="method egui::widgets::Label::sense"><code>crate::Label::sense</code></a>).</p>
<p>You can use <a href="struct.Response.html#method.interact" title="method egui::Response::interact"><code>Self::interact</code></a> to sense more things <em>after</em> adding a widget.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.clicked_by" class="method"><a class="src rightside" href="../src/egui/response.rs.html#165-167">Source</a><h4 class="code-header">pub fn <a href="#method.clicked_by" class="fn">clicked_by</a>(&amp;self, button: <a class="enum" href="enum.PointerButton.html" title="enum egui::PointerButton">PointerButton</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if this widget was clicked this frame by the given mouse button.</p>
<p>This will NOT return true if the widget was “clicked” via
some accessibility integration, or if the widget had keyboard focus and the
user pressed Space/Enter. For that, use <a href="struct.Response.html#method.clicked" title="method egui::Response::clicked"><code>Self::clicked</code></a> instead.</p>
<p>This will likewise ignore the press-and-hold action on touch screens.
Use <a href="struct.Response.html#method.secondary_clicked" title="method egui::Response::secondary_clicked"><code>Self::secondary_clicked</code></a> instead to also detect that.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.secondary_clicked" class="method"><a class="src rightside" href="../src/egui/response.rs.html#173-175">Source</a><h4 class="code-header">pub fn <a href="#method.secondary_clicked" class="fn">secondary_clicked</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if this widget was clicked this frame by the secondary mouse button (e.g. the right mouse button).</p>
<p>This also returns true if the widget was pressed-and-held on a touch screen.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.long_touched" class="method"><a class="src rightside" href="../src/egui/response.rs.html#181-183">Source</a><h4 class="code-header">pub fn <a href="#method.long_touched" class="fn">long_touched</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Was this long-pressed on a touch screen?</p>
<p>Usually you want to check <a href="struct.Response.html#method.secondary_clicked" title="method egui::Response::secondary_clicked"><code>Self::secondary_clicked</code></a> instead.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.middle_clicked" class="method"><a class="src rightside" href="../src/egui/response.rs.html#187-189">Source</a><h4 class="code-header">pub fn <a href="#method.middle_clicked" class="fn">middle_clicked</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if this widget was clicked this frame by the middle mouse button.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.double_clicked" class="method"><a class="src rightside" href="../src/egui/response.rs.html#193-195">Source</a><h4 class="code-header">pub fn <a href="#method.double_clicked" class="fn">double_clicked</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if this widget was double-clicked this frame by the primary button.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.triple_clicked" class="method"><a class="src rightside" href="../src/egui/response.rs.html#199-201">Source</a><h4 class="code-header">pub fn <a href="#method.triple_clicked" class="fn">triple_clicked</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if this widget was triple-clicked this frame by the primary button.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.double_clicked_by" class="method"><a class="src rightside" href="../src/egui/response.rs.html#205-207">Source</a><h4 class="code-header">pub fn <a href="#method.double_clicked_by" class="fn">double_clicked_by</a>(&amp;self, button: <a class="enum" href="enum.PointerButton.html" title="enum egui::PointerButton">PointerButton</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if this widget was double-clicked this frame by the given button.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.triple_clicked_by" class="method"><a class="src rightside" href="../src/egui/response.rs.html#211-213">Source</a><h4 class="code-header">pub fn <a href="#method.triple_clicked_by" class="fn">triple_clicked_by</a>(&amp;self, button: <a class="enum" href="enum.PointerButton.html" title="enum egui::PointerButton">PointerButton</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if this widget was triple-clicked this frame by the given button.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.clicked_elsewhere" class="method"><a class="src rightside" href="../src/egui/response.rs.html#219-238">Source</a><h4 class="code-header">pub fn <a href="#method.clicked_elsewhere" class="fn">clicked_elsewhere</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p><code>true</code> if there was a click <em>outside</em> the rect of this widget.</p>
<p>Clicks on widgets contained in this one counts as clicks inside this widget,
so that clicking a button in an area will not be considered as clicking “elsewhere” from the area.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.enabled" class="method"><a class="src rightside" href="../src/egui/response.rs.html#244-246">Source</a><h4 class="code-header">pub fn <a href="#method.enabled" class="fn">enabled</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Was the widget enabled?
If false, there was no interaction attempted
and the widget should be drawn in a gray disabled look.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.hovered" class="method"><a class="src rightside" href="../src/egui/response.rs.html#253-255">Source</a><h4 class="code-header">pub fn <a href="#method.hovered" class="fn">hovered</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>The pointer is hovering above this widget or the widget was clicked/tapped this frame.</p>
<p>In contrast to <a href="struct.Response.html#method.contains_pointer" title="method egui::Response::contains_pointer"><code>Self::contains_pointer</code></a>, this will be <code>false</code> whenever some other widget is being dragged.
<code>hovered</code> is always <code>false</code> for disabled widgets.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.contains_pointer" class="method"><a class="src rightside" href="../src/egui/response.rs.html#266-268">Source</a><h4 class="code-header">pub fn <a href="#method.contains_pointer" class="fn">contains_pointer</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if the pointer is contained by the response rect, and no other widget is covering it.</p>
<p>In contrast to <a href="struct.Response.html#method.hovered" title="method egui::Response::hovered"><code>Self::hovered</code></a>, this can be <code>true</code> even if some other widget is being dragged.
This means it is useful for styling things like drag-and-drop targets.
<code>contains_pointer</code> can also be <code>true</code> for disabled widgets.</p>
<p>This is slightly different from <a href="struct.Ui.html#method.rect_contains_pointer" title="method egui::Ui::rect_contains_pointer"><code>Ui::rect_contains_pointer</code></a> and <a href="struct.Context.html#method.rect_contains_pointer" title="method egui::Context::rect_contains_pointer"><code>Context::rect_contains_pointer</code></a>, in that
<a href="struct.Response.html#method.contains_pointer" title="method egui::Response::contains_pointer"><code>Self::contains_pointer</code></a> also checks that no other widget is covering this response rectangle.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_focus" class="method"><a class="src rightside" href="../src/egui/response.rs.html#282-284">Source</a><h4 class="code-header">pub fn <a href="#method.has_focus" class="fn">has_focus</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>This widget has the keyboard focus (i.e. is receiving key presses).</p>
<p>This function only returns true if the UI as a whole (e.g. window)
also has the keyboard focus. That makes this function suitable
for style choices, e.g. a thicker border around focused widgets.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.gained_focus" class="method"><a class="src rightside" href="../src/egui/response.rs.html#287-289">Source</a><h4 class="code-header">pub fn <a href="#method.gained_focus" class="fn">gained_focus</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>True if this widget has keyboard focus this frame, but didnt last frame.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.lost_focus" class="method"><a class="src rightside" href="../src/egui/response.rs.html#305-307">Source</a><h4 class="code-header">pub fn <a href="#method.lost_focus" class="fn">lost_focus</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>The widget had keyboard focus and lost it,
either because the user pressed tab or clicked somewhere else,
or (in case of a <a href="widgets/text_edit/struct.TextEdit.html" title="struct egui::widgets::text_edit::TextEdit"><code>crate::TextEdit</code></a>) because the user pressed enter.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>response = ui.text_edit_singleline(<span class="kw-2">&amp;mut </span>my_text);
<span class="kw">if </span>response.lost_focus() &amp;&amp; ui.input(|i| i.key_pressed(egui::Key::Enter)) {
do_request(<span class="kw-2">&amp;</span>my_text);
}</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.request_focus" class="method"><a class="src rightside" href="../src/egui/response.rs.html#310-312">Source</a><h4 class="code-header">pub fn <a href="#method.request_focus" class="fn">request_focus</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Request that this widget get keyboard focus.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.surrender_focus" class="method"><a class="src rightside" href="../src/egui/response.rs.html#315-317">Source</a><h4 class="code-header">pub fn <a href="#method.surrender_focus" class="fn">surrender_focus</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Surrender keyboard focus for this widget.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drag_started" class="method"><a class="src rightside" href="../src/egui/response.rs.html#326-328">Source</a><h4 class="code-header">pub fn <a href="#method.drag_started" class="fn">drag_started</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Did a drag on this widgets begin this frame?</p>
<p>This is only true if the widget sense drags.
If the widget also senses clicks, this will only become true if the pointer has moved a bit.</p>
<p>This will only be true for a single frame.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drag_started_by" class="method"><a class="src rightside" href="../src/egui/response.rs.html#337-339">Source</a><h4 class="code-header">pub fn <a href="#method.drag_started_by" class="fn">drag_started_by</a>(&amp;self, button: <a class="enum" href="enum.PointerButton.html" title="enum egui::PointerButton">PointerButton</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Did a drag on this widgets by the button begin this frame?</p>
<p>This is only true if the widget sense drags.
If the widget also senses clicks, this will only become true if the pointer has moved a bit.</p>
<p>This will only be true for a single frame.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dragged" class="method"><a class="src rightside" href="../src/egui/response.rs.html#356-358">Source</a><h4 class="code-header">pub fn <a href="#method.dragged" class="fn">dragged</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>The widget is being dragged.</p>
<p>To find out which button(s), use <a href="struct.Response.html#method.dragged_by" title="method egui::Response::dragged_by"><code>Self::dragged_by</code></a>.</p>
<p>If the widget is only sensitive to drags, this is <code>true</code> as soon as the pointer presses down on it.
If the widget also senses clicks, this wont be true until the pointer has moved a bit,
or the user has pressed down for long enough.
See <a href="struct.PointerState.html#method.is_decidedly_dragging" title="method egui::PointerState::is_decidedly_dragging"><code>crate::input_state::PointerState::is_decidedly_dragging</code></a> for details.</p>
<p>If you want to avoid the delay, use <a href="struct.Response.html#method.is_pointer_button_down_on" title="method egui::Response::is_pointer_button_down_on"><code>Self::is_pointer_button_down_on</code></a> instead.</p>
<p>If the widget is NOT sensitive to drags, this will always be <code>false</code>.
<a href="widgets/struct.DragValue.html" title="struct egui::widgets::DragValue"><code>crate::DragValue</code></a> senses drags; <a href="widgets/struct.Label.html" title="struct egui::widgets::Label"><code>crate::Label</code></a> does not (unless you call <a href="widgets/struct.Label.html#method.sense" title="method egui::widgets::Label::sense"><code>crate::Label::sense</code></a>).
You can use <a href="struct.Response.html#method.interact" title="method egui::Response::interact"><code>Self::interact</code></a> to sense more things <em>after</em> adding a widget.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dragged_by" class="method"><a class="src rightside" href="../src/egui/response.rs.html#362-364">Source</a><h4 class="code-header">pub fn <a href="#method.dragged_by" class="fn">dragged_by</a>(&amp;self, button: <a class="enum" href="enum.PointerButton.html" title="enum egui::PointerButton">PointerButton</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>See <a href="struct.Response.html#method.dragged" title="method egui::Response::dragged"><code>Self::dragged</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drag_stopped" class="method"><a class="src rightside" href="../src/egui/response.rs.html#368-370">Source</a><h4 class="code-header">pub fn <a href="#method.drag_stopped" class="fn">drag_stopped</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>The widget was being dragged, but now it has been released.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drag_stopped_by" class="method"><a class="src rightside" href="../src/egui/response.rs.html#373-375">Source</a><h4 class="code-header">pub fn <a href="#method.drag_stopped_by" class="fn">drag_stopped_by</a>(&amp;self, button: <a class="enum" href="enum.PointerButton.html" title="enum egui::PointerButton">PointerButton</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>The widget was being dragged by the button, but now it has been released.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drag_released" class="method"><a class="src rightside" href="../src/egui/response.rs.html#380-382">Source</a><h4 class="code-header">pub fn <a href="#method.drag_released" class="fn">drag_released</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: Renamed drag_stopped</span></div></span></summary><div class="docblock"><p>The widget was being dragged, but now it has been released.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drag_released_by" class="method"><a class="src rightside" href="../src/egui/response.rs.html#386-388">Source</a><h4 class="code-header">pub fn <a href="#method.drag_released_by" class="fn">drag_released_by</a>(&amp;self, button: <a class="enum" href="enum.PointerButton.html" title="enum egui::PointerButton">PointerButton</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: Renamed drag_stopped_by</span></div></span></summary><div class="docblock"><p>The widget was being dragged by the button, but now it has been released.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drag_delta" class="method"><a class="src rightside" href="../src/egui/response.rs.html#392-402">Source</a><h4 class="code-header">pub fn <a href="#method.drag_delta" class="fn">drag_delta</a>(&amp;self) -&gt; <a class="struct" href="struct.Vec2.html" title="struct egui::Vec2">Vec2</a></h4></section></summary><div class="docblock"><p>If dragged, how many points were we dragged and in what direction?</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drag_motion" class="method"><a class="src rightside" href="../src/egui/response.rs.html#409-416">Source</a><h4 class="code-header">pub fn <a href="#method.drag_motion" class="fn">drag_motion</a>(&amp;self) -&gt; <a class="struct" href="struct.Vec2.html" title="struct egui::Vec2">Vec2</a></h4></section></summary><div class="docblock"><p>If dragged, how far did the mouse move?
This will use raw mouse movement if provided by the integration, otherwise will fall back to <a href="struct.Response.html#method.drag_delta" title="method egui::Response::drag_delta"><code>Response::drag_delta</code></a>
Raw mouse movement is unaccelerated and unclamped by screen boundaries, and does not relate to any position on the screen.
This may be useful in certain situations such as draggable values and 3D cameras, where screen position does not matter.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dnd_set_drag_payload" class="method"><a class="src rightside" href="../src/egui/response.rs.html#420-430">Source</a><h4 class="code-header">pub fn <a href="#method.dnd_set_drag_payload" class="fn">dnd_set_drag_payload</a>&lt;Payload: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>&gt;(&amp;self, payload: Payload)</h4></section></summary><div class="docblock"><p>If the user started dragging this widget this frame, store the payload for drag-and-drop.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dnd_hover_payload" class="method"><a class="src rightside" href="../src/egui/response.rs.html#437-445">Source</a><h4 class="code-header">pub fn <a href="#method.dnd_hover_payload" class="fn">dnd_hover_payload</a>&lt;Payload: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>&gt;(
&amp;self,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;Payload&gt;&gt;</h4></section></summary><div class="docblock"><p>Drag-and-Drop: Return what is being held over this widget, if any.</p>
<p>Only returns something if <a href="struct.Response.html#method.contains_pointer" title="method egui::Response::contains_pointer"><code>Self::contains_pointer</code></a> is true,
and the user is drag-dropping something of this type.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dnd_release_payload" class="method"><a class="src rightside" href="../src/egui/response.rs.html#453-461">Source</a><h4 class="code-header">pub fn <a href="#method.dnd_release_payload" class="fn">dnd_release_payload</a>&lt;Payload: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>&gt;(
&amp;self,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;Payload&gt;&gt;</h4></section></summary><div class="docblock"><p>Drag-and-Drop: Return what is being dropped onto this widget, if any.</p>
<p>Only returns something if <a href="struct.Response.html#method.contains_pointer" title="method egui::Response::contains_pointer"><code>Self::contains_pointer</code></a> is true,
the user is drag-dropping something of this type,
and they released it this frame</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.interact_pointer_pos" class="method"><a class="src rightside" href="../src/egui/response.rs.html#467-469">Source</a><h4 class="code-header">pub fn <a href="#method.interact_pointer_pos" class="fn">interact_pointer_pos</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.Pos2.html" title="struct egui::Pos2">Pos2</a>&gt;</h4></section></summary><div class="docblock"><p>Where the pointer (mouse/touch) were when when this widget was clicked or dragged.</p>
<p><code>None</code> if the widget is not being interacted with.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.hover_pos" class="method"><a class="src rightside" href="../src/egui/response.rs.html#475-485">Source</a><h4 class="code-header">pub fn <a href="#method.hover_pos" class="fn">hover_pos</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.Pos2.html" title="struct egui::Pos2">Pos2</a>&gt;</h4></section></summary><div class="docblock"><p>If it is a good idea to show a tooltip, where is pointer?</p>
<p>None if the pointer is outside the response area.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_pointer_button_down_on" class="method"><a class="src rightside" href="../src/egui/response.rs.html#494-496">Source</a><h4 class="code-header">pub fn <a href="#method.is_pointer_button_down_on" class="fn">is_pointer_button_down_on</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Is the pointer button currently down on this widget?</p>
<p>This is true if the pointer is pressing down or dragging a widget,
even when dragging outside the widget.</p>
<p>This could also be thought of as “is this widget being interacted with?”.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.changed" class="method"><a class="src rightside" href="../src/egui/response.rs.html#512-514">Source</a><h4 class="code-header">pub fn <a href="#method.changed" class="fn">changed</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Was the underlying data changed?</p>
<p>e.g. the slider was dragged, text was entered in a <a href="widgets/text_edit/struct.TextEdit.html" title="struct egui::widgets::text_edit::TextEdit"><code>TextEdit</code></a> etc.
Always <code>false</code> for something like a <a href="widgets/struct.Button.html" title="struct egui::widgets::Button"><code>Button</code></a>.</p>
<p>Can sometimes be <code>true</code> even though the data didnt changed
(e.g. if the user entered a character and erased it the same frame).</p>
<p>This is not set if the <em>view</em> of the data was changed.
For instance, moving the cursor in a <a href="widgets/text_edit/struct.TextEdit.html" title="struct egui::widgets::text_edit::TextEdit"><code>TextEdit</code></a> does not set this to <code>true</code>.</p>
<p>Note that this can be <code>true</code> even if the user did not interact with the widget,
for instance if an existing slider value was clamped to the given range.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.mark_changed" class="method"><a class="src rightside" href="../src/egui/response.rs.html#524-526">Source</a><h4 class="code-header">pub fn <a href="#method.mark_changed" class="fn">mark_changed</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Report the data shown by this widget changed.</p>
<p>This must be called by widgets that represent some mutable data,
e.g. checkboxes, sliders etc.</p>
<p>This should be called when the <em>content</em> changes, but not when the view does.
So we call this when the text of a <a href="widgets/text_edit/struct.TextEdit.html" title="struct egui::widgets::text_edit::TextEdit"><code>crate::TextEdit</code></a>, but not when the cursors changes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_hover_ui" class="method"><a class="src rightside" href="../src/egui/response.rs.html#549-554">Source</a><h4 class="code-header">pub fn <a href="#method.on_hover_ui" class="fn">on_hover_ui</a>(self, add_contents: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut <a class="struct" href="struct.Ui.html" title="struct egui::Ui">Ui</a>)) -&gt; Self</h4></section></summary><div class="docblock"><p>Show this UI if the widget was hovered (i.e. a tooltip).</p>
<p>The text will not be visible if the widget is not enabled.
For that, use <a href="struct.Response.html#method.on_disabled_hover_ui" title="method egui::Response::on_disabled_hover_ui"><code>Self::on_disabled_hover_ui</code></a> instead.</p>
<p>If you call this multiple times the tooltips will stack underneath the previous ones.</p>
<p>The widget can contain interactive widgets, such as buttons and links.
If so, it will stay open as the user moves their pointer over it.
By default, the text of a tooltip is NOT selectable (i.e. interactive),
but you can change this by setting [<code>style::Interaction::selectable_labels</code> from within the tooltip:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ui.label(<span class="string">"Hover me"</span>).on_hover_ui(|ui| {
ui.style_mut().interaction.selectable_labels = <span class="bool-val">true</span>;
ui.label(<span class="string">"This text can be selected"</span>);
});</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_disabled_hover_ui" class="method"><a class="src rightside" href="../src/egui/response.rs.html#557-568">Source</a><h4 class="code-header">pub fn <a href="#method.on_disabled_hover_ui" class="fn">on_disabled_hover_ui</a>(self, add_contents: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut <a class="struct" href="struct.Ui.html" title="struct egui::Ui">Ui</a>)) -&gt; Self</h4></section></summary><div class="docblock"><p>Show this UI when hovering if the widget is disabled.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_hover_ui_at_pointer" class="method"><a class="src rightside" href="../src/egui/response.rs.html#571-581">Source</a><h4 class="code-header">pub fn <a href="#method.on_hover_ui_at_pointer" class="fn">on_hover_ui_at_pointer</a>(self, add_contents: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut <a class="struct" href="struct.Ui.html" title="struct egui::Ui">Ui</a>)) -&gt; Self</h4></section></summary><div class="docblock"><p>Like <code>on_hover_ui</code>, but show the ui next to cursor.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.show_tooltip_ui" class="method"><a class="src rightside" href="../src/egui/response.rs.html#586-594">Source</a><h4 class="code-header">pub fn <a href="#method.show_tooltip_ui" class="fn">show_tooltip_ui</a>(&amp;self, add_contents: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut <a class="struct" href="struct.Ui.html" title="struct egui::Ui">Ui</a>))</h4></section></summary><div class="docblock"><p>Always show this tooltip, even if disabled and the user isnt hovering it.</p>
<p>This can be used to give attention to a widget during a tutorial.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.show_tooltip_text" class="method"><a class="src rightside" href="../src/egui/response.rs.html#599-603">Source</a><h4 class="code-header">pub fn <a href="#method.show_tooltip_text" class="fn">show_tooltip_text</a>(&amp;self, text: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="widget_text/enum.WidgetText.html" title="enum egui::widget_text::WidgetText">WidgetText</a>&gt;)</h4></section></summary><div class="docblock"><p>Always show this tooltip, even if disabled and the user isnt hovering it.</p>
<p>This can be used to give attention to a widget during a tutorial.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_tooltip_open" class="method"><a class="src rightside" href="../src/egui/response.rs.html#606-608">Source</a><h4 class="code-header">pub fn <a href="#method.is_tooltip_open" class="fn">is_tooltip_open</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Was the tooltip open last frame?</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_hover_text_at_pointer" class="method"><a class="src rightside" href="../src/egui/response.rs.html#785-793">Source</a><h4 class="code-header">pub fn <a href="#method.on_hover_text_at_pointer" class="fn">on_hover_text_at_pointer</a>(self, text: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="widget_text/enum.WidgetText.html" title="enum egui::widget_text::WidgetText">WidgetText</a>&gt;) -&gt; Self</h4></section></summary><div class="docblock"><p>Like <code>on_hover_text</code>, but show the text next to cursor.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_hover_text" class="method"><a class="src rightside" href="../src/egui/response.rs.html#802-810">Source</a><h4 class="code-header">pub fn <a href="#method.on_hover_text" class="fn">on_hover_text</a>(self, text: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="widget_text/enum.WidgetText.html" title="enum egui::widget_text::WidgetText">WidgetText</a>&gt;) -&gt; Self</h4></section></summary><div class="docblock"><p>Show this text if the widget was hovered (i.e. a tooltip).</p>
<p>The text will not be visible if the widget is not enabled.
For that, use <a href="struct.Response.html#method.on_disabled_hover_text" title="method egui::Response::on_disabled_hover_text"><code>Self::on_disabled_hover_text</code></a> instead.</p>
<p>If you call this multiple times the tooltips will stack underneath the previous ones.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.highlight" class="method"><a class="src rightside" href="../src/egui/response.rs.html#818-822">Source</a><h4 class="code-header">pub fn <a href="#method.highlight" class="fn">highlight</a>(self) -&gt; Self</h4></section></summary><div class="docblock"><p>Highlight this widget, to make it look like it is hovered, even if it isnt.</p>
<p>The highlight takes one frame to take effect if you call this after the widget has been fully rendered.</p>
<p>See also <a href="struct.Context.html#method.highlight_widget" title="method egui::Context::highlight_widget"><code>Context::highlight_widget</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_disabled_hover_text" class="method"><a class="src rightside" href="../src/egui/response.rs.html#825-833">Source</a><h4 class="code-header">pub fn <a href="#method.on_disabled_hover_text" class="fn">on_disabled_hover_text</a>(self, text: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="widget_text/enum.WidgetText.html" title="enum egui::widget_text::WidgetText">WidgetText</a>&gt;) -&gt; Self</h4></section></summary><div class="docblock"><p>Show this text when hovering if the widget is disabled.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_hover_cursor" class="method"><a class="src rightside" href="../src/egui/response.rs.html#837-842">Source</a><h4 class="code-header">pub fn <a href="#method.on_hover_cursor" class="fn">on_hover_cursor</a>(self, cursor: <a class="enum" href="output/enum.CursorIcon.html" title="enum egui::output::CursorIcon">CursorIcon</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>When hovered, use this icon for the mouse cursor.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_hover_and_drag_cursor" class="method"><a class="src rightside" href="../src/egui/response.rs.html#846-851">Source</a><h4 class="code-header">pub fn <a href="#method.on_hover_and_drag_cursor" class="fn">on_hover_and_drag_cursor</a>(self, cursor: <a class="enum" href="output/enum.CursorIcon.html" title="enum egui::output::CursorIcon">CursorIcon</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>When hovered or dragged, use this icon for the mouse cursor.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.interact" class="method"><a class="src rightside" href="../src/egui/response.rs.html#878-895">Source</a><h4 class="code-header">pub fn <a href="#method.interact" class="fn">interact</a>(&amp;self, sense: <a class="struct" href="struct.Sense.html" title="struct egui::Sense">Sense</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Sense more interactions (e.g. sense clicks on a <a href="struct.Response.html" title="struct egui::Response"><code>Response</code></a> returned from a label).</p>
<p>The interaction will occur on the same plane as the original widget,
i.e. if the response was from a widget behind button, the interaction will also be behind that button.
egui gives priority to the <em>last</em> added widget (the one on top gets clicked first).</p>
<p>Note that this call will not add any hover-effects to the widget, so when possible
it is better to give the widget a <a href="struct.Sense.html" title="struct egui::Sense"><code>Sense</code></a> instead, e.g. using <a href="widgets/struct.Label.html#method.sense" title="method egui::widgets::Label::sense"><code>crate::Label::sense</code></a>.</p>
<p>Using this method on a <code>Response</code> that is the result of calling <code>union</code> on multiple <code>Response</code>s
is undefined behavior.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>horiz_response = ui.horizontal(|ui| {
ui.label(<span class="string">"hello"</span>);
}).response;
<span class="macro">assert!</span>(!horiz_response.clicked()); <span class="comment">// ui's don't sense clicks by default
</span><span class="kw">let </span>horiz_response = horiz_response.interact(egui::Sense::click());
<span class="kw">if </span>horiz_response.clicked() {
<span class="comment">// The background behind the label was clicked
</span>}</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.scroll_to_me" class="method"><a class="src rightside" href="../src/egui/response.rs.html#916-918">Source</a><h4 class="code-header">pub fn <a href="#method.scroll_to_me" class="fn">scroll_to_me</a>(&amp;self, align: <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="enum.Align.html" title="enum egui::Align">Align</a>&gt;)</h4></section></summary><div class="docblock"><p>Adjust the scroll position until this UI becomes visible.</p>
<p>If <code>align</code> is <a href="enum.Align.html#associatedconstant.TOP" title="associated constant egui::Align::TOP"><code>Align::TOP</code></a> it means “put the top of the rect at the top of the scroll area”, etc.
If <code>align</code> is <code>None</code>, itll scroll enough to bring the UI into view.</p>
<p>See also: <a href="struct.Ui.html#method.scroll_to_cursor" title="method egui::Ui::scroll_to_cursor"><code>Ui::scroll_to_cursor</code></a>, <a href="struct.Ui.html#method.scroll_to_rect" title="method egui::Ui::scroll_to_rect"><code>Ui::scroll_to_rect</code></a>. <a href="struct.Ui.html#method.scroll_with_delta" title="method egui::Ui::scroll_with_delta"><code>Ui::scroll_with_delta</code></a>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>egui::ScrollArea::vertical().show(ui, |ui| {
<span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..<span class="number">1000 </span>{
<span class="kw">let </span>response = ui.button(<span class="string">"Scroll to me"</span>);
<span class="kw">if </span>response.clicked() {
response.scroll_to_me(<span class="prelude-val">Some</span>(egui::Align::Center));
}
}
});</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.scroll_to_me_animation" class="method"><a class="src rightside" href="../src/egui/response.rs.html#921-938">Source</a><h4 class="code-header">pub fn <a href="#method.scroll_to_me_animation" class="fn">scroll_to_me_animation</a>(
&amp;self,
align: <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="enum.Align.html" title="enum egui::Align">Align</a>&gt;,
animation: <a class="struct" href="style/struct.ScrollAnimation.html" title="struct egui::style::ScrollAnimation">ScrollAnimation</a>,
)</h4></section></summary><div class="docblock"><p>Like <a href="struct.Response.html#method.scroll_to_me" title="method egui::Response::scroll_to_me"><code>Self::scroll_to_me</code></a>, but allows you to specify the <a href="style/struct.ScrollAnimation.html" title="struct egui::style::ScrollAnimation"><code>crate::style::ScrollAnimation</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.widget_info" class="method"><a class="src rightside" href="../src/egui/response.rs.html#943-970">Source</a><h4 class="code-header">pub fn <a href="#method.widget_info" class="fn">widget_info</a>(&amp;self, make_info: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>() -&gt; <a class="struct" href="output/struct.WidgetInfo.html" title="struct egui::output::WidgetInfo">WidgetInfo</a>)</h4></section></summary><div class="docblock"><p>For accessibility.</p>
<p>Call after interacting and potential calls to <a href="struct.Response.html#method.mark_changed" title="method egui::Response::mark_changed"><code>Self::mark_changed</code></a>.</p>
</div></details><section id="method.output_event" class="method"><a class="src rightside" href="../src/egui/response.rs.html#972-982">Source</a><h4 class="code-header">pub fn <a href="#method.output_event" class="fn">output_event</a>(&amp;self, event: <a class="enum" href="output/enum.OutputEvent.html" title="enum egui::output::OutputEvent">OutputEvent</a>)</h4></section><details class="toggle method-toggle" open><summary><section id="method.labelled_by" class="method"><a class="src rightside" href="../src/egui/response.rs.html#1073-1084">Source</a><h4 class="code-header">pub fn <a href="#method.labelled_by" class="fn">labelled_by</a>(self, id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Associate a label with a control for accessibility.</p>
<h5 id="example"><a class="doc-anchor" href="#example">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ui.horizontal(|ui| {
<span class="kw">let </span>label = ui.label(<span class="string">"Your name: "</span>);
ui.text_edit_singleline(<span class="kw-2">&amp;mut </span>text).labelled_by(label.id);
});</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.context_menu" class="method"><a class="src rightside" href="../src/egui/response.rs.html#1103-1105">Source</a><h4 class="code-header">pub fn <a href="#method.context_menu" class="fn">context_menu</a>(
&amp;self,
add_contents: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut <a class="struct" href="struct.Ui.html" title="struct egui::Ui">Ui</a>),
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.InnerResponse.html" title="struct egui::InnerResponse">InnerResponse</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Response to secondary clicks (right-clicks) by showing the given menu.</p>
<p>Make sure the widget senses clicks (e.g. <a href="widgets/struct.Button.html" title="struct egui::widgets::Button"><code>crate::Button</code></a> does, <a href="widgets/struct.Label.html" title="struct egui::widgets::Label"><code>crate::Label</code></a> does not).</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>response = ui.add(Label::new(<span class="string">"Right-click me!"</span>).sense(Sense::click()));
response.context_menu(|ui| {
<span class="kw">if </span>ui.button(<span class="string">"Close the menu"</span>).clicked() {
ui.close_menu();
}
});</code></pre></div>
<p>See also: <a href="struct.Ui.html#method.menu_button" title="method egui::Ui::menu_button"><code>Ui::menu_button</code></a> and <a href="struct.Ui.html#method.close_menu" title="method egui::Ui::close_menu"><code>Ui::close_menu</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.context_menu_opened" class="method"><a class="src rightside" href="../src/egui/response.rs.html#1110-1112">Source</a><h4 class="code-header">pub fn <a href="#method.context_menu_opened" class="fn">context_menu_opened</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns whether a context menu is currently open for this widget.</p>
<p>See <a href="struct.Response.html#method.context_menu" title="method egui::Response::context_menu"><code>Self::context_menu</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.paint_debug_info" class="method"><a class="src rightside" href="../src/egui/response.rs.html#1124-1136">Source</a><h4 class="code-header">pub fn <a href="#method.paint_debug_info" class="fn">paint_debug_info</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Draw a debug rectangle over the response displaying the responses id and whether it is
enabled and/or hovered.</p>
<p>This function is intended for debugging purpose and can be useful, for example, in case of
widget id instability.</p>
<p>Color code:</p>
<ul>
<li>Blue: Enabled but not hovered</li>
<li>Green: Enabled and hovered</li>
<li>Red: Disabled</li>
</ul>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Response-1" class="impl"><a class="src rightside" href="../src/egui/response.rs.html#1139-1176">Source</a><a href="#impl-Response-1" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.union" class="method"><a class="src rightside" href="../src/egui/response.rs.html#1146-1175">Source</a><h4 class="code-header">pub fn <a href="#method.union" class="fn">union</a>(&amp;self, other: Self) -&gt; Self</h4></section></summary><div class="docblock"><p>A logical “or” operation.
For instance <code>a.union(b).hovered</code> means “was either a or b hovered?”.</p>
<p>The resulting <a href="struct.Response.html#structfield.id" title="field egui::Response::id"><code>Self::id</code></a> will come from the first (<code>self</code>) argument.</p>
<p>You may not call <a href="struct.Response.html#method.interact" title="method egui::Response::interact"><code>Self::interact</code></a> on the resulting <code>Response</code>.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Response-2" class="impl"><a class="src rightside" href="../src/egui/response.rs.html#1178-1184">Source</a><a href="#impl-Response-2" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_new_rect" class="method"><a class="src rightside" href="../src/egui/response.rs.html#1181-1183">Source</a><h4 class="code-header">pub fn <a href="#method.with_new_rect" class="fn">with_new_rect</a>(self, rect: <a class="struct" href="struct.Rect.html" title="struct egui::Rect">Rect</a>) -&gt; Self</h4></section></summary><div class="docblock"><p>Returns a response with a modified <a href="struct.Response.html#structfield.rect" title="field egui::Response::rect"><code>Self::rect</code></a>.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-BitOr-for-Response" class="impl"><a class="src rightside" href="../src/egui/response.rs.html#1198-1204">Source</a><a href="#impl-BitOr-for-Response" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/bit/trait.BitOr.html" title="trait core::ops::bit::BitOr">BitOr</a> for <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h3></section></summary><div class="docblock"><p>See <a href="struct.Response.html#method.union" title="method egui::Response::union"><code>Response::union</code></a>.</p>
<p>To summarize the response from many widgets you can use this pattern:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>egui::<span class="kw-2">*</span>;
<span class="kw">fn </span>draw_vec2(ui: <span class="kw-2">&amp;mut </span>Ui, v: <span class="kw-2">&amp;mut </span>Vec2) -&gt; Response {
ui.add(DragValue::new(<span class="kw-2">&amp;mut </span>v.x)) | ui.add(DragValue::new(<span class="kw-2">&amp;mut </span>v.y))
}</code></pre></div>
<p>Now <code>draw_vec2(ui, foo).hovered</code> is true if either <a href="widgets/struct.DragValue.html" title="struct egui::widgets::DragValue"><code>DragValue</code></a> were hovered.</p>
</div><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a class="src rightside" href="../src/egui/response.rs.html#1199">Source</a><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/ops/bit/trait.BitOr.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>|</code> operator.</div></details><details class="toggle method-toggle" open><summary><section id="method.bitor" class="method trait-impl"><a class="src rightside" href="../src/egui/response.rs.html#1201-1203">Source</a><a href="#method.bitor" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/ops/bit/trait.BitOr.html#tymethod.bitor" class="fn">bitor</a>(self, rhs: Self) -&gt; Self</h4></section></summary><div class='docblock'>Performs the <code>|</code> operation. <a href="https://doc.rust-lang.org/1.84.0/core/ops/bit/trait.BitOr.html#tymethod.bitor">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-BitOrAssign-for-Response" class="impl"><a class="src rightside" href="../src/egui/response.rs.html#1219-1223">Source</a><a href="#impl-BitOrAssign-for-Response" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/bit/trait.BitOrAssign.html" title="trait core::ops::bit::BitOrAssign">BitOrAssign</a> for <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h3></section></summary><div class="docblock"><p>See <a href="struct.Response.html#method.union" title="method egui::Response::union"><code>Response::union</code></a>.</p>
<p>To summarize the response from many widgets you can use this pattern:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>response = ui.add(widget_a);
response |= ui.add(widget_b);
response |= ui.add(widget_c);
<span class="kw">if </span>response.hovered() { ui.label(<span class="string">"You hovered at least one of the widgets"</span>); }</code></pre></div>
</div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.bitor_assign" class="method trait-impl"><a class="src rightside" href="../src/egui/response.rs.html#1220-1222">Source</a><a href="#method.bitor_assign" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/ops/bit/trait.BitOrAssign.html#tymethod.bitor_assign" class="fn">bitor_assign</a>(&amp;mut self, rhs: Self)</h4></section></summary><div class='docblock'>Performs the <code>|=</code> operation. <a href="https://doc.rust-lang.org/1.84.0/core/ops/bit/trait.BitOrAssign.html#tymethod.bitor_assign">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Response" class="impl"><a class="src rightside" href="../src/egui/response.rs.html#21">Source</a><a href="#impl-Clone-for-Response" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../src/egui/response.rs.html#21">Source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/clone.rs.html#174">Source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: &amp;Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Response" class="impl"><a class="src rightside" href="../src/egui/response.rs.html#21">Source</a><a href="#impl-Debug-for-Response" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/egui/response.rs.html#21">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.84.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Response" class="impl"><a href="#impl-Freeze-for-Response" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h3></section><section id="impl-RefUnwindSafe-for-Response" class="impl"><a href="#impl-RefUnwindSafe-for-Response" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h3></section><section id="impl-Send-for-Response" class="impl"><a href="#impl-Send-for-Response" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h3></section><section id="impl-Sync-for-Response" class="impl"><a href="#impl-Sync-for-Response" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h3></section><section id="impl-Unpin-for-Response" class="impl"><a href="#impl-Unpin-for-Response" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h3></section><section id="impl-UnwindSafe-for-Response" class="impl"><a href="#impl-UnwindSafe-for-Response" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Response.html" title="struct egui::Response">Response</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-CloneToUninit-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/clone.rs.html#273">Source</a><a href="#impl-CloneToUninit-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.CloneToUninit.html" title="trait core::clone::CloneToUninit">CloneToUninit</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone_to_uninit" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/clone.rs.html#275">Source</a><a href="#method.clone_to_uninit" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit" class="fn">clone_to_uninit</a>(&amp;self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>clone_to_uninit</code>)</span></div></span><div class='docblock'>Performs copy-assignment from <code>self</code> to <code>dst</code>. <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#765">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#748-750">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#82-84">Source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#86">Source</a><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#87">Source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&amp;self) -&gt; T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#91">Source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#805-807">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#790-792">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><section id="impl-SerializableAny-for-T" class="impl"><a class="src rightside" href="../src/egui/util/id_type_map.rs.html#54">Source</a><a href="#impl-SerializableAny-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="util/id_type_map/trait.SerializableAny.html" title="trait egui::util::id_type_map::SerializableAny">SerializableAny</a> for T<div class="where">where
T: 'static + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + for&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></h3></section></div></section></div></main></body></html>