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

725 lines
193 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="Your handle to egui."><title>Context 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="#">Context</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#locking" title="Locking">Locking</a></li><li><a href="#example" title="Example:">Example:</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.add_bytes_loader" title="add_bytes_loader">add_bytes_loader</a></li><li><a href="#method.add_font" title="add_font">add_font</a></li><li><a href="#method.add_image_loader" title="add_image_loader">add_image_loader</a></li><li><a href="#method.add_texture_loader" title="add_texture_loader">add_texture_loader</a></li><li><a href="#method.all_styles_mut" title="all_styles_mut">all_styles_mut</a></li><li><a href="#method.animate_bool" title="animate_bool">animate_bool</a></li><li><a href="#method.animate_bool_responsive" title="animate_bool_responsive">animate_bool_responsive</a></li><li><a href="#method.animate_bool_with_easing" title="animate_bool_with_easing">animate_bool_with_easing</a></li><li><a href="#method.animate_bool_with_time" title="animate_bool_with_time">animate_bool_with_time</a></li><li><a href="#method.animate_bool_with_time_and_easing" title="animate_bool_with_time_and_easing">animate_bool_with_time_and_easing</a></li><li><a href="#method.animate_value_with_time" title="animate_value_with_time">animate_value_with_time</a></li><li><a href="#method.available_rect" title="available_rect">available_rect</a></li><li><a href="#method.begin_frame" title="begin_frame">begin_frame</a></li><li><a href="#method.begin_pass" title="begin_pass">begin_pass</a></li><li><a href="#method.check_for_id_clash" title="check_for_id_clash">check_for_id_clash</a></li><li><a href="#method.clear_animations" title="clear_animations">clear_animations</a></li><li><a href="#method.copy_text" title="copy_text">copy_text</a></li><li><a href="#method.cumulative_pass_nr" title="cumulative_pass_nr">cumulative_pass_nr</a></li><li><a href="#method.cumulative_pass_nr_for" title="cumulative_pass_nr_for">cumulative_pass_nr_for</a></li><li><a href="#method.data" title="data">data</a></li><li><a href="#method.data_mut" title="data_mut">data_mut</a></li><li><a href="#method.debug_on_hover" title="debug_on_hover">debug_on_hover</a></li><li><a href="#method.debug_painter" title="debug_painter">debug_painter</a></li><li><a href="#method.debug_text" title="debug_text">debug_text</a></li><li><a href="#method.drag_started_id" title="drag_started_id">drag_started_id</a></li><li><a href="#method.drag_stopped_id" title="drag_stopped_id">drag_stopped_id</a></li><li><a href="#method.dragged_id" title="dragged_id">dragged_id</a></li><li><a href="#method.dragging_something_else" title="dragging_something_else">dragging_something_else</a></li><li><a href="#method.embed_viewports" title="embed_viewports">embed_viewports</a></li><li><a href="#method.end_frame" title="end_frame">end_frame</a></li><li><a href="#method.end_pass" title="end_pass">end_pass</a></li><li><a href="#method.fonts" title="fonts">fonts</a></li><li><a href="#method.forget_all_images" title="forget_all_images">forget_all_images</a></li><li><a href="#method.forget_image" title="forget_image">forget_image</a></li><li><a href="#method.format_shortcut" title="format_shortcut">format_shortcut</a></li><li><a href="#method.graphics" title="graphics">graphics</a></li><li><a href="#method.graphics_mut" title="graphics_mut">graphics_mut</a></li><li><a href="#method.has_requested_repaint" title="has_requested_repaint">has_requested_repaint</a></li><li><a href="#method.has_requested_repaint_for" title="has_requested_repaint_for">has_requested_repaint_for</a></li><li><a href="#method.highlight_widget" title="highlight_widget">highlight_widget</a></li><li><a href="#method.include_bytes" title="include_bytes">include_bytes</a></li><li><a href="#method.input" title="input">input</a></li><li><a href="#method.input_for" title="input_for">input_for</a></li><li><a href="#method.input_mut" title="input_mut">input_mut</a></li><li><a href="#method.input_mut_for" title="input_mut_for">input_mut_for</a></li><li><a href="#method.inspection_ui" title="inspection_ui">inspection_ui</a></li><li><a href="#method.interaction_snapshot" title="interaction_snapshot">interaction_snapshot</a></li><li><a href="#method.is_being_dragged" title="is_being_dragged">is_being_dragged</a></li><li><a href="#method.is_context_menu_open" title="is_context_menu_open">is_context_menu_open</a></li><li><a href="#method.is_loader_installed" title="is_loader_installed">is_loader_installed</a></li><li><a href="#method.is_pointer_over_area" title="is_pointer_over_area">is_pointer_over_area</a></li><li><a href="#method.is_using_pointer" title="is_using_pointer">is_using_pointer</a></li><li><a href="#method.layer_id_at" title="layer_id_at">layer_id_at</a></li><li><a href="#method.layer_painter" title="layer_painter">layer_painter</a></li><li><a href="#method.layer_transform_from_global" title="layer_transform_from_global">layer_transform_from_global</a></li><li><a href="#method.layer_transform_to_global" title="layer_transform_to_global">layer_transform_to_global</a></li><li><a href="#method.load_texture" title="load_texture">load_texture</a></li><li><a href="#method.loaders" title="loaders">loaders</a></li><li><a href="#method.memory" title="memory">memory</a></li><li><a href="#method.memory_mut" title="memory_mut">memory_mut</a></li><li><a href="#method.memory_ui" title="memory_ui">memory_ui</a></li><li><a href="#method.move_to_top" title="move_to_top">move_to_top</a></li><li><a href="#method.multi_touch" title="multi_touch">multi_touch</a></li><li><a href="#method.native_pixels_per_point" title="native_pixels_per_point">native_pixels_per_point</a></li><li><a href="#method.on_begin_pass" title="on_begin_pass">on_begin_pass</a></li><li><a href="#method.on_end_pass" title="on_end_pass">on_end_pass</a></li><li><a href="#method.open_url" title="open_url">open_url</a></li><li><a href="#method.options" title="options">options</a></li><li><a href="#method.options_mut" title="options_mut">options_mut</a></li><li><a href="#method.os" title="os">os</a></li><li><a href="#method.output" title="output">output</a></li><li><a href="#method.output_mut" title="output_mut">output_mut</a></li><li><a href="#method.parent_viewport_id" title="parent_viewport_id">parent_viewport_id</a></li><li><a href="#method.pixels_per_point" title="pixels_per_point">pixels_per_point</a></li><li><a href="#method.pointer_hover_pos" title="pointer_hover_pos">pointer_hover_pos</a></li><li><a href="#method.pointer_interact_pos" title="pointer_interact_pos">pointer_interact_pos</a></li><li><a href="#method.pointer_latest_pos" title="pointer_latest_pos">pointer_latest_pos</a></li><li><a href="#method.read_response" title="read_response">read_response</a></li><li><a href="#method.rect_contains_pointer" title="rect_contains_pointer">rect_contains_pointer</a></li><li><a href="#method.register_widget_info" title="register_widget_info">register_widget_info</a></li><li><a href="#method.repaint_causes" title="repaint_causes">repaint_causes</a></li><li><a href="#method.request_discard" title="request_discard">request_discard</a></li><li><a href="#method.request_repaint" title="request_repaint">request_repaint</a></li><li><a href="#method.request_repaint_after" title="request_repaint_after">request_repaint_after</a></li><li><a href="#method.request_repaint_after_for" title="request_repaint_after_for">request_repaint_after_for</a></li><li><a href="#method.request_repaint_after_secs" title="request_repaint_after_secs">request_repaint_after_secs</a></li><li><a href="#method.request_repaint_of" title="request_repaint_of">request_repaint_of</a></li><li><a href="#method.requested_repaint_last_pass" title="requested_repaint_last_pass">requested_repaint_last_pass</a></li><li><a href="#method.requested_repaint_last_pass_for" title="requested_repaint_last_pass_for">requested_repaint_last_pass_for</a></li><li><a href="#method.run" title="run">run</a></li><li><a href="#method.screen_rect" title="screen_rect">screen_rect</a></li><li><a href="#method.send_viewport_cmd" title="send_viewport_cmd">send_viewport_cmd</a></li><li><a href="#method.send_viewport_cmd_to" title="send_viewport_cmd_to">send_viewport_cmd_to</a></li><li><a href="#method.set_cursor_icon" title="set_cursor_icon">set_cursor_icon</a></li><li><a href="#method.set_debug_on_hover" title="set_debug_on_hover">set_debug_on_hover</a></li><li><a href="#method.set_dragged_id" title="set_dragged_id">set_dragged_id</a></li><li><a href="#method.set_embed_viewports" title="set_embed_viewports">set_embed_viewports</a></li><li><a href="#method.set_fonts" title="set_fonts">set_fonts</a></li><li><a href="#method.set_immediate_viewport_renderer" title="set_immediate_viewport_renderer">set_immediate_viewport_renderer</a></li><li><a href="#method.set_os" title="set_os">set_os</a></li><li><a href="#method.set_pixels_per_point" title="set_pixels_per_point">set_pixels_per_point</a></li><li><a href="#method.set_request_repaint_callback" title="set_request_repaint_callback">set_request_repaint_callback</a></li><li><a href="#method.set_style" title="set_style">set_style</a></li><li><a href="#method.set_style_of" title="set_style_of">set_style_of</a></li><li><a href="#method.set_sublayer" title="set_sublayer">set_sublayer</a></li><li><a href="#method.set_theme" title="set_theme">set_theme</a></li><li><a href="#method.set_transform_layer" title="set_transform_layer">set_transform_layer</a></li><li><a href="#method.set_visuals" title="set_visuals">set_visuals</a></li><li><a href="#method.set_visuals_of" title="set_visuals_of">set_visuals_of</a></li><li><a href="#method.set_zoom_factor" title="set_zoom_factor">set_zoom_factor</a></li><li><a href="#method.settings_ui" title="settings_ui">settings_ui</a></li><li><a href="#method.show_viewport_deferred" title="show_viewport_deferred">show_viewport_deferred</a></li><li><a href="#method.show_viewport_immediate" title="show_viewport_immediate">show_viewport_immediate</a></li><li><a href="#method.stop_dragging" title="stop_dragging">stop_dragging</a></li><li><a href="#method.style" title="style">style</a></li><li><a href="#method.style_mut" title="style_mut">style_mut</a></li><li><a href="#method.style_mut_of" title="style_mut_of">style_mut_of</a></li><li><a href="#method.style_of" title="style_of">style_of</a></li><li><a href="#method.style_ui" title="style_ui">style_ui</a></li><li><a href="#method.system_theme" title="system_theme">system_theme</a></li><li><a href="#method.tessellate" title="tessellate">tessellate</a></li><li><a href="#method.tessellation_options" title="tessellation_options">tessellation_options</a></li><li><a href="#method.tessellation_options_mut" title="tessellation_options_mut">tessellation_options_mut</a></li><li><a href="#method.tex_manager" title="tex_manager">tex_manager</a></li><li><a href="#method.texture_ui" title="texture_ui">texture_ui</a></li><li><a href="#method.theme" title="theme">theme</a></li><li><a href="#method.top_layer_id" title="top_layer_id">top_layer_id</a></li><li><a href="#method.transform_layer_shapes" title="transform_layer_shapes">transform_layer_shapes</a></li><li><a href="#method.translate_layer" title="translate_layer">translate_layer</a></li><li><a href="#method.try_load_bytes" title="try_load_bytes">try_load_bytes</a></li><li><a href="#method.try_load_image" title="try_load_image">try_load_image</a></li><li><a href="#method.try_load_texture" title="try_load_texture">try_load_texture</a></li><li><a href="#method.used_rect" title="used_rect">used_rect</a></li><li><a href="#method.used_size" title="used_size">used_size</a></li><li><a href="#method.viewport" title="viewport">viewport</a></li><li><a href="#method.viewport_for" title="viewport_for">viewport_for</a></li><li><a href="#method.viewport_id" title="viewport_id">viewport_id</a></li><li><a href="#method.wants_keyboard_input" title="wants_keyboard_input">wants_keyboard_input</a></li><li><a href="#method.wants_pointer_input" title="wants_pointer_input">wants_pointer_input</a></li><li><a href="#method.widget_contains_pointer" title="widget_contains_pointer">widget_contains_pointer</a></li><li><a href="#method.will_discard" title="will_discard">will_discard</a></li><li><a href="#method.with_accessibility_parent" title="with_accessibility_parent">with_accessibility_parent</a></li><li><a href="#method.zoom_factor" title="zoom_factor">zoom_factor</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Context" title="Clone">Clone</a></li><li><a href="#impl-Debug-for-Context" title="Debug">Debug</a></li><li><a href="#impl-Default-for-Context" title="Default">Default</a></li><li><a href="#impl-PartialEq-for-Context" title="PartialEq">PartialEq</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Context" title="!RefUnwindSafe">!RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-Context" title="!UnwindSafe">!UnwindSafe</a></li><li><a href="#impl-Freeze-for-Context" title="Freeze">Freeze</a></li><li><a href="#impl-Send-for-Context" title="Send">Send</a></li><li><a href="#impl-Sync-for-Context" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Context" 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">Context</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/context.rs.html#736">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Context(<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>Your handle to egui.</p>
<p>This is the first thing you need when working with egui.
Contains the <a href="struct.InputState.html" title="struct egui::InputState"><code>InputState</code></a>, <a href="struct.Memory.html" title="struct egui::Memory"><code>Memory</code></a>, <a href="output/struct.PlatformOutput.html" title="struct egui::output::PlatformOutput"><code>PlatformOutput</code></a>, and more.</p>
<p><a href="struct.Context.html" title="struct egui::Context"><code>Context</code></a> is cheap to clone, and any clones refers to the same mutable data
(<a href="struct.Context.html" title="struct egui::Context"><code>Context</code></a> uses refcounting internally).</p>
<h3 id="locking"><a class="doc-anchor" href="#locking">§</a>Locking</h3>
<p>All methods are marked <code>&amp;self</code>; <a href="struct.Context.html" title="struct egui::Context"><code>Context</code></a> has interior mutability protected by an <a href="mutex/struct.RwLock.html" title="struct egui::mutex::RwLock"><code>RwLock</code></a>.</p>
<p>To access parts of a <code>Context</code> you need to use some of the helper functions that take closures:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">if </span>ctx.input(|i| i.key_pressed(egui::Key::A)) {
ctx.output_mut(|o| o.copied_text = <span class="string">"Hello!"</span>.to_string());
}</code></pre></div>
<p>Within such a closure you may NOT recursively lock the same <a href="struct.Context.html" title="struct egui::Context"><code>Context</code></a>, as that can lead to a deadlock.
Therefore it is important that any lock of <a href="struct.Context.html" title="struct egui::Context"><code>Context</code></a> is short-lived.</p>
<p>These are effectively transactional accesses.</p>
<p><a href="struct.Ui.html" title="struct egui::Ui"><code>Ui</code></a> has many of the same accessor functions, and the same applies there.</p>
<h3 id="example"><a class="doc-anchor" href="#example">§</a>Example:</h3>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>ctx = egui::Context::default();
<span class="comment">// Game loop:
</span><span class="kw">loop </span>{
<span class="kw">let </span>raw_input = egui::RawInput::default();
<span class="kw">let </span>full_output = ctx.run(raw_input, |ctx| {
egui::CentralPanel::default().show(<span class="kw-2">&amp;</span>ctx, |ui| {
ui.label(<span class="string">"Hello world!"</span>);
<span class="kw">if </span>ui.button(<span class="string">"Click me"</span>).clicked() {
<span class="comment">// take some action here
</span>}
});
});
handle_platform_output(full_output.platform_output);
<span class="kw">let </span>clipped_primitives = ctx.tessellate(full_output.shapes, full_output.pixels_per_point);
paint(full_output.textures_delta, clipped_primitives);
}</code></pre></div>
</div></details><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-Context" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#767-893">Source</a><a href="#impl-Context" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.run" class="method"><a class="src rightside" href="../src/egui/context.rs.html#802-857">Source</a><h4 class="code-header">pub fn <a href="#method.run" class="fn">run</a>(&amp;self, new_input: <a class="struct" href="struct.RawInput.html" title="struct egui::RawInput">RawInput</a>, run_ui: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self)) -&gt; <a class="struct" href="output/struct.FullOutput.html" title="struct egui::output::FullOutput">FullOutput</a></h4></section></summary><div class="docblock"><p>Run the ui code for one 1.</p>
<p>At most <a href="struct.Options.html#structfield.max_passes" title="field egui::Options::max_passes"><code>Options::max_passes</code></a> calls will be issued to <code>run_ui</code>,
and only on the rare occasion that <a href="struct.Context.html#method.request_discard" title="method egui::Context::request_discard"><code>Context::request_discard</code></a> is called.
Usually, it <code>run_ui</code> will only be called once.</p>
<p>Put your widgets into a <a href="containers/panel/struct.SidePanel.html" title="struct egui::containers::panel::SidePanel"><code>crate::SidePanel</code></a>, <a href="containers/panel/struct.TopBottomPanel.html" title="struct egui::containers::panel::TopBottomPanel"><code>crate::TopBottomPanel</code></a>, <a href="containers/panel/struct.CentralPanel.html" title="struct egui::containers::panel::CentralPanel"><code>crate::CentralPanel</code></a>, <a href="containers/struct.Window.html" title="struct egui::containers::Window"><code>crate::Window</code></a> or <a href="containers/struct.Area.html" title="struct egui::containers::Area"><code>crate::Area</code></a>.</p>
<p>Instead of calling <code>run</code>, you can alternatively use <a href="struct.Context.html#method.begin_pass" title="method egui::Context::begin_pass"><code>Self::begin_pass</code></a> and <a href="struct.Context.html#method.end_pass" title="method egui::Context::end_pass"><code>Context::end_pass</code></a>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// One egui context that you keep reusing:
</span><span class="kw">let </span><span class="kw-2">mut </span>ctx = egui::Context::default();
<span class="comment">// Each frame:
</span><span class="kw">let </span>input = egui::RawInput::default();
<span class="kw">let </span>full_output = ctx.run(input, |ctx| {
egui::CentralPanel::default().show(<span class="kw-2">&amp;</span>ctx, |ui| {
ui.label(<span class="string">"Hello egui!"</span>);
});
});
<span class="comment">// handle full_output</span></code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.begin_pass" class="method"><a class="src rightside" href="../src/egui/context.rs.html#879-886">Source</a><h4 class="code-header">pub fn <a href="#method.begin_pass" class="fn">begin_pass</a>(&amp;self, new_input: <a class="struct" href="struct.RawInput.html" title="struct egui::RawInput">RawInput</a>)</h4></section></summary><div class="docblock"><p>An alternative to calling <a href="struct.Context.html#method.run" title="method egui::Context::run"><code>Self::run</code></a>.</p>
<p>It is usually better to use <a href="struct.Context.html#method.run" title="method egui::Context::run"><code>Self::run</code></a>, because
<code>run</code> supports multi-pass layout using <a href="struct.Context.html#method.request_discard" title="method egui::Context::request_discard"><code>Self::request_discard</code></a>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// One egui context that you keep reusing:
</span><span class="kw">let </span><span class="kw-2">mut </span>ctx = egui::Context::default();
<span class="comment">// Each frame:
</span><span class="kw">let </span>input = egui::RawInput::default();
ctx.begin_pass(input);
egui::CentralPanel::default().show(<span class="kw-2">&amp;</span>ctx, |ui| {
ui.label(<span class="string">"Hello egui!"</span>);
});
<span class="kw">let </span>full_output = ctx.end_pass();
<span class="comment">// handle full_output</span></code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.begin_frame" class="method"><a class="src rightside" href="../src/egui/context.rs.html#890-892">Source</a><h4 class="code-header">pub fn <a href="#method.begin_frame" class="fn">begin_frame</a>(&amp;self, new_input: <a class="struct" href="struct.RawInput.html" title="struct egui::RawInput">RawInput</a>)</h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: Renamed begin_pass</span></div></span></summary><div class="docblock"><p>See <a href="struct.Context.html#method.begin_pass" title="method egui::Context::begin_pass"><code>Self::begin_pass</code></a>.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-1" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#898-1716">Source</a><a href="#impl-Context-1" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="docblock"><h5 id="borrows-parts-of-context"><a class="doc-anchor" href="#borrows-parts-of-context">§</a>Borrows parts of <a href="struct.Context.html" title="struct egui::Context"><code>Context</code></a></h5>
<p>These functions all lock the <a href="struct.Context.html" title="struct egui::Context"><code>Context</code></a>.
Please see the documentation of <a href="struct.Context.html" title="struct egui::Context"><code>Context</code></a> for how locking works!</p>
</div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.input" class="method"><a class="src rightside" href="../src/egui/context.rs.html#914-916">Source</a><h4 class="code-header">pub fn <a href="#method.input" class="fn">input</a>&lt;R&gt;(&amp;self, reader: 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;<a class="struct" href="struct.InputState.html" title="struct egui::InputState">InputState</a>) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read-only access to <a href="struct.InputState.html" title="struct egui::InputState"><code>InputState</code></a>.</p>
<p>Note that this locks the <a href="struct.Context.html" title="struct egui::Context"><code>Context</code></a>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ctx.input(|i| {
<span class="comment">// ⚠️ Using `ctx` (even from other `Arc` reference) again here will lead to a deadlock!
</span>});
<span class="kw">if let </span><span class="prelude-val">Some</span>(pos) = ctx.input(|i| i.pointer.hover_pos()) {
<span class="comment">// This is fine!
</span>}</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.input_for" class="method"><a class="src rightside" href="../src/egui/context.rs.html#920-922">Source</a><h4 class="code-header">pub fn <a href="#method.input_for" class="fn">input_for</a>&lt;R&gt;(
&amp;self,
id: <a class="struct" href="viewport/struct.ViewportId.html" title="struct egui::viewport::ViewportId">ViewportId</a>,
reader: 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;<a class="struct" href="struct.InputState.html" title="struct egui::InputState">InputState</a>) -&gt; R,
) -&gt; R</h4></section></summary><div class="docblock"><p>This will create a <code>InputState::default()</code> if there is no input state for that viewport</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.input_mut" class="method"><a class="src rightside" href="../src/egui/context.rs.html#926-928">Source</a><h4 class="code-header">pub fn <a href="#method.input_mut" class="fn">input_mut</a>&lt;R&gt;(&amp;self, writer: 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.InputState.html" title="struct egui::InputState">InputState</a>) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read-write access to <a href="struct.InputState.html" title="struct egui::InputState"><code>InputState</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.input_mut_for" class="method"><a class="src rightside" href="../src/egui/context.rs.html#932-934">Source</a><h4 class="code-header">pub fn <a href="#method.input_mut_for" class="fn">input_mut_for</a>&lt;R&gt;(
&amp;self,
id: <a class="struct" href="viewport/struct.ViewportId.html" title="struct egui::viewport::ViewportId">ViewportId</a>,
writer: 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.InputState.html" title="struct egui::InputState">InputState</a>) -&gt; R,
) -&gt; R</h4></section></summary><div class="docblock"><p>This will create a <code>InputState::default()</code> if there is no input state for that viewport</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.memory" class="method"><a class="src rightside" href="../src/egui/context.rs.html#938-940">Source</a><h4 class="code-header">pub fn <a href="#method.memory" class="fn">memory</a>&lt;R&gt;(&amp;self, reader: 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;<a class="struct" href="struct.Memory.html" title="struct egui::Memory">Memory</a>) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read-only access to <a href="struct.Memory.html" title="struct egui::Memory"><code>Memory</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.memory_mut" class="method"><a class="src rightside" href="../src/egui/context.rs.html#944-946">Source</a><h4 class="code-header">pub fn <a href="#method.memory_mut" class="fn">memory_mut</a>&lt;R&gt;(&amp;self, writer: 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.Memory.html" title="struct egui::Memory">Memory</a>) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read-write access to <a href="struct.Memory.html" title="struct egui::Memory"><code>Memory</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.data" class="method"><a class="src rightside" href="../src/egui/context.rs.html#950-952">Source</a><h4 class="code-header">pub fn <a href="#method.data" class="fn">data</a>&lt;R&gt;(&amp;self, reader: 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;<a class="struct" href="util/id_type_map/struct.IdTypeMap.html" title="struct egui::util::id_type_map::IdTypeMap">IdTypeMap</a>) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read-only access to <a href="util/id_type_map/struct.IdTypeMap.html" title="struct egui::util::id_type_map::IdTypeMap"><code>IdTypeMap</code></a>, which stores superficial widget state.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.data_mut" class="method"><a class="src rightside" href="../src/egui/context.rs.html#956-958">Source</a><h4 class="code-header">pub fn <a href="#method.data_mut" class="fn">data_mut</a>&lt;R&gt;(&amp;self, writer: 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="util/id_type_map/struct.IdTypeMap.html" title="struct egui::util::id_type_map::IdTypeMap">IdTypeMap</a>) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read-write access to <a href="util/id_type_map/struct.IdTypeMap.html" title="struct egui::util::id_type_map::IdTypeMap"><code>IdTypeMap</code></a>, which stores superficial widget state.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.graphics_mut" class="method"><a class="src rightside" href="../src/egui/context.rs.html#962-964">Source</a><h4 class="code-header">pub fn <a href="#method.graphics_mut" class="fn">graphics_mut</a>&lt;R&gt;(&amp;self, writer: 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="layers/struct.GraphicLayers.html" title="struct egui::layers::GraphicLayers">GraphicLayers</a>) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read-write access to <a href="layers/struct.GraphicLayers.html" title="struct egui::layers::GraphicLayers"><code>GraphicLayers</code></a>, where painted <a href="enum.Shape.html" title="enum egui::Shape"><code>crate::Shape</code></a>s are written to.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.graphics" class="method"><a class="src rightside" href="../src/egui/context.rs.html#968-970">Source</a><h4 class="code-header">pub fn <a href="#method.graphics" class="fn">graphics</a>&lt;R&gt;(&amp;self, reader: 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;<a class="struct" href="layers/struct.GraphicLayers.html" title="struct egui::layers::GraphicLayers">GraphicLayers</a>) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read-only access to <a href="layers/struct.GraphicLayers.html" title="struct egui::layers::GraphicLayers"><code>GraphicLayers</code></a>, where painted <a href="enum.Shape.html" title="enum egui::Shape"><code>crate::Shape</code></a>s are written to.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.output" class="method"><a class="src rightside" href="../src/egui/context.rs.html#981-983">Source</a><h4 class="code-header">pub fn <a href="#method.output" class="fn">output</a>&lt;R&gt;(&amp;self, reader: 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;<a class="struct" href="output/struct.PlatformOutput.html" title="struct egui::output::PlatformOutput">PlatformOutput</a>) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read-only access to <a href="output/struct.PlatformOutput.html" title="struct egui::output::PlatformOutput"><code>PlatformOutput</code></a>.</p>
<p>This is what egui outputs each pass and frame.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ctx.output_mut(|o| o.cursor_icon = egui::CursorIcon::Progress);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.output_mut" class="method"><a class="src rightside" href="../src/egui/context.rs.html#987-989">Source</a><h4 class="code-header">pub fn <a href="#method.output_mut" class="fn">output_mut</a>&lt;R&gt;(&amp;self, writer: 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="output/struct.PlatformOutput.html" title="struct egui::output::PlatformOutput">PlatformOutput</a>) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read-write access to <a href="output/struct.PlatformOutput.html" title="struct egui::output::PlatformOutput"><code>PlatformOutput</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.fonts" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1020-1029">Source</a><h4 class="code-header">pub fn <a href="#method.fonts" class="fn">fonts</a>&lt;R&gt;(&amp;self, reader: 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;<a class="struct" href="text/struct.Fonts.html" title="struct egui::text::Fonts">Fonts</a>) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read-only access to <a href="text/struct.Fonts.html" title="struct egui::text::Fonts"><code>Fonts</code></a>.</p>
<p>Not valid until first call to <a href="struct.Context.html#method.run" title="method egui::Context::run"><code>Context::run()</code></a>.
Thats because since we dont know the proper <code>pixels_per_point</code> until then.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.options" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1033-1035">Source</a><h4 class="code-header">pub fn <a href="#method.options" class="fn">options</a>&lt;R&gt;(&amp;self, reader: 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;<a class="struct" href="struct.Options.html" title="struct egui::Options">Options</a>) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read-only access to <a href="struct.Options.html" title="struct egui::Options"><code>Options</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.options_mut" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1039-1041">Source</a><h4 class="code-header">pub fn <a href="#method.options_mut" class="fn">options_mut</a>&lt;R&gt;(&amp;self, writer: 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.Options.html" title="struct egui::Options">Options</a>) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read-write access to <a href="struct.Options.html" title="struct egui::Options"><code>Options</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.tessellation_options" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1045-1047">Source</a><h4 class="code-header">pub fn <a href="#method.tessellation_options" class="fn">tessellation_options</a>&lt;R&gt;(
&amp;self,
reader: 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;<a class="struct" href="../epaint/tessellator/struct.TessellationOptions.html" title="struct epaint::tessellator::TessellationOptions">TessellationOptions</a>) -&gt; R,
) -&gt; R</h4></section></summary><div class="docblock"><p>Read-only access to <a href="../epaint/tessellator/struct.TessellationOptions.html" title="struct epaint::tessellator::TessellationOptions"><code>TessellationOptions</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.tessellation_options_mut" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1051-1056">Source</a><h4 class="code-header">pub fn <a href="#method.tessellation_options_mut" class="fn">tessellation_options_mut</a>&lt;R&gt;(
&amp;self,
writer: 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="../epaint/tessellator/struct.TessellationOptions.html" title="struct epaint::tessellator::TessellationOptions">TessellationOptions</a>) -&gt; R,
) -&gt; R</h4></section></summary><div class="docblock"><p>Read-write access to <a href="../epaint/tessellator/struct.TessellationOptions.html" title="struct epaint::tessellator::TessellationOptions"><code>TessellationOptions</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.check_for_id_clash" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1067-1138">Source</a><h4 class="code-header">pub fn <a href="#method.check_for_id_clash" class="fn">check_for_id_clash</a>(&amp;self, id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a>, new_rect: <a class="struct" href="struct.Rect.html" title="struct egui::Rect">Rect</a>, what: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>)</h4></section></summary><div class="docblock"><p>If the given <a href="struct.Id.html" title="struct egui::Id"><code>Id</code></a> has been used previously the same pass at different position,
then an error will be printed on screen.</p>
<p>This function is already called for all widgets that do any interaction,
but you can call this from widgets that store state but that does not interact.</p>
<p>The given <a href="struct.Rect.html" title="struct egui::Rect"><code>Rect</code></a> should be approximately where the widget will be.
The most important thing is that <a href="struct.Rect.html#structfield.min" title="field egui::Rect::min"><code>Rect::min</code></a> is approximately correct,
because thats where the warning will be painted. If you dont know what size to pick, just pick <a href="struct.Vec2.html#associatedconstant.ZERO" title="associated constant egui::Vec2::ZERO"><code>Vec2::ZERO</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.read_response" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1199-1210">Source</a><h4 class="code-header">pub fn <a href="#method.read_response" class="fn">read_response</a>(&amp;self, id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</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.Response.html" title="struct egui::Response">Response</a>&gt;</h4></section></summary><div class="docblock"><p>Read the response of some widget, which may be called <em>before</em> creating the widget (!).</p>
<p>This is because widget interaction happens at the start of the pass, using the widget rects from the previous pass.</p>
<p>If the widget was not visible the previous pass (or this pass), this will return <code>None</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.widget_contains_pointer" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1214-1217">Source</a><h4 class="code-header">pub fn <a href="#method.widget_contains_pointer" class="fn">widget_contains_pointer</a>(&amp;self, id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</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: Use Response.contains_pointer or Context::read_response instead</span></div></span></summary><div class="docblock"><p>Returns <code>true</code> if the widget with the given <code>Id</code> contains the pointer.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.register_widget_info" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1349-1361">Source</a><h4 class="code-header">pub fn <a href="#method.register_widget_info" class="fn">register_widget_info</a>(&amp;self, id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a>, 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>This is called by <a href="struct.Response.html#method.widget_info" title="method egui::Response::widget_info"><code>Response::widget_info</code></a>, but can also be called directly.</p>
<p>With some debug flags it will store the widget info in <a href="struct.WidgetRects.html" title="struct egui::WidgetRects"><code>crate::WidgetRects</code></a> for later display.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.layer_painter" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1364-1367">Source</a><h4 class="code-header">pub fn <a href="#method.layer_painter" class="fn">layer_painter</a>(&amp;self, layer_id: <a class="struct" href="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</a>) -&gt; <a class="struct" href="struct.Painter.html" title="struct egui::Painter">Painter</a></h4></section></summary><div class="docblock"><p>Get a full-screen painter for a new or existing layer</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.debug_painter" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1370-1372">Source</a><h4 class="code-header">pub fn <a href="#method.debug_painter" class="fn">debug_painter</a>(&amp;self) -&gt; <a class="struct" href="struct.Painter.html" title="struct egui::Painter">Painter</a></h4></section></summary><div class="docblock"><p>Paint on top of everything else</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.debug_text" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1388-1390">Source</a><h4 class="code-header">pub fn <a href="#method.debug_text" class="fn">debug_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>Print this text next to the cursor at the end of the pass.</p>
<p>If you call this multiple times, the text will be appended.</p>
<p>This only works if compiled with <code>debug_assertions</code>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ctx.debug_text(<span class="macro">format!</span>(<span class="string">"State: {state:?}"</span>));</code></pre></div>
<p>This is just a convenience for calling <a href="debug_text/fn.print.html" title="fn egui::debug_text::print"><code>crate::debug_text::print</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.os" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1399-1401">Source</a><h4 class="code-header">pub fn <a href="#method.os" class="fn">os</a>(&amp;self) -&gt; <a class="enum" href="os/enum.OperatingSystem.html" title="enum egui::os::OperatingSystem">OperatingSystem</a></h4></section></summary><div class="docblock"><p>What operating system are we running on?</p>
<p>When compiling natively, this is
figured out from the <code>target_os</code>.</p>
<p>For web, this can be figured out from the user-agent,
and is done so by <a href="https://github.com/emilk/egui/tree/master/crates/eframe"><code>eframe</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_os" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1407-1409">Source</a><h4 class="code-header">pub fn <a href="#method.set_os" class="fn">set_os</a>(&amp;self, os: <a class="enum" href="os/enum.OperatingSystem.html" title="enum egui::os::OperatingSystem">OperatingSystem</a>)</h4></section></summary><div class="docblock"><p>Set the operating system we are running on.</p>
<p>If you are writing wasm-based integration for egui you
may want to set this based on e.g. the user-agent.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_cursor_icon" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1418-1420">Source</a><h4 class="code-header">pub fn <a href="#method.set_cursor_icon" class="fn">set_cursor_icon</a>(&amp;self, cursor_icon: <a class="enum" href="output/enum.CursorIcon.html" title="enum egui::output::CursorIcon">CursorIcon</a>)</h4></section></summary><div class="docblock"><p>Set the cursor icon.</p>
<p>Equivalent to:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ctx.output_mut(|o| o.cursor_icon = egui::CursorIcon::PointingHand);</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.open_url" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1430-1432">Source</a><h4 class="code-header">pub fn <a href="#method.open_url" class="fn">open_url</a>(&amp;self, open_url: <a class="struct" href="output/struct.OpenUrl.html" title="struct egui::output::OpenUrl">OpenUrl</a>)</h4></section></summary><div class="docblock"><p>Open an URL in a browser.</p>
<p>Equivalent to:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ctx.output_mut(|o| o.open_url = <span class="prelude-val">Some</span>(open_url));</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.copy_text" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1447-1449">Source</a><h4 class="code-header">pub fn <a href="#method.copy_text" class="fn">copy_text</a>(&amp;self, text: <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>)</h4></section></summary><div class="docblock"><p>Copy the given text to the system clipboard.</p>
<p>Empty strings are ignored.</p>
<p>Note that in wasm applications, the clipboard is only accessible in secure contexts (e.g.,
HTTPS or localhost). If this method is used outside of a secure context, it will log an
error and do nothing. See <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts">https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts</a>.</p>
<p>Equivalent to:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ctx.output_mut(|o| o.copied_text = <span class="string">"Copy this"</span>.to_owned());</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.format_shortcut" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1454-1484">Source</a><h4 class="code-header">pub fn <a href="#method.format_shortcut" class="fn">format_shortcut</a>(&amp;self, shortcut: &amp;<a class="struct" href="struct.KeyboardShortcut.html" title="struct egui::KeyboardShortcut">KeyboardShortcut</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Format the given shortcut in a human-readable way (e.g. <code>Ctrl+Shift+X</code>).</p>
<p>Can be used to get the text for <a href="widgets/struct.Button.html#method.shortcut_text" title="method egui::widgets::Button::shortcut_text"><code>crate::Button::shortcut_text</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cumulative_pass_nr" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1489-1491">Source</a><h4 class="code-header">pub fn <a href="#method.cumulative_pass_nr" class="fn">cumulative_pass_nr</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u64.html">u64</a></h4></section></summary><div class="docblock"><p>The total number of completed passes (usually there is one pass per rendered frame).</p>
<p>Starts at zero, and is incremented for each completed pass inside of <a href="struct.Context.html#method.run" title="method egui::Context::run"><code>Self::run</code></a> (usually once).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cumulative_pass_nr_for" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1496-1502">Source</a><h4 class="code-header">pub fn <a href="#method.cumulative_pass_nr_for" class="fn">cumulative_pass_nr_for</a>(&amp;self, id: <a class="struct" href="viewport/struct.ViewportId.html" title="struct egui::viewport::ViewportId">ViewportId</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u64.html">u64</a></h4></section></summary><div class="docblock"><p>The total number of completed passes (usually there is one pass per rendered frame).</p>
<p>Starts at zero, and is incremented for each completed pass inside of <a href="struct.Context.html#method.run" title="method egui::Context::run"><code>Self::run</code></a> (usually once).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.request_repaint" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1517-1519">Source</a><h4 class="code-header">pub fn <a href="#method.request_repaint" class="fn">request_repaint</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Call this if there is need to repaint the UI, i.e. if you are showing an animation.</p>
<p>If this is called at least once in a frame, then there will be another frame right after this.
Call as many times as you wish, only one repaint will be issued.</p>
<p>To request repaint with a delay, use <a href="struct.Context.html#method.request_repaint_after" title="method egui::Context::request_repaint_after"><code>Self::request_repaint_after</code></a>.</p>
<p>If called from outside the UI thread, the UI thread will wake up and run,
provided the egui integration has set that up via <a href="struct.Context.html#method.set_request_repaint_callback" title="method egui::Context::set_request_repaint_callback"><code>Self::set_request_repaint_callback</code></a>
(this will work on <code>eframe</code>).</p>
<p>This will repaint the current viewport.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.request_repaint_of" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1534-1537">Source</a><h4 class="code-header">pub fn <a href="#method.request_repaint_of" class="fn">request_repaint_of</a>(&amp;self, id: <a class="struct" href="viewport/struct.ViewportId.html" title="struct egui::viewport::ViewportId">ViewportId</a>)</h4></section></summary><div class="docblock"><p>Call this if there is need to repaint the UI, i.e. if you are showing an animation.</p>
<p>If this is called at least once in a frame, then there will be another frame right after this.
Call as many times as you wish, only one repaint will be issued.</p>
<p>To request repaint with a delay, use <a href="struct.Context.html#method.request_repaint_after_for" title="method egui::Context::request_repaint_after_for"><code>Self::request_repaint_after_for</code></a>.</p>
<p>If called from outside the UI thread, the UI thread will wake up and run,
provided the egui integration has set that up via <a href="struct.Context.html#method.set_request_repaint_callback" title="method egui::Context::set_request_repaint_callback"><code>Self::set_request_repaint_callback</code></a>
(this will work on <code>eframe</code>).</p>
<p>This will repaint the specified viewport.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.request_repaint_after" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1568-1570">Source</a><h4 class="code-header">pub fn <a href="#method.request_repaint_after" class="fn">request_repaint_after</a>(&amp;self, duration: <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>)</h4></section></summary><div class="docblock"><p>Request repaint after at most the specified duration elapses.</p>
<p>The backend can chose to repaint sooner, for instance if some other code called
this method with a lower duration, or if new events arrived.</p>
<p>The function can be multiple times, but only the <em>smallest</em> duration will be considered.
So, if the function is called two times with <code>1 second</code> and <code>2 seconds</code>, egui will repaint
after <code>1 second</code></p>
<p>This is primarily useful for applications who would like to save battery by avoiding wasted
redraws when the app is not in focus. But sometimes the GUI of the app might become stale
and outdated if it is not updated for too long.</p>
<p>Lets say, something like a stopwatch widget that displays the time in seconds. You would waste
resources repainting multiple times within the same second (when you have no input),
just calculate the difference of duration between current time and next second change,
and call this function, to make sure that you are displaying the latest updated time, but
not wasting resources on needless repaints within the same second.</p>
<h6 id="quirk"><a class="doc-anchor" href="#quirk">§</a>Quirk:</h6>
<p>Duration begins at the next frame. Lets say for example that its a very inefficient app
and takes 500 milliseconds per frame at 2 fps. The widget / user might want a repaint in
next 500 milliseconds. Now, app takes 1000 ms per frame (1 fps) because the backend event
timeout takes 500 milliseconds AFTER the vsync swap buffer.
So, its not that we are requesting repaint within X duration. We are rather timing out
during app idle time where we are not receiving any new input events.</p>
<p>This repaints the current viewport.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.request_repaint_after_secs" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1576-1580">Source</a><h4 class="code-header">pub fn <a href="#method.request_repaint_after_secs" class="fn">request_repaint_after_secs</a>(&amp;self, seconds: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p>Repaint after this many seconds.</p>
<p>See <a href="struct.Context.html#method.request_repaint_after" title="method egui::Context::request_repaint_after"><code>Self::request_repaint_after</code></a> for details.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.request_repaint_after_for" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1611-1614">Source</a><h4 class="code-header">pub fn <a href="#method.request_repaint_after_for" class="fn">request_repaint_after_for</a>(&amp;self, duration: <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>, id: <a class="struct" href="viewport/struct.ViewportId.html" title="struct egui::viewport::ViewportId">ViewportId</a>)</h4></section></summary><div class="docblock"><p>Request repaint after at most the specified duration elapses.</p>
<p>The backend can chose to repaint sooner, for instance if some other code called
this method with a lower duration, or if new events arrived.</p>
<p>The function can be multiple times, but only the <em>smallest</em> duration will be considered.
So, if the function is called two times with <code>1 second</code> and <code>2 seconds</code>, egui will repaint
after <code>1 second</code></p>
<p>This is primarily useful for applications who would like to save battery by avoiding wasted
redraws when the app is not in focus. But sometimes the GUI of the app might become stale
and outdated if it is not updated for too long.</p>
<p>Lets say, something like a stopwatch widget that displays the time in seconds. You would waste
resources repainting multiple times within the same second (when you have no input),
just calculate the difference of duration between current time and next second change,
and call this function, to make sure that you are displaying the latest updated time, but
not wasting resources on needless repaints within the same second.</p>
<h6 id="quirk-1"><a class="doc-anchor" href="#quirk-1">§</a>Quirk:</h6>
<p>Duration begins at the next frame. Lets say for example that its a very inefficient app
and takes 500 milliseconds per frame at 2 fps. The widget / user might want a repaint in
next 500 milliseconds. Now, app takes 1000 ms per frame (1 fps) because the backend event
timeout takes 500 milliseconds AFTER the vsync swap buffer.
So, its not that we are requesting repaint within X duration. We are rather timing out
during app idle time where we are not receiving any new input events.</p>
<p>This repaints the specified viewport.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.requested_repaint_last_pass" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1618-1620">Source</a><h4 class="code-header">pub fn <a href="#method.requested_repaint_last_pass" class="fn">requested_repaint_last_pass</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 a repaint requested last pass for the current viewport?</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.requested_repaint_last_pass_for" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1624-1626">Source</a><h4 class="code-header">pub fn <a href="#method.requested_repaint_last_pass_for" class="fn">requested_repaint_last_pass_for</a>(&amp;self, viewport_id: &amp;<a class="struct" href="viewport/struct.ViewportId.html" title="struct egui::viewport::ViewportId">ViewportId</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>Was a repaint requested last pass for the given viewport?</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_requested_repaint" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1630-1632">Source</a><h4 class="code-header">pub fn <a href="#method.has_requested_repaint" class="fn">has_requested_repaint</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>Has a repaint been requested for the current viewport?</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_requested_repaint_for" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1636-1638">Source</a><h4 class="code-header">pub fn <a href="#method.has_requested_repaint_for" class="fn">has_requested_repaint_for</a>(&amp;self, viewport_id: &amp;<a class="struct" href="viewport/struct.ViewportId.html" title="struct egui::viewport::ViewportId">ViewportId</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>Has a repaint been requested for the given viewport?</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.repaint_causes" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1643-1650">Source</a><h4 class="code-header">pub fn <a href="#method.repaint_causes" class="fn">repaint_causes</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.RepaintCause.html" title="struct egui::RepaintCause">RepaintCause</a>&gt;</h4></section></summary><div class="docblock"><p>Why are we repainting?</p>
<p>This can be helpful in debugging why egui is constantly repainting.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_request_repaint_callback" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1657-1663">Source</a><h4 class="code-header">pub fn <a href="#method.set_request_repaint_callback" class="fn">set_request_repaint_callback</a>(
&amp;self,
callback: 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>(<a class="struct" href="struct.RequestRepaintInfo.html" title="struct egui::RequestRepaintInfo">RequestRepaintInfo</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> + 'static,
)</h4></section></summary><div class="docblock"><p>For integrations: this callback will be called when an egui user calls <a href="struct.Context.html#method.request_repaint" title="method egui::Context::request_repaint"><code>Self::request_repaint</code></a> or <a href="struct.Context.html#method.request_repaint_after" title="method egui::Context::request_repaint_after"><code>Self::request_repaint_after</code></a>.</p>
<p>This lets you wake up a sleeping UI thread.</p>
<p>Note that only one callback can be set. Any new call overrides the previous callback.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.request_discard" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1688-1701">Source</a><h4 class="code-header">pub fn <a href="#method.request_discard" class="fn">request_discard</a>(&amp;self, reason: 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="https://doc.rust-lang.org/1.84.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a>&lt;'static, <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>&gt;&gt;)</h4></section></summary><div class="docblock"><p>Request to discard the visual output of this pass,
and to immediately do another one.</p>
<p>This can be called to cover up visual glitches during a “sizing pass”.
For instance, when a <a href="struct.Grid.html" title="struct egui::Grid"><code>crate::Grid</code></a> is first shown we dont yet know the
width and heights of its columns and rows. egui will do a best guess,
but it will likely be wrong. Next pass it can read the sizes from the previous
pass, and from there on the widths will be stable.
This means the first pass will look glitchy, and ideally should not be shown to the user.
So <a href="struct.Grid.html" title="struct egui::Grid"><code>crate::Grid</code></a> calls <a href="struct.Context.html#method.request_discard" title="method egui::Context::request_discard"><code>Self::request_discard</code></a> to cover up this glitches.</p>
<p>There is a limit to how many passes egui will perform, set by <a href="struct.Options.html#structfield.max_passes" title="field egui::Options::max_passes"><code>Options::max_passes</code></a>.
Therefore, the request might be declined.</p>
<p>You can check if the current pass will be discarded with <a href="struct.Context.html#method.will_discard" title="method egui::Context::will_discard"><code>Self::will_discard</code></a>.</p>
<p>You should be very conservative with when you call <a href="struct.Context.html#method.request_discard" title="method egui::Context::request_discard"><code>Self::request_discard</code></a>,
as it will cause an extra ui pass, potentially leading to extra CPU use and frame judder.</p>
<p>The given reason should be a human-readable string that explains why <code>request_discard</code>
was called. This will be shown in certain debug situations, to help you figure out
why a pass was discarded.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.will_discard" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1708-1715">Source</a><h4 class="code-header">pub fn <a href="#method.will_discard" class="fn">will_discard</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>Will the visual output of this pass be discarded?</p>
<p>If true, you can early-out from expensive graphics operations.</p>
<p>See <a href="struct.Context.html#method.request_discard" title="method egui::Context::request_discard"><code>Self::request_discard</code></a> for more.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-2" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#1719-1743">Source</a><a href="#impl-Context-2" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="docblock"><p>Callbacks</p>
</div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.on_begin_pass" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1724-1730">Source</a><h4 class="code-header">pub fn <a href="#method.on_begin_pass" class="fn">on_begin_pass</a>(
&amp;self,
debug_name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>,
cb: <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;dyn <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>(&amp;<a class="struct" href="struct.Context.html" title="struct egui::Context">Context</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;,
)</h4></section></summary><div class="docblock"><p>Call the given callback at the start of each pass of each viewport.</p>
<p>This can be used for egui <em>plugins</em>.
See <a href="debug_text/index.html" title="mod egui::debug_text"><code>crate::debug_text</code></a> for an example.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.on_end_pass" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1736-1742">Source</a><h4 class="code-header">pub fn <a href="#method.on_end_pass" class="fn">on_end_pass</a>(
&amp;self,
debug_name: &amp;'static <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>,
cb: <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;dyn <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>(&amp;<a class="struct" href="struct.Context.html" title="struct egui::Context">Context</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;,
)</h4></section></summary><div class="docblock"><p>Call the given callback at the end of each pass of each viewport.</p>
<p>This can be used for egui <em>plugins</em>.
See <a href="debug_text/index.html" title="mod egui::debug_text"><code>crate::debug_text</code></a> for an example.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-3" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#1745-2140">Source</a><a href="#impl-Context-3" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.set_fonts" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1753-1772">Source</a><h4 class="code-header">pub fn <a href="#method.set_fonts" class="fn">set_fonts</a>(&amp;self, font_definitions: <a class="struct" href="struct.FontDefinitions.html" title="struct egui::FontDefinitions">FontDefinitions</a>)</h4></section></summary><div class="docblock"><p>Tell <code>egui</code> which fonts to use.</p>
<p>The default <code>egui</code> fonts only support latin and cyrillic alphabets,
but you can call this to install additional fonts that support e.g. korean characters.</p>
<p>The new fonts will become active at the start of the next pass.
This will overwrite the existing fonts.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_font" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1781-1805">Source</a><h4 class="code-header">pub fn <a href="#method.add_font" class="fn">add_font</a>(&amp;self, new_font: <a class="struct" href="../epaint/text/fonts/struct.FontInsert.html" title="struct epaint::text::fonts::FontInsert">FontInsert</a>)</h4></section></summary><div class="docblock"><p>Tell <code>egui</code> which fonts to use.</p>
<p>The default <code>egui</code> fonts only support latin and cyrillic alphabets,
but you can call this to install additional fonts that support e.g. korean characters.</p>
<p>The new font will become active at the start of the next pass.
This will keep the existing fonts.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.system_theme" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1809-1811">Source</a><h4 class="code-header">pub fn <a href="#method.system_theme" class="fn">system_theme</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="enum" href="enum.Theme.html" title="enum egui::Theme">Theme</a>&gt;</h4></section></summary><div class="docblock"><p>Does the OS use dark or light mode?
This is used when the theme preference is set to <a href="enum.ThemePreference.html#variant.System" title="variant egui::ThemePreference::System"><code>crate::ThemePreference::System</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.theme" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1815-1817">Source</a><h4 class="code-header">pub fn <a href="#method.theme" class="fn">theme</a>(&amp;self) -&gt; <a class="enum" href="enum.Theme.html" title="enum egui::Theme">Theme</a></h4></section></summary><div class="docblock"><p>The <a href="enum.Theme.html" title="enum egui::Theme"><code>Theme</code></a> used to select the appropriate <a href="style/struct.Style.html" title="struct egui::style::Style"><code>Style</code></a> (dark or light)
used by all subsequent windows, panels etc.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_theme" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1827-1829">Source</a><h4 class="code-header">pub fn <a href="#method.set_theme" class="fn">set_theme</a>(&amp;self, theme_preference: 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="enum.ThemePreference.html" title="enum egui::ThemePreference">ThemePreference</a>&gt;)</h4></section></summary><div class="docblock"><p>The <a href="enum.Theme.html" title="enum egui::Theme"><code>Theme</code></a> used to select between dark and light <a href="struct.Context.html#method.style" title="method egui::Context::style"><code>Self::style</code></a>
as the active style used by all subsequent windows, panels etc.</p>
<p>Example:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ctx.set_theme(egui::Theme::Light); <span class="comment">// Switch to light mode</span></code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.style" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1832-1834">Source</a><h4 class="code-header">pub fn <a href="#method.style" class="fn">style</a>(&amp;self) -&gt; <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;<a class="struct" href="style/struct.Style.html" title="struct egui::style::Style">Style</a>&gt;</h4></section></summary><div class="docblock"><p>The currently active <a href="style/struct.Style.html" title="struct egui::style::Style"><code>Style</code></a> used by all subsequent windows, panels etc.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.style_mut" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1846-1848">Source</a><h4 class="code-header">pub fn <a href="#method.style_mut" class="fn">style_mut</a>(&amp;self, mutate_style: 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="style/struct.Style.html" title="struct egui::style::Style">Style</a>))</h4></section></summary><div class="docblock"><p>Mutate the currently active <a href="style/struct.Style.html" title="struct egui::style::Style"><code>Style</code></a> used by all subsequent windows, panels etc.
Use <a href="struct.Context.html#method.all_styles_mut" title="method egui::Context::all_styles_mut"><code>Self::all_styles_mut</code></a> to mutate both dark and light mode styles.</p>
<p>Example:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ctx.style_mut(|style| {
style.spacing.item_spacing = egui::vec2(<span class="number">10.0</span>, <span class="number">20.0</span>);
});</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_style" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1857-1859">Source</a><h4 class="code-header">pub fn <a href="#method.set_style" class="fn">set_style</a>(&amp;self, style: 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="struct" href="https://doc.rust-lang.org/1.84.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;<a class="struct" href="style/struct.Style.html" title="struct egui::style::Style">Style</a>&gt;&gt;)</h4></section></summary><div class="docblock"><p>The currently active <a href="style/struct.Style.html" title="struct egui::style::Style"><code>Style</code></a> used by all new windows, panels etc.</p>
<p>Use <a href="struct.Context.html#method.all_styles_mut" title="method egui::Context::all_styles_mut"><code>Self::all_styles_mut</code></a> to mutate both dark and light mode styles.</p>
<p>You can also change this using <a href="struct.Context.html#method.style_mut" title="method egui::Context::style_mut"><code>Self::style_mut</code></a>.</p>
<p>You can use <a href="struct.Ui.html#method.style_mut" title="method egui::Ui::style_mut"><code>Ui::style_mut</code></a> to change the style of a single <a href="struct.Ui.html" title="struct egui::Ui"><code>Ui</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.all_styles_mut" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1870-1875">Source</a><h4 class="code-header">pub fn <a href="#method.all_styles_mut" class="fn">all_styles_mut</a>(&amp;self, mutate_style: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;mut <a class="struct" href="style/struct.Style.html" title="struct egui::style::Style">Style</a>))</h4></section></summary><div class="docblock"><p>Mutate the <a href="style/struct.Style.html" title="struct egui::style::Style"><code>Style</code></a>s used by all subsequent windows, panels etc. in both dark and light mode.</p>
<p>Example:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ctx.all_styles_mut(|style| {
style.spacing.item_spacing = egui::vec2(<span class="number">10.0</span>, <span class="number">20.0</span>);
});</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.style_of" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1878-1883">Source</a><h4 class="code-header">pub fn <a href="#method.style_of" class="fn">style_of</a>(&amp;self, theme: <a class="enum" href="enum.Theme.html" title="enum egui::Theme">Theme</a>) -&gt; <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;<a class="struct" href="style/struct.Style.html" title="struct egui::style::Style">Style</a>&gt;</h4></section></summary><div class="docblock"><p>The <a href="style/struct.Style.html" title="struct egui::style::Style"><code>Style</code></a> used by all subsequent windows, panels etc.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.style_mut_of" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1894-1899">Source</a><h4 class="code-header">pub fn <a href="#method.style_mut_of" class="fn">style_mut_of</a>(&amp;self, theme: <a class="enum" href="enum.Theme.html" title="enum egui::Theme">Theme</a>, mutate_style: 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="style/struct.Style.html" title="struct egui::style::Style">Style</a>))</h4></section></summary><div class="docblock"><p>Mutate the <a href="style/struct.Style.html" title="struct egui::style::Style"><code>Style</code></a> used by all subsequent windows, panels etc.</p>
<p>Example:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ctx.style_mut_of(egui::Theme::Dark, |style| {
style.spacing.item_spacing = egui::vec2(<span class="number">10.0</span>, <span class="number">20.0</span>);
});</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_style_of" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1907-1913">Source</a><h4 class="code-header">pub fn <a href="#method.set_style_of" class="fn">set_style_of</a>(&amp;self, theme: <a class="enum" href="enum.Theme.html" title="enum egui::Theme">Theme</a>, style: 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="struct" href="https://doc.rust-lang.org/1.84.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;<a class="struct" href="style/struct.Style.html" title="struct egui::style::Style">Style</a>&gt;&gt;)</h4></section></summary><div class="docblock"><p>The <a href="style/struct.Style.html" title="struct egui::style::Style"><code>Style</code></a> used by all new windows, panels etc.
Use <a href="struct.Context.html#method.set_theme" title="method egui::Context::set_theme"><code>Self::set_theme</code></a> to choose between dark and light mode.</p>
<p>You can also change this using <a href="struct.Context.html#method.style_mut_of" title="method egui::Context::style_mut_of"><code>Self::style_mut_of</code></a>.</p>
<p>You can use <a href="struct.Ui.html#method.style_mut" title="method egui::Ui::style_mut"><code>Ui::style_mut</code></a> to change the style of a single <a href="struct.Ui.html" title="struct egui::Ui"><code>Ui</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_visuals_of" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1924-1926">Source</a><h4 class="code-header">pub fn <a href="#method.set_visuals_of" class="fn">set_visuals_of</a>(&amp;self, theme: <a class="enum" href="enum.Theme.html" title="enum egui::Theme">Theme</a>, visuals: <a class="struct" href="style/struct.Visuals.html" title="struct egui::style::Visuals">Visuals</a>)</h4></section></summary><div class="docblock"><p>The <a href="style/struct.Visuals.html" title="struct egui::style::Visuals"><code>crate::Visuals</code></a> used by all subsequent windows, panels etc.</p>
<p>You can also use <a href="struct.Ui.html#method.visuals_mut" title="method egui::Ui::visuals_mut"><code>Ui::visuals_mut</code></a> to change the visuals of a single <a href="struct.Ui.html" title="struct egui::Ui"><code>Ui</code></a>.</p>
<p>Example:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ctx.set_visuals_of(egui::Theme::Dark, egui::Visuals { panel_fill: egui::Color32::RED, ..Default::default() });</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_visuals" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1937-1939">Source</a><h4 class="code-header">pub fn <a href="#method.set_visuals" class="fn">set_visuals</a>(&amp;self, visuals: <a class="struct" href="style/struct.Visuals.html" title="struct egui::style::Visuals">Visuals</a>)</h4></section></summary><div class="docblock"><p>The <a href="style/struct.Visuals.html" title="struct egui::style::Visuals"><code>crate::Visuals</code></a> used by all subsequent windows, panels etc.</p>
<p>You can also use <a href="struct.Ui.html#method.visuals_mut" title="method egui::Ui::visuals_mut"><code>Ui::visuals_mut</code></a> to change the visuals of a single <a href="struct.Ui.html" title="struct egui::Ui"><code>Ui</code></a>.</p>
<p>Example:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>ctx.set_visuals(egui::Visuals { panel_fill: egui::Color32::RED, ..Default::default() });</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.pixels_per_point" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1945-1947">Source</a><h4 class="code-header">pub fn <a href="#method.pixels_per_point" class="fn">pixels_per_point</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>The number of physical pixels for each logical point.</p>
<p>This is calculated as <a href="struct.Context.html#method.zoom_factor" title="method egui::Context::zoom_factor"><code>Self::zoom_factor</code></a> * <a href="struct.Context.html#method.native_pixels_per_point" title="method egui::Context::native_pixels_per_point"><code>Self::native_pixels_per_point</code></a></p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_pixels_per_point" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1953-1957">Source</a><h4 class="code-header">pub fn <a href="#method.set_pixels_per_point" class="fn">set_pixels_per_point</a>(&amp;self, pixels_per_point: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p>Set the number of physical pixels for each logical point.
Will become active at the start of the next pass.</p>
<p>This will actually translate to a call to <a href="struct.Context.html#method.set_zoom_factor" title="method egui::Context::set_zoom_factor"><code>Self::set_zoom_factor</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.native_pixels_per_point" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1964-1966">Source</a><h4 class="code-header">pub fn <a href="#method.native_pixels_per_point" class="fn">native_pixels_per_point</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="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;</h4></section></summary><div class="docblock"><p>The number of physical pixels for each logical point on this monitor.</p>
<p>This is given as input to egui via <a href="struct.ViewportInfo.html#structfield.native_pixels_per_point" title="field egui::ViewportInfo::native_pixels_per_point"><code>crate::ViewportInfo::native_pixels_per_point</code></a>
and cannot be changed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.zoom_factor" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1976-1978">Source</a><h4 class="code-header">pub fn <a href="#method.zoom_factor" class="fn">zoom_factor</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>Global zoom factor of the UI.</p>
<p>This is used to calculate the <code>pixels_per_point</code>
for the UI as <code>pixels_per_point = zoom_factor * native_pixels_per_point</code>.</p>
<p>The default is 1.0.
Make larger to make everything larger.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_zoom_factor" class="method"><a class="src rightside" href="../src/egui/context.rs.html#1994-2004">Source</a><h4 class="code-header">pub fn <a href="#method.set_zoom_factor" class="fn">set_zoom_factor</a>(&amp;self, zoom_factor: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>)</h4></section></summary><div class="docblock"><p>Sets zoom factor of the UI.
Will become active at the start of the next pass.</p>
<p>Note that calling this will not update <a href="struct.Context.html#method.zoom_factor" title="method egui::Context::zoom_factor"><code>Self::zoom_factor</code></a> until the end of the pass.</p>
<p>This is used to calculate the <code>pixels_per_point</code>
for the UI as <code>pixels_per_point = zoom_fator * native_pixels_per_point</code>.</p>
<p>The default is 1.0.
Make larger to make everything larger.</p>
<p>It is better to call this than modifying
<a href="struct.Options.html#structfield.zoom_factor" title="field egui::Options::zoom_factor"><code>Options::zoom_factor</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.load_texture" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2090-2110">Source</a><h4 class="code-header">pub fn <a href="#method.load_texture" class="fn">load_texture</a>(
&amp;self,
name: 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="struct" href="https://doc.rust-lang.org/1.84.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;,
image: 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="enum.ImageData.html" title="enum egui::ImageData">ImageData</a>&gt;,
options: <a class="struct" href="struct.TextureOptions.html" title="struct egui::TextureOptions">TextureOptions</a>,
) -&gt; <a class="struct" href="struct.TextureHandle.html" title="struct egui::TextureHandle">TextureHandle</a></h4></section></summary><div class="docblock"><p>Allocate a texture.</p>
<p>This is for advanced users.
Most users should use <a href="struct.Ui.html#method.image" title="method egui::Ui::image"><code>crate::Ui::image</code></a> or <a href="struct.Context.html#method.try_load_texture" title="method egui::Context::try_load_texture"><code>Self::try_load_texture</code></a>
instead.</p>
<p>In order to display an image you must convert it to a texture using this function.
The function will hand over the image data to the egui backend, which will
upload it to the GPU.</p>
<p>⚠️ Make sure to only call this ONCE for each image, i.e. NOT in your main GUI code.
The call is NOT immediate safe.</p>
<p>The given name can be useful for later debugging, and will be visible if you call <a href="struct.Context.html#method.texture_ui" title="method egui::Context::texture_ui"><code>Self::texture_ui</code></a>.</p>
<p>For how to load an image, see <a href="enum.ImageData.html" title="enum egui::ImageData"><code>crate::ImageData</code></a> and <a href="struct.ColorImage.html#method.from_rgba_unmultiplied" title="associated function egui::ColorImage::from_rgba_unmultiplied"><code>crate::ColorImage::from_rgba_unmultiplied</code></a>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">struct </span>MyImage {
texture: <span class="prelude-ty">Option</span>&lt;egui::TextureHandle&gt;,
}
<span class="kw">impl </span>MyImage {
<span class="kw">fn </span>ui(<span class="kw-2">&amp;mut </span><span class="self">self</span>, ui: <span class="kw-2">&amp;mut </span>egui::Ui) {
<span class="kw">let </span>texture: <span class="kw-2">&amp;</span>egui::TextureHandle = <span class="self">self</span>.texture.get_or_insert_with(|| {
<span class="comment">// Load the texture only once.
</span>ui.ctx().load_texture(
<span class="string">"my-image"</span>,
egui::ColorImage::example(),
Default::default()
)
});
<span class="comment">// Show the image:
</span>ui.image((texture.id(), texture.size_vec2()));
}
}</code></pre></div>
<p>See also <a href="enum.ImageData.html" title="enum egui::ImageData"><code>crate::ImageData</code></a>, <a href="struct.Ui.html#method.image" title="method egui::Ui::image"><code>crate::Ui::image</code></a> and <a href="widgets/struct.Image.html" title="struct egui::widgets::Image"><code>crate::Image</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.tex_manager" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2117-2119">Source</a><h4 class="code-header">pub fn <a href="#method.tex_manager" class="fn">tex_manager</a>(&amp;self) -&gt; <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;<a class="struct" href="mutex/struct.RwLock.html" title="struct egui::mutex::RwLock">RwLock</a>&lt;<a class="struct" href="../epaint/textures/struct.TextureManager.html" title="struct epaint::textures::TextureManager">TextureManager</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Low-level texture manager.</p>
<p>In general it is easier to use <a href="struct.Context.html#method.load_texture" title="method egui::Context::load_texture"><code>Self::load_texture</code></a> and <a href="struct.TextureHandle.html" title="struct egui::TextureHandle"><code>TextureHandle</code></a>.</p>
<p>You can show stats about the allocated textures using <a href="struct.Context.html#method.texture_ui" title="method egui::Context::texture_ui"><code>Self::texture_ui</code></a>.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-4" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#2142-2311">Source</a><a href="#impl-Context-4" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.end_pass" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2145-2159">Source</a><h4 class="code-header">pub fn <a href="#method.end_pass" class="fn">end_pass</a>(&amp;self) -&gt; <a class="struct" href="output/struct.FullOutput.html" title="struct egui::output::FullOutput">FullOutput</a></h4></section></summary><div class="docblock"><p>Call at the end of each frame if you called <a href="struct.Context.html#method.begin_pass" title="method egui::Context::begin_pass"><code>Context::begin_pass</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.end_frame" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2164-2166">Source</a><h4 class="code-header">pub fn <a href="#method.end_frame" class="fn">end_frame</a>(&amp;self) -&gt; <a class="struct" href="output/struct.FullOutput.html" title="struct egui::output::FullOutput">FullOutput</a></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: Renamed end_pass</span></div></span></summary><div class="docblock"><p>Call at the end of each frame if you called <a href="struct.Context.html#method.begin_pass" title="method egui::Context::begin_pass"><code>Context::begin_pass</code></a>.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-5" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#2515-2660">Source</a><a href="#impl-Context-5" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.tessellate" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2521-2565">Source</a><h4 class="code-header">pub fn <a href="#method.tessellate" class="fn">tessellate</a>(
&amp;self,
shapes: <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../epaint/struct.ClippedShape.html" title="struct epaint::ClippedShape">ClippedShape</a>&gt;,
pixels_per_point: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>,
) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.ClippedPrimitive.html" title="struct egui::ClippedPrimitive">ClippedPrimitive</a>&gt;</h4></section></summary><div class="docblock"><p>Tessellate the given shapes into triangle meshes.</p>
<p><code>pixels_per_point</code> is used for feathering (anti-aliasing).
For this you can use <a href="output/struct.FullOutput.html#structfield.pixels_per_point" title="field egui::output::FullOutput::pixels_per_point"><code>FullOutput::pixels_per_point</code></a>, <a href="struct.Context.html#method.pixels_per_point" title="method egui::Context::pixels_per_point"><code>Self::pixels_per_point</code></a>,
or whatever is appropriate for your viewport.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.screen_rect" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2570-2572">Source</a><h4 class="code-header">pub fn <a href="#method.screen_rect" class="fn">screen_rect</a>(&amp;self) -&gt; <a class="struct" href="struct.Rect.html" title="struct egui::Rect">Rect</a></h4></section></summary><div class="docblock"><p>Position and size of the egui area.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.available_rect" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2578-2580">Source</a><h4 class="code-header">pub fn <a href="#method.available_rect" class="fn">available_rect</a>(&amp;self) -&gt; <a class="struct" href="struct.Rect.html" title="struct egui::Rect">Rect</a></h4></section></summary><div class="docblock"><p>How much space is still available after panels has been added.</p>
<p>This is the “background” area, what egui doesnt cover with panels (but may cover with windows).
This is also the area to which windows are constrained.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.used_rect" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2583-2591">Source</a><h4 class="code-header">pub fn <a href="#method.used_rect" class="fn">used_rect</a>(&amp;self) -&gt; <a class="struct" href="struct.Rect.html" title="struct egui::Rect">Rect</a></h4></section></summary><div class="docblock"><p>How much space is used by panels and windows.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.used_size" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2596-2598">Source</a><h4 class="code-header">pub fn <a href="#method.used_size" class="fn">used_size</a>(&amp;self) -&gt; <a class="struct" href="struct.Vec2.html" title="struct egui::Vec2">Vec2</a></h4></section></summary><div class="docblock"><p>How much space is used by panels and windows.</p>
<p>You can shrink your egui area to this size and still fit all egui components.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_pointer_over_area" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2603-2618">Source</a><h4 class="code-header">pub fn <a href="#method.is_pointer_over_area" class="fn">is_pointer_over_area</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 (mouse/touch) over any egui area?</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.wants_pointer_input" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2626-2629">Source</a><h4 class="code-header">pub fn <a href="#method.wants_pointer_input" class="fn">wants_pointer_input</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 egui is currently interested in the pointer (mouse or touch).</p>
<p>Could be the pointer is hovering over a <a href="containers/struct.Window.html" title="struct egui::containers::Window"><code>crate::Window</code></a> or the user is dragging a widget.
If <code>false</code>, the pointer is outside of any egui area and so
you may be interested in what it is doing (e.g. controlling your game).
Returns <code>false</code> if a drag started outside of egui and then moved over an egui area.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_using_pointer" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2634-2636">Source</a><h4 class="code-header">pub fn <a href="#method.is_using_pointer" class="fn">is_using_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>Is egui currently using the pointer position (e.g. dragging a slider)?</p>
<p>NOTE: this will return <code>false</code> if the pointer is just hovering over an egui area.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.wants_keyboard_input" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2639-2641">Source</a><h4 class="code-header">pub fn <a href="#method.wants_keyboard_input" class="fn">wants_keyboard_input</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>If <code>true</code>, egui is currently listening on text input (e.g. typing text in a <a href="widgets/text_edit/struct.TextEdit.html" title="struct egui::widgets::text_edit::TextEdit"><code>crate::TextEdit</code></a>).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.highlight_widget" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2649-2651">Source</a><h4 class="code-header">pub fn <a href="#method.highlight_widget" class="fn">highlight_widget</a>(&amp;self, id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a>)</h4></section></summary><div class="docblock"><p>Highlight this widget, to make it look like it is hovered, even if it isnt.</p>
<p>If you call this after the widget has been fully rendered,
then it wont be highlighted until the next ui pass.</p>
<p>See also <a href="struct.Response.html#method.highlight" title="method egui::Response::highlight"><code>Response::highlight</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_context_menu_open" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2654-2659">Source</a><h4 class="code-header">pub fn <a href="#method.is_context_menu_open" class="fn">is_context_menu_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>Is an egui context menu open?</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-6" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#2663-2692">Source</a><a href="#impl-Context-6" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.pointer_latest_pos" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2668-2670">Source</a><h4 class="code-header">pub fn <a href="#method.pointer_latest_pos" class="fn">pointer_latest_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>Latest reported pointer position.</p>
<p>When tapping a touch screen, this will be <code>None</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.pointer_hover_pos" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2674-2676">Source</a><h4 class="code-header">pub fn <a href="#method.pointer_hover_pos" class="fn">pointer_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>
</div></details><details class="toggle method-toggle" open><summary><section id="method.pointer_interact_pos" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2684-2686">Source</a><h4 class="code-header">pub fn <a href="#method.pointer_interact_pos" class="fn">pointer_interact_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 you detect a click or drag and wants to know where it happened, use this.</p>
<p>Latest position of the mouse, but ignoring any <a href="enum.Event.html#variant.PointerGone" title="variant egui::Event::PointerGone"><code>crate::Event::PointerGone</code></a>
if there were interactions this pass.
When tapping a touch screen, this will be the location of the touch.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.multi_touch" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2689-2691">Source</a><h4 class="code-header">pub fn <a href="#method.multi_touch" class="fn">multi_touch</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.MultiTouchInfo.html" title="struct egui::MultiTouchInfo">MultiTouchInfo</a>&gt;</h4></section></summary><div class="docblock"><p>Calls <a href="struct.InputState.html#method.multi_touch" title="method egui::InputState::multi_touch"><code>InputState::multi_touch</code></a>.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-7" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#2694-2832">Source</a><a href="#impl-Context-7" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.set_transform_layer" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2705-2713">Source</a><h4 class="code-header">pub fn <a href="#method.set_transform_layer" class="fn">set_transform_layer</a>(&amp;self, layer_id: <a class="struct" href="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</a>, transform: <a class="struct" href="../emath/ts_transform/struct.TSTransform.html" title="struct emath::ts_transform::TSTransform">TSTransform</a>)</h4></section></summary><div class="docblock"><p>Transform the graphics of the given layer.</p>
<p>This will also affect input.
The direction of the given transform is “into the global coordinate system”.</p>
<p>This is a sticky setting, remembered from one frame to the next.</p>
<p>Can be used to implement pan and zoom (see relevant demo).</p>
<p>For a temporary transform, use <a href="struct.Context.html#method.transform_layer_shapes" title="method egui::Context::transform_layer_shapes"><code>Self::transform_layer_shapes</code></a> instead.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.layer_transform_to_global" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2718-2720">Source</a><h4 class="code-header">pub fn <a href="#method.layer_transform_to_global" class="fn">layer_transform_to_global</a>(
&amp;self,
layer_id: <a class="struct" href="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</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="../emath/ts_transform/struct.TSTransform.html" title="struct emath::ts_transform::TSTransform">TSTransform</a>&gt;</h4></section></summary><div class="docblock"><p>Return how to transform the graphics of the given layer into the global coordinate system.</p>
<p>Set this with <a href="struct.Context.html#method.layer_transform_to_global" title="method egui::Context::layer_transform_to_global"><code>Self::layer_transform_to_global</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.layer_transform_from_global" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2725-2728">Source</a><h4 class="code-header">pub fn <a href="#method.layer_transform_from_global" class="fn">layer_transform_from_global</a>(
&amp;self,
layer_id: <a class="struct" href="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</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="../emath/ts_transform/struct.TSTransform.html" title="struct emath::ts_transform::TSTransform">TSTransform</a>&gt;</h4></section></summary><div class="docblock"><p>Return how to transform the graphics of the global coordinate system into the local coordinate system of the given layer.</p>
<p>This returns the inverse of <a href="struct.Context.html#method.layer_transform_to_global" title="method egui::Context::layer_transform_to_global"><code>Self::layer_transform_to_global</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.translate_layer" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2738-2743">Source</a><h4 class="code-header">pub fn <a href="#method.translate_layer" class="fn">translate_layer</a>(&amp;self, layer_id: <a class="struct" href="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</a>, delta: <a class="struct" href="struct.Vec2.html" title="struct egui::Vec2">Vec2</a>)</h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: Use <code>transform_layer_shapes</code> instead</span></div></span></summary><div class="docblock"><p>Move all the graphics at the given layer.</p>
<p>Is used to implement drag-and-drop preview.</p>
<p>This only applied to the existing graphics at the layer, not to new graphics added later.</p>
<p>For a persistent transform, use <a href="struct.Context.html#method.set_transform_layer" title="method egui::Context::set_transform_layer"><code>Self::set_transform_layer</code></a> instead.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.transform_layer_shapes" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2752-2756">Source</a><h4 class="code-header">pub fn <a href="#method.transform_layer_shapes" class="fn">transform_layer_shapes</a>(&amp;self, layer_id: <a class="struct" href="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</a>, transform: <a class="struct" href="../emath/ts_transform/struct.TSTransform.html" title="struct emath::ts_transform::TSTransform">TSTransform</a>)</h4></section></summary><div class="docblock"><p>Transform all the graphics at the given layer.</p>
<p>Is used to implement drag-and-drop preview.</p>
<p>This only applied to the existing graphics at the layer, not to new graphics added later.</p>
<p>For a persistent transform, use <a href="struct.Context.html#method.set_transform_layer" title="method egui::Context::set_transform_layer"><code>Self::set_transform_layer</code></a> instead.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.layer_id_at" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2759-2761">Source</a><h4 class="code-header">pub fn <a href="#method.layer_id_at" class="fn">layer_id_at</a>(&amp;self, pos: <a class="struct" href="struct.Pos2.html" title="struct egui::Pos2">Pos2</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="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</a>&gt;</h4></section></summary><div class="docblock"><p>Top-most layer at the given position.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.move_to_top" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2766-2768">Source</a><h4 class="code-header">pub fn <a href="#method.move_to_top" class="fn">move_to_top</a>(&amp;self, layer_id: <a class="struct" href="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</a>)</h4></section></summary><div class="docblock"><p>Moves the given area to the top in its <a href="layers/enum.Order.html" title="enum egui::layers::Order"><code>Order</code></a>.</p>
<p><a href="containers/struct.Area.html" title="struct egui::containers::Area"><code>crate::Area</code></a>:s and <a href="containers/struct.Window.html" title="struct egui::containers::Window"><code>crate::Window</code></a>:s also do this automatically when being clicked on or interacted with.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_sublayer" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2777-2779">Source</a><h4 class="code-header">pub fn <a href="#method.set_sublayer" class="fn">set_sublayer</a>(&amp;self, parent: <a class="struct" href="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</a>, child: <a class="struct" href="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</a>)</h4></section></summary><div class="docblock"><p>Mark the <code>child</code> layer as a sublayer of <code>parent</code>.</p>
<p>Sublayers are moved directly above the parent layer at the end of the frame. This is mainly
intended for adding a new <a href="containers/struct.Area.html" title="struct egui::containers::Area"><code>crate::Area</code></a> inside a <a href="containers/struct.Window.html" title="struct egui::containers::Window"><code>crate::Window</code></a>.</p>
<p>This currently only supports one level of nesting. If <code>parent</code> is a sublayer of another
layer, the behavior is unspecified.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.top_layer_id" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2782-2784">Source</a><h4 class="code-header">pub fn <a href="#method.top_layer_id" class="fn">top_layer_id</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="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</a>&gt;</h4></section></summary><div class="docblock"><p>Retrieve the <a href="layers/struct.LayerId.html" title="struct egui::layers::LayerId"><code>LayerId</code></a> of the top level windows.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.rect_contains_pointer" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2793-2817">Source</a><h4 class="code-header">pub fn <a href="#method.rect_contains_pointer" class="fn">rect_contains_pointer</a>(&amp;self, layer_id: <a class="struct" href="layers/struct.LayerId.html" title="struct egui::layers::LayerId">LayerId</a>, rect: <a class="struct" href="struct.Rect.html" title="struct egui::Rect">Rect</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>Does the given rectangle contain the mouse pointer?</p>
<p>Will return false if some other area is covering the given layer.</p>
<p>The given rectangle is assumed to have been clipped by its parent clip rect.</p>
<p>See also <a href="struct.Response.html#method.contains_pointer" title="method egui::Response::contains_pointer"><code>Response::contains_pointer</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.debug_on_hover" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2823-2825">Source</a><h4 class="code-header">pub fn <a href="#method.debug_on_hover" class="fn">debug_on_hover</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>Whether or not to debug widget layout on hover.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_debug_on_hover" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2829-2831">Source</a><h4 class="code-header">pub fn <a href="#method.set_debug_on_hover" class="fn">set_debug_on_hover</a>(&amp;self, debug_on_hover: <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>Turn on/off whether or not to debug widget layout on hover.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-8" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#2835-2940">Source</a><a href="#impl-Context-8" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="docblock"><h5 id="animation"><a class="doc-anchor" href="#animation">§</a>Animation</h5></div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.animate_bool" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2846-2849">Source</a><h4 class="code-header">pub fn <a href="#method.animate_bool" class="fn">animate_bool</a>(&amp;self, id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>Returns a value in the range [0, 1], to indicate “how on” this thing is.</p>
<p>The first time called it will return <code>if value { 1.0 } else { 0.0 }</code>
Calling this with <code>value = true</code> will always yield a number larger than zero, quickly going towards one.
Calling this with <code>value = false</code> will always yield a number less than one, quickly going towards zero.</p>
<p>The function will call <a href="struct.Context.html#method.request_repaint" title="method egui::Context::request_repaint"><code>Self::request_repaint()</code></a> when appropriate.</p>
<p>The animation time is taken from <a href="style/struct.Style.html#structfield.animation_time" title="field egui::style::Style::animation_time"><code>Style::animation_time</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.animate_bool_responsive" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2856-2858">Source</a><h4 class="code-header">pub fn <a href="#method.animate_bool_responsive" class="fn">animate_bool_responsive</a>(&amp;self, id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>Like <a href="struct.Context.html#method.animate_bool" title="method egui::Context::animate_bool"><code>Self::animate_bool</code></a>, but uses an easing function that makes the value move
quickly in the beginning and slow down towards the end.</p>
<p>The exact easing function may come to change in future versions of egui.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.animate_bool_with_easing" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2862-2865">Source</a><h4 class="code-header">pub fn <a href="#method.animate_bool_with_easing" class="fn">animate_bool_with_easing</a>(
&amp;self,
id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a>,
value: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>,
easing: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.fn.html">fn</a>(_: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>,
) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>Like <a href="struct.Context.html#method.animate_bool" title="method egui::Context::animate_bool"><code>Self::animate_bool</code></a> but allows you to control the easing function.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.animate_bool_with_time" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2869-2876">Source</a><h4 class="code-header">pub fn <a href="#method.animate_bool_with_time" class="fn">animate_bool_with_time</a>(
&amp;self,
id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a>,
target_value: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>,
animation_time: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>,
) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>Like <a href="struct.Context.html#method.animate_bool" title="method egui::Context::animate_bool"><code>Self::animate_bool</code></a> but allows you to control the animation time.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.animate_bool_with_time_and_easing" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2886-2912">Source</a><h4 class="code-header">pub fn <a href="#method.animate_bool_with_time_and_easing" class="fn">animate_bool_with_time_and_easing</a>(
&amp;self,
id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a>,
target_value: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>,
animation_time: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>,
easing: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.fn.html">fn</a>(_: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>,
) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>Like <a href="struct.Context.html#method.animate_bool" title="method egui::Context::animate_bool"><code>Self::animate_bool</code></a> but allows you to control the animation time and easing function.</p>
<p>Use e.g. <a href="../emath/easing/fn.quadratic_out.html" title="fn emath::easing::quadratic_out"><code>emath::easing::quadratic_out</code></a>
for a responsive start and a slow end.</p>
<p>The easing function flips when <code>target_value</code> is <code>false</code>,
so that when going back towards 0.0, we get</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.animate_value_with_time" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2919-2934">Source</a><h4 class="code-header">pub fn <a href="#method.animate_value_with_time" class="fn">animate_value_with_time</a>(
&amp;self,
id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a>,
target_value: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>,
animation_time: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>,
) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>Smoothly animate an <code>f32</code> value.</p>
<p>At the first call the value is written to memory.
When it is called with a new value, it linearly interpolates to it in the given time.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.clear_animations" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2937-2939">Source</a><h4 class="code-header">pub fn <a href="#method.clear_animations" class="fn">clear_animations</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Clear memory of any animations.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-9" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#2942-3232">Source</a><a href="#impl-Context-9" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.settings_ui" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2944-2957">Source</a><h4 class="code-header">pub fn <a href="#method.settings_ui" class="fn">settings_ui</a>(&amp;self, ui: &amp;mut <a class="struct" href="struct.Ui.html" title="struct egui::Ui">Ui</a>)</h4></section></summary><div class="docblock"><p>Show a ui for settings (style and tessellation options).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.inspection_ui" class="method"><a class="src rightside" href="../src/egui/context.rs.html#2979-3076">Source</a><h4 class="code-header">pub fn <a href="#method.inspection_ui" class="fn">inspection_ui</a>(&amp;self, ui: &amp;mut <a class="struct" href="struct.Ui.html" title="struct egui::Ui">Ui</a>)</h4></section></summary><div class="docblock"><p>Show the state of egui, including its input and output.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.texture_ui" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3079-3134">Source</a><h4 class="code-header">pub fn <a href="#method.texture_ui" class="fn">texture_ui</a>(&amp;self, ui: &amp;mut <a class="struct" href="struct.Ui.html" title="struct egui::Ui">Ui</a>)</h4></section></summary><div class="docblock"><p>Show stats about the allocated textures.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.memory_ui" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3137-3231">Source</a><h4 class="code-header">pub fn <a href="#method.memory_ui" class="fn">memory_ui</a>(&amp;self, ui: &amp;mut <a class="struct" href="struct.Ui.html" title="struct egui::Ui">Ui</a>)</h4></section></summary><div class="docblock"><p>Shows the contents of <a href="struct.Context.html#method.memory" title="method egui::Context::memory"><code>Self::memory</code></a>.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-10" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#3234-3241">Source</a><a href="#impl-Context-10" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.style_ui" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3236-3240">Source</a><h4 class="code-header">pub fn <a href="#method.style_ui" class="fn">style_ui</a>(&amp;self, ui: &amp;mut <a class="struct" href="struct.Ui.html" title="struct egui::Ui">Ui</a>, theme: <a class="enum" href="enum.Theme.html" title="enum egui::Theme">Theme</a>)</h4></section></summary><div class="docblock"><p>Edit the <a href="style/struct.Style.html" title="struct egui::style::Style"><code>Style</code></a>.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-11" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#3244-3310">Source</a><a href="#impl-Context-11" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="docblock"><h5 id="accessibility"><a class="doc-anchor" href="#accessibility">§</a>Accessibility</h5></div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_accessibility_parent" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3253-3272">Source</a><h4 class="code-header">pub fn <a href="#method.with_accessibility_parent" class="fn">with_accessibility_parent</a>&lt;R&gt;(&amp;self, _id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a>, f: 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>() -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Call the provided function with the given ID pushed on the stack of
parent IDs for accessibility purposes. If the <code>accesskit</code> feature
is disabled or if AccessKit support is not active for this frame,
the function is still called, but with no other effect.</p>
<p>No locks are held while the given closure is called.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-12" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#3313-3533">Source</a><a href="#impl-Context-12" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="docblock"><h5 id="image-loading"><a class="doc-anchor" href="#image-loading">§</a>Image loading</h5></div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.include_bytes" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3320-3322">Source</a><h4 class="code-header">pub fn <a href="#method.include_bytes" class="fn">include_bytes</a>(
&amp;self,
uri: 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="https://doc.rust-lang.org/1.84.0/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a>&lt;'static, <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>&gt;&gt;,
bytes: 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="load/enum.Bytes.html" title="enum egui::load::Bytes">Bytes</a>&gt;,
)</h4></section></summary><div class="docblock"><p>Associate some static bytes with a <code>uri</code>.</p>
<p>The same <code>uri</code> may be passed to <a href="struct.Ui.html#method.image" title="method egui::Ui::image"><code>Ui::image</code></a> later to load the bytes as an image.</p>
<p>By convention, the <code>uri</code> should start with <code>bytes://</code>.
Following that convention will lead to better error messages.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_loader_installed" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3326-3332">Source</a><h4 class="code-header">pub fn <a href="#method.is_loader_installed" class="fn">is_loader_installed</a>(&amp;self, id: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</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 <code>true</code> if the chain of bytes, image, or texture loaders
contains a loader with the given <code>id</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_bytes_loader" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3339-3341">Source</a><h4 class="code-header">pub fn <a href="#method.add_bytes_loader" class="fn">add_bytes_loader</a>(
&amp;self,
loader: <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;dyn <a class="trait" href="load/trait.BytesLoader.html" title="trait egui::load::BytesLoader">BytesLoader</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> + 'static&gt;,
)</h4></section></summary><div class="docblock"><p>Add a new bytes loader.</p>
<p>It will be tried first, before any already installed loaders.</p>
<p>See <a href="load/index.html" title="mod egui::load"><code>load</code></a> for more information.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_image_loader" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3348-3350">Source</a><h4 class="code-header">pub fn <a href="#method.add_image_loader" class="fn">add_image_loader</a>(
&amp;self,
loader: <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;dyn <a class="trait" href="load/trait.ImageLoader.html" title="trait egui::load::ImageLoader">ImageLoader</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> + 'static&gt;,
)</h4></section></summary><div class="docblock"><p>Add a new image loader.</p>
<p>It will be tried first, before any already installed loaders.</p>
<p>See <a href="load/index.html" title="mod egui::load"><code>load</code></a> for more information.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_texture_loader" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3357-3359">Source</a><h4 class="code-header">pub fn <a href="#method.add_texture_loader" class="fn">add_texture_loader</a>(
&amp;self,
loader: <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;dyn <a class="trait" href="load/trait.TextureLoader.html" title="trait egui::load::TextureLoader">TextureLoader</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> + 'static&gt;,
)</h4></section></summary><div class="docblock"><p>Add a new texture loader.</p>
<p>It will be tried first, before any already installed loaders.</p>
<p>See <a href="load/index.html" title="mod egui::load"><code>load</code></a> for more information.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.forget_image" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3364-3381">Source</a><h4 class="code-header">pub fn <a href="#method.forget_image" class="fn">forget_image</a>(&amp;self, uri: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>)</h4></section></summary><div class="docblock"><p>Release all memory and textures related to the given image URI.</p>
<p>If you attempt to load the image again, it will be reloaded from scratch.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.forget_all_images" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3386-3403">Source</a><h4 class="code-header">pub fn <a href="#method.forget_all_images" class="fn">forget_all_images</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Release all memory and textures related to images used in <a href="struct.Ui.html#method.image" title="method egui::Ui::image"><code>Ui::image</code></a> or <a href="widgets/struct.Image.html" title="struct egui::widgets::Image"><code>crate::Image</code></a>.</p>
<p>If you attempt to load any images again, they will be reloaded from scratch.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_load_bytes" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3423-3438">Source</a><h4 class="code-header">pub fn <a href="#method.try_load_bytes" class="fn">try_load_bytes</a>(&amp;self, uri: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>) -&gt; <a class="type" href="load/type.BytesLoadResult.html" title="type egui::load::BytesLoadResult">BytesLoadResult</a></h4></section></summary><div class="docblock"><p>Try loading the bytes from the given uri using any available bytes loaders.</p>
<p>Loaders are expected to cache results, so that this call is immediate-mode safe.</p>
<p>This calls the loaders one by one in the order in which they were registered.
If a loader returns <a href="load/enum.LoadError.html#variant.NotSupported" title="variant egui::load::LoadError::NotSupported"><code>LoadError::NotSupported</code></a>,
then the next loader is called. This process repeats until all loaders have
been exhausted, at which point this returns <a href="load/enum.LoadError.html#variant.NotSupported" title="variant egui::load::LoadError::NotSupported"><code>LoadError::NotSupported</code></a>.</p>
<h5 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h5>
<p>This may fail with:</p>
<ul>
<li><a href="load/enum.LoadError.html#variant.NotSupported" title="variant egui::load::LoadError::NotSupported"><code>LoadError::NotSupported</code></a> if none of the registered loaders support loading the given <code>uri</code>.</li>
<li><a href="load/enum.LoadError.html#variant.Loading" title="variant egui::load::LoadError::Loading"><code>LoadError::Loading</code></a> if one of the loaders <em>does</em> support loading the <code>uri</code>, but the loading process failed.</li>
</ul>
<p>⚠ May deadlock if called from within a <code>BytesLoader</code>!</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_load_image" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3460-3486">Source</a><h4 class="code-header">pub fn <a href="#method.try_load_image" class="fn">try_load_image</a>(&amp;self, uri: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>, size_hint: <a class="enum" href="load/enum.SizeHint.html" title="enum egui::load::SizeHint">SizeHint</a>) -&gt; <a class="type" href="load/type.ImageLoadResult.html" title="type egui::load::ImageLoadResult">ImageLoadResult</a></h4></section></summary><div class="docblock"><p>Try loading the image from the given uri using any available image loaders.</p>
<p>Loaders are expected to cache results, so that this call is immediate-mode safe.</p>
<p>This calls the loaders one by one in the order in which they were registered.
If a loader returns <a href="load/enum.LoadError.html#variant.NotSupported" title="variant egui::load::LoadError::NotSupported"><code>LoadError::NotSupported</code></a>,
then the next loader is called. This process repeats until all loaders have
been exhausted, at which point this returns <a href="load/enum.LoadError.html#variant.NotSupported" title="variant egui::load::LoadError::NotSupported"><code>LoadError::NotSupported</code></a>.</p>
<h5 id="errors-1"><a class="doc-anchor" href="#errors-1">§</a>Errors</h5>
<p>This may fail with:</p>
<ul>
<li><a href="load/enum.LoadError.html#variant.NoImageLoaders" title="variant egui::load::LoadError::NoImageLoaders"><code>LoadError::NoImageLoaders</code></a> if tbere are no registered image loaders.</li>
<li><a href="load/enum.LoadError.html#variant.NotSupported" title="variant egui::load::LoadError::NotSupported"><code>LoadError::NotSupported</code></a> if none of the registered loaders support loading the given <code>uri</code>.</li>
<li><a href="load/enum.LoadError.html#variant.Loading" title="variant egui::load::LoadError::Loading"><code>LoadError::Loading</code></a> if one of the loaders <em>does</em> support loading the <code>uri</code>, but the loading process failed.</li>
</ul>
<p>⚠ May deadlock if called from within an <code>ImageLoader</code>!</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_load_texture" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3506-3526">Source</a><h4 class="code-header">pub fn <a href="#method.try_load_texture" class="fn">try_load_texture</a>(
&amp;self,
uri: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>,
texture_options: <a class="struct" href="struct.TextureOptions.html" title="struct egui::TextureOptions">TextureOptions</a>,
size_hint: <a class="enum" href="load/enum.SizeHint.html" title="enum egui::load::SizeHint">SizeHint</a>,
) -&gt; <a class="type" href="load/type.TextureLoadResult.html" title="type egui::load::TextureLoadResult">TextureLoadResult</a></h4></section></summary><div class="docblock"><p>Try loading the texture from the given uri using any available texture loaders.</p>
<p>Loaders are expected to cache results, so that this call is immediate-mode safe.</p>
<p>This calls the loaders one by one in the order in which they were registered.
If a loader returns <a href="load/enum.LoadError.html#variant.NotSupported" title="variant egui::load::LoadError::NotSupported"><code>LoadError::NotSupported</code></a>,
then the next loader is called. This process repeats until all loaders have
been exhausted, at which point this returns <a href="load/enum.LoadError.html#variant.NotSupported" title="variant egui::load::LoadError::NotSupported"><code>LoadError::NotSupported</code></a>.</p>
<h5 id="errors-2"><a class="doc-anchor" href="#errors-2">§</a>Errors</h5>
<p>This may fail with:</p>
<ul>
<li><a href="load/enum.LoadError.html#variant.NotSupported" title="variant egui::load::LoadError::NotSupported"><code>LoadError::NotSupported</code></a> if none of the registered loaders support loading the given <code>uri</code>.</li>
<li><a href="load/enum.LoadError.html#variant.Loading" title="variant egui::load::LoadError::Loading"><code>LoadError::Loading</code></a> if one of the loaders <em>does</em> support loading the <code>uri</code>, but the loading process failed.</li>
</ul>
<p>⚠ May deadlock if called from within a <code>TextureLoader</code>!</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.loaders" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3529-3532">Source</a><h4 class="code-header">pub fn <a href="#method.loaders" class="fn">loaders</a>(&amp;self) -&gt; <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;<a class="struct" href="load/struct.Loaders.html" title="struct egui::load::Loaders">Loaders</a>&gt;</h4></section></summary><div class="docblock"><p>The loaders of bytes, images, and textures.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-13" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#3536-3761">Source</a><a href="#impl-Context-13" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="docblock"><h5 id="viewports"><a class="doc-anchor" href="#viewports">§</a>Viewports</h5></div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.viewport_id" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3542-3544">Source</a><h4 class="code-header">pub fn <a href="#method.viewport_id" class="fn">viewport_id</a>(&amp;self) -&gt; <a class="struct" href="viewport/struct.ViewportId.html" title="struct egui::viewport::ViewportId">ViewportId</a></h4></section></summary><div class="docblock"><p>Return the <code>ViewportId</code> of the current viewport.</p>
<p>If this is the root viewport, this will return <a href="viewport/struct.ViewportId.html#associatedconstant.ROOT" title="associated constant egui::viewport::ViewportId::ROOT"><code>ViewportId::ROOT</code></a>.</p>
<p>Dont use this outside of <code>Self::run</code>, or after <code>Self::end_pass</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.parent_viewport_id" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3551-3553">Source</a><h4 class="code-header">pub fn <a href="#method.parent_viewport_id" class="fn">parent_viewport_id</a>(&amp;self) -&gt; <a class="struct" href="viewport/struct.ViewportId.html" title="struct egui::viewport::ViewportId">ViewportId</a></h4></section></summary><div class="docblock"><p>Return the <code>ViewportId</code> of his parent.</p>
<p>If this is the root viewport, this will return <a href="viewport/struct.ViewportId.html#associatedconstant.ROOT" title="associated constant egui::viewport::ViewportId::ROOT"><code>ViewportId::ROOT</code></a>.</p>
<p>Dont use this outside of <code>Self::run</code>, or after <code>Self::end_pass</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.viewport" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3556-3558">Source</a><h4 class="code-header">pub fn <a href="#method.viewport" class="fn">viewport</a>&lt;R&gt;(&amp;self, reader: 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;ViewportState) -&gt; R) -&gt; R</h4></section></summary><div class="docblock"><p>Read the state of the current viewport.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.viewport_for" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3561-3567">Source</a><h4 class="code-header">pub fn <a href="#method.viewport_for" class="fn">viewport_for</a>&lt;R&gt;(
&amp;self,
viewport_id: <a class="struct" href="viewport/struct.ViewportId.html" title="struct egui::viewport::ViewportId">ViewportId</a>,
reader: 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;ViewportState) -&gt; R,
) -&gt; R</h4></section></summary><div class="docblock"><p>Read the state of a specific current viewport.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_immediate_viewport_renderer" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3582-3589">Source</a><h4 class="code-header">pub fn <a href="#method.set_immediate_viewport_renderer" class="fn">set_immediate_viewport_renderer</a>(
callback: impl for&lt;'a&gt; <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>(&amp;Self, <a class="struct" href="viewport/struct.ImmediateViewport.html" title="struct egui::viewport::ImmediateViewport">ImmediateViewport</a>&lt;'a&gt;) + 'static,
)</h4></section></summary><div class="docblock"><p>For integrations: Set this to render a sync viewport.</p>
<p>This will only set the callback for the current thread,
which most likely should be the main thread.</p>
<p>When an immediate viewport is created with <a href="struct.Context.html#method.show_viewport_immediate" title="method egui::Context::show_viewport_immediate"><code>Self::show_viewport_immediate</code></a> it will be rendered by this function.</p>
<p>When called, the integration needs to:</p>
<ul>
<li>Check if there already is a window for this viewport id, and if not open one</li>
<li>Set the window attributes (position, size, …) based on <a href="viewport/struct.ImmediateViewport.html#structfield.builder" title="field egui::viewport::ImmediateViewport::builder"><code>ImmediateViewport::builder</code></a>.</li>
<li>Call <a href="struct.Context.html#method.run" title="method egui::Context::run"><code>Context::run</code></a> with <a href="viewport/struct.ImmediateViewport.html#structfield.viewport_ui_cb" title="field egui::viewport::ImmediateViewport::viewport_ui_cb"><code>ImmediateViewport::viewport_ui_cb</code></a>.</li>
<li>Handle the output from <a href="struct.Context.html#method.run" title="method egui::Context::run"><code>Context::run</code></a>, including rendering</li>
</ul>
</div></details><details class="toggle method-toggle" open><summary><section id="method.embed_viewports" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3595-3597">Source</a><h4 class="code-header">pub fn <a href="#method.embed_viewports" class="fn">embed_viewports</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>If <code>true</code>, <a href="struct.Context.html#method.show_viewport_deferred" title="method egui::Context::show_viewport_deferred"><code>Self::show_viewport_deferred</code></a> and <a href="struct.Context.html#method.show_viewport_immediate" title="method egui::Context::show_viewport_immediate"><code>Self::show_viewport_immediate</code></a> will
embed the new viewports inside the existing one, instead of spawning a new native window.</p>
<p><code>eframe</code> sets this to <code>false</code> on supported platforms, but the default value is <code>true</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_embed_viewports" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3603-3605">Source</a><h4 class="code-header">pub fn <a href="#method.set_embed_viewports" class="fn">set_embed_viewports</a>(&amp;self, value: <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>If <code>true</code>, <a href="struct.Context.html#method.show_viewport_deferred" title="method egui::Context::show_viewport_deferred"><code>Self::show_viewport_deferred</code></a> and <a href="struct.Context.html#method.show_viewport_immediate" title="method egui::Context::show_viewport_immediate"><code>Self::show_viewport_immediate</code></a> will
embed the new viewports inside the existing one, instead of spawning a new native window.</p>
<p><code>eframe</code> sets this to <code>false</code> on supported platforms, but the default value is <code>true</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.send_viewport_cmd" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3610-3612">Source</a><h4 class="code-header">pub fn <a href="#method.send_viewport_cmd" class="fn">send_viewport_cmd</a>(&amp;self, command: <a class="enum" href="viewport/enum.ViewportCommand.html" title="enum egui::viewport::ViewportCommand">ViewportCommand</a>)</h4></section></summary><div class="docblock"><p>Send a command to the current viewport.</p>
<p>This lets you affect the current viewport, e.g. resizing the window.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.send_viewport_cmd_to" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3617-3625">Source</a><h4 class="code-header">pub fn <a href="#method.send_viewport_cmd_to" class="fn">send_viewport_cmd_to</a>(&amp;self, id: <a class="struct" href="viewport/struct.ViewportId.html" title="struct egui::viewport::ViewportId">ViewportId</a>, command: <a class="enum" href="viewport/enum.ViewportCommand.html" title="enum egui::viewport::ViewportCommand">ViewportCommand</a>)</h4></section></summary><div class="docblock"><p>Send a command to a specific viewport.</p>
<p>This lets you affect another viewport, e.g. resizing its window.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.show_viewport_deferred" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3656-3680">Source</a><h4 class="code-header">pub fn <a href="#method.show_viewport_deferred" class="fn">show_viewport_deferred</a>(
&amp;self,
new_viewport_id: <a class="struct" href="viewport/struct.ViewportId.html" title="struct egui::viewport::ViewportId">ViewportId</a>,
viewport_builder: <a class="struct" href="viewport/struct.ViewportBuilder.html" title="struct egui::viewport::ViewportBuilder">ViewportBuilder</a>,
viewport_ui_cb: 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>(&amp;Self, <a class="enum" href="viewport/enum.ViewportClass.html" title="enum egui::viewport::ViewportClass">ViewportClass</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> + 'static,
)</h4></section></summary><div class="docblock"><p>Show a deferred viewport, creating a new native window, if possible.</p>
<p>The given id must be unique for each viewport.</p>
<p>You need to call this each pass when the child viewport should exist.</p>
<p>You can check if the user wants to close the viewport by checking the
<a href="struct.ViewportInfo.html#method.close_requested" title="method egui::ViewportInfo::close_requested"><code>crate::ViewportInfo::close_requested</code></a> flags found in <a href="struct.InputState.html#method.viewport" title="method egui::InputState::viewport"><code>crate::InputState::viewport</code></a>.</p>
<p>The given callback will be called whenever the child viewport needs repainting,
e.g. on an event or when <a href="struct.Context.html#method.request_repaint" title="method egui::Context::request_repaint"><code>Self::request_repaint</code></a> is called.
This means it may be called multiple times, for instance while the
parent viewport (the caller) is sleeping but the child viewport is animating.</p>
<p>You will need to wrap your viewport state in an <code>Arc&lt;RwLock&lt;T&gt;&gt;</code> or <code>Arc&lt;Mutex&lt;T&gt;&gt;</code>.
When this is called again with the same id in <code>ViewportBuilder</code> the render function for that viewport will be updated.</p>
<p>You can also use <a href="struct.Context.html#method.show_viewport_immediate" title="method egui::Context::show_viewport_immediate"><code>Self::show_viewport_immediate</code></a>, which uses a simpler <code>FnOnce</code>
with no need for <code>Send</code> or <code>Sync</code>. The downside is that it will require
the parent viewport (the caller) to repaint anytime the child is repainted,
and vice versa.</p>
<p>If <a href="struct.Context.html#method.embed_viewports" title="method egui::Context::embed_viewports"><code>Context::embed_viewports</code></a> is <code>true</code> (e.g. if the current egui
backend does not support multiple viewports), the given callback
will be called immediately, embedding the new viewport in the current one.
You can check this with the <a href="viewport/enum.ViewportClass.html" title="enum egui::viewport::ViewportClass"><code>ViewportClass</code></a> given in the callback.
If you find <a href="viewport/enum.ViewportClass.html#variant.Embedded" title="variant egui::viewport::ViewportClass::Embedded"><code>ViewportClass::Embedded</code></a>, you need to create a new <a href="containers/struct.Window.html" title="struct egui::containers::Window"><code>crate::Window</code></a> for you content.</p>
<p>See <a href="viewport/index.html" title="mod egui::viewport"><code>crate::viewport</code></a> for more information about viewports.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.show_viewport_immediate" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3708-3760">Source</a><h4 class="code-header">pub fn <a href="#method.show_viewport_immediate" class="fn">show_viewport_immediate</a>&lt;T&gt;(
&amp;self,
new_viewport_id: <a class="struct" href="viewport/struct.ViewportId.html" title="struct egui::viewport::ViewportId">ViewportId</a>,
builder: <a class="struct" href="viewport/struct.ViewportBuilder.html" title="struct egui::viewport::ViewportBuilder">ViewportBuilder</a>,
viewport_ui_cb: impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(&amp;Self, <a class="enum" href="viewport/enum.ViewportClass.html" title="enum egui::viewport::ViewportClass">ViewportClass</a>) -&gt; T,
) -&gt; T</h4></section></summary><div class="docblock"><p>Show an immediate viewport, creating a new native window, if possible.</p>
<p>This is the easier type of viewport to use, but it is less performant
at it requires both parent and child to repaint if any one of them needs repainting,
which effectively produce double work for two viewports, and triple work for three viewports, etc.
To avoid this, use <a href="struct.Context.html#method.show_viewport_deferred" title="method egui::Context::show_viewport_deferred"><code>Self::show_viewport_deferred</code></a> instead.</p>
<p>The given id must be unique for each viewport.</p>
<p>You need to call this each pass when the child viewport should exist.</p>
<p>You can check if the user wants to close the viewport by checking the
<a href="struct.ViewportInfo.html#method.close_requested" title="method egui::ViewportInfo::close_requested"><code>crate::ViewportInfo::close_requested</code></a> flags found in <a href="struct.InputState.html#method.viewport" title="method egui::InputState::viewport"><code>crate::InputState::viewport</code></a>.</p>
<p>The given ui function will be called immediately.
This may only be called on the main thread.
This call will pause the current viewport and render the child viewport in its own window.
This means that the child viewport will not be repainted when the parent viewport is repainted, and vice versa.</p>
<p>If <a href="struct.Context.html#method.embed_viewports" title="method egui::Context::embed_viewports"><code>Context::embed_viewports</code></a> is <code>true</code> (e.g. if the current egui
backend does not support multiple viewports), the given callback
will be called immediately, embedding the new viewport in the current one.
You can check this with the <a href="viewport/enum.ViewportClass.html" title="enum egui::viewport::ViewportClass"><code>ViewportClass</code></a> given in the callback.
If you find <a href="viewport/enum.ViewportClass.html#variant.Embedded" title="variant egui::viewport::ViewportClass::Embedded"><code>ViewportClass::Embedded</code></a>, you need to create a new <a href="containers/struct.Window.html" title="struct egui::containers::Window"><code>crate::Window</code></a> for you content.</p>
<p>See <a href="viewport/index.html" title="mod egui::viewport"><code>crate::viewport</code></a> for more information about viewports.</p>
</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Context-14" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#3764-3840">Source</a><a href="#impl-Context-14" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="docblock"><h5 id="interaction"><a class="doc-anchor" href="#interaction">§</a>Interaction</h5></div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.interaction_snapshot" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3766-3768">Source</a><h4 class="code-header">pub fn <a href="#method.interaction_snapshot" class="fn">interaction_snapshot</a>&lt;R&gt;(
&amp;self,
reader: 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;InteractionSnapshot) -&gt; R,
) -&gt; R</h4></section></summary><div class="docblock"><p>Read you what widgets are currently being interacted with.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dragged_id" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3777-3779">Source</a><h4 class="code-header">pub fn <a href="#method.dragged_id" class="fn">dragged_id</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.Id.html" title="struct egui::Id">Id</a>&gt;</h4></section></summary><div class="docblock"><p>The widget currently being dragged, if any.</p>
<p>For widgets that sense both clicks and drags, this will
not be set until the mouse cursor has moved a certain distance.</p>
<p>NOTE: if the widget was released this pass, this will be <code>None</code>.
Use <a href="struct.Context.html#method.drag_stopped_id" title="method egui::Context::drag_stopped_id"><code>Self::drag_stopped_id</code></a> instead.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_being_dragged" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3787-3789">Source</a><h4 class="code-header">pub fn <a href="#method.is_being_dragged" class="fn">is_being_dragged</a>(&amp;self, id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</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>Is this specific widget being dragged?</p>
<p>A widget that sense both clicks and drags is only marked as “dragged”
when the mouse has moved a bit</p>
<p>See also: <a href="struct.Response.html#method.dragged" title="method egui::Response::dragged"><code>crate::Response::dragged</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drag_started_id" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3794-3796">Source</a><h4 class="code-header">pub fn <a href="#method.drag_started_id" class="fn">drag_started_id</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.Id.html" title="struct egui::Id">Id</a>&gt;</h4></section></summary><div class="docblock"><p>This widget just started being dragged this pass.</p>
<p>The same widget should also be found in <a href="struct.Context.html#method.dragged_id" title="method egui::Context::dragged_id"><code>Self::dragged_id</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.drag_stopped_id" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3799-3801">Source</a><h4 class="code-header">pub fn <a href="#method.drag_stopped_id" class="fn">drag_stopped_id</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.Id.html" title="struct egui::Id">Id</a>&gt;</h4></section></summary><div class="docblock"><p>This widget was being dragged, but was released this pass</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_dragged_id" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3804-3816">Source</a><h4 class="code-header">pub fn <a href="#method.set_dragged_id" class="fn">set_dragged_id</a>(&amp;self, id: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</a>)</h4></section></summary><div class="docblock"><p>Set which widget is being dragged.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.stop_dragging" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3819-3830">Source</a><h4 class="code-header">pub fn <a href="#method.stop_dragging" class="fn">stop_dragging</a>(&amp;self)</h4></section></summary><div class="docblock"><p>Stop dragging any widget.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dragging_something_else" class="method"><a class="src rightside" href="../src/egui/context.rs.html#3836-3839">Source</a><h4 class="code-header">pub fn <a href="#method.dragging_something_else" class="fn">dragging_something_else</a>(&amp;self, not_this: <a class="struct" href="struct.Id.html" title="struct egui::Id">Id</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>Is something else being dragged?</p>
<p>Returns true if we are dragging something, but not the given widget.</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-Clone-for-Context" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#735">Source</a><a href="#impl-Clone-for-Context" 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.Context.html" title="struct egui::Context">Context</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/context.rs.html#735">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.Context.html" title="struct egui::Context">Context</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-Context" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#738-742">Source</a><a href="#impl-Debug-for-Context" 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.Context.html" title="struct egui::Context">Context</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/context.rs.html#739-741">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><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Context" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#750-765">Source</a><a href="#impl-Default-for-Context" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../src/egui/context.rs.html#751-764">Source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -&gt; Self</h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.84.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Context" class="impl"><a class="src rightside" href="../src/egui/context.rs.html#744-748">Source</a><a href="#impl-PartialEq-for-Context" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.Context.html" title="struct egui::Context">Context</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../src/egui/context.rs.html#745-747">Source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&amp;self, other: &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'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" 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/cmp.rs.html#261">Source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;Rhs</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'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
and should not be overridden without very good reason.</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-Context" class="impl"><a href="#impl-Freeze-for-Context" 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.Context.html" title="struct egui::Context">Context</a></h3></section><section id="impl-RefUnwindSafe-for-Context" class="impl"><a href="#impl-RefUnwindSafe-for-Context" 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.Context.html" title="struct egui::Context">Context</a></h3></section><section id="impl-Send-for-Context" class="impl"><a href="#impl-Send-for-Context" 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.Context.html" title="struct egui::Context">Context</a></h3></section><section id="impl-Sync-for-Context" class="impl"><a href="#impl-Sync-for-Context" 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.Context.html" title="struct egui::Context">Context</a></h3></section><section id="impl-Unpin-for-Context" class="impl"><a href="#impl-Unpin-for-Context" 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.Context.html" title="struct egui::Context">Context</a></h3></section><section id="impl-UnwindSafe-for-Context" class="impl"><a href="#impl-UnwindSafe-for-Context" 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.Context.html" title="struct egui::Context">Context</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>