repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/pass_state.rs
crates/egui/src/pass_state.rs
use ahash::HashMap; use crate::{Align, Id, IdMap, LayerId, Rangef, Rect, Vec2, WidgetRects, id::IdSet, style}; #[cfg(debug_assertions)] use crate::{Align2, Color32, FontId, NumExt as _, Painter, pos2}; /// Reset at the start of each frame. #[derive(Clone, Debug, Default)] pub struct TooltipPassState { /// If a t...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/menu.rs
crates/egui/src/menu.rs
#![expect(deprecated)] //! Deprecated menu API - Use [`crate::containers::menu`] instead. //! //! Usage: //! ``` //! fn show_menu(ui: &mut egui::Ui) { //! use egui::{menu, Button}; //! //! menu::bar(ui, |ui| { //! ui.menu_button("File", |ui| { //! if ui.button("Open").clicked() { //! ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/interaction.rs
crates/egui/src/interaction.rs
//! How mouse and touch interzcts with widgets. use crate::{Id, InputState, Key, WidgetRects, hit_test, id, input_state, memory}; use self::{hit_test::WidgetHits, id::IdSet, input_state::PointerEvent, memory::InteractionState}; /// Calculated at the start of each frame /// based on: /// * Widget rects from precious ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/grid.rs
crates/egui/src/grid.rs
use std::sync::Arc; use emath::GuiRounding as _; use crate::{ Align2, Color32, Context, Id, InnerResponse, NumExt as _, Painter, Rect, Region, Style, Ui, UiBuilder, Vec2, vec2, }; #[cfg(debug_assertions)] use crate::Stroke; #[derive(Clone, Debug, Default, PartialEq)] pub(crate) struct State { col_widths...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/drag_and_drop.rs
crates/egui/src/drag_and_drop.rs
use std::{any::Any, sync::Arc}; use crate::{Context, CursorIcon, Plugin, Ui}; /// Plugin for tracking drag-and-drop payload. /// /// This plugin stores the current drag-and-drop payload internally and handles /// automatic cleanup when the drag operation ends (via Escape key or mouse release). /// /// This is a low-l...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widget_rect.rs
crates/egui/src/widget_rect.rs
use ahash::HashMap; use crate::{Id, IdMap, LayerId, Rect, Sense, WidgetInfo}; /// Used to store each widget's [Id], [Rect] and [Sense] each frame. /// /// Used to check which widget gets input when a user clicks somewhere. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct WidgetRect { /// The globally uniqu...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/layout.rs
crates/egui/src/layout.rs
use emath::GuiRounding as _; use crate::{ Align, emath::{Align2, NumExt as _, Pos2, Rect, Vec2, pos2, vec2}, }; const INFINITY: f32 = f32::INFINITY; // ---------------------------------------------------------------------------- /// This describes the bounds and existing contents of an [`Ui`][`crate::Ui`]. /...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/style.rs
crates/egui/src/style.rs
//! egui theme (spacing, colors, etc). use emath::Align; use epaint::{AlphaFromCoverage, CornerRadius, Shadow, Stroke, TextOptions, text::FontTweak}; use std::{collections::BTreeMap, ops::RangeInclusive, sync::Arc}; use crate::{ ComboBox, CursorIcon, FontFamily, FontId, Grid, Margin, Response, RichText, TextWrapM...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
true
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/ui.rs
crates/egui/src/ui.rs
#![warn(missing_docs)] // Let's keep `Ui` well-documented. #![expect(clippy::use_self)] use std::{any::Any, hash::Hash, ops::Deref, sync::Arc}; use emath::GuiRounding as _; use epaint::mutex::RwLock; use crate::containers::menu; use crate::{containers::*, ecolor::*, layout::*, placer::Placer, widgets::*, *}; // ----...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
true
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/load.rs
crates/egui/src/load.rs
//! # Image loading //! //! If you just want to display some images, [`egui_extras`](https://crates.io/crates/egui_extras/) //! will get you up and running quickly with its reasonable default implementations of the traits described below. //! //! 1. Add [`egui_extras`](https://crates.io/crates/egui_extras/) as a depend...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/context.rs
crates/egui/src/context.rs
#![warn(missing_docs)] // Let's keep `Context` well-documented. use std::{borrow::Cow, cell::RefCell, panic::Location, sync::Arc, time::Duration}; use emath::GuiRounding as _; use epaint::{ ClippedPrimitive, ClippedShape, Color32, ImageData, Pos2, Rect, StrokeKind, TessellationOptions, TextureId, Vec2, em...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
true
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/sense.rs
crates/egui/src/sense.rs
/// What sort of interaction is a widget sensitive to? #[derive(Clone, Copy, Eq, PartialEq)] // #[cfg_attr(feature = "serde", derive(serde::Serialize))] pub struct Sense(u8); bitflags::bitflags! { impl Sense: u8 { const HOVER = 0; /// Buttons, sliders, windows, … const CLICK = 1<<0; ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/debug_text.rs
crates/egui/src/debug_text.rs
//! This is an example of how to create a plugin for egui. //! //! A plugin is a struct that implements the [`Plugin`] trait and holds some state. //! The plugin is registered with the [`Context`] using [`Context::add_plugin`] //! to get callbacks on certain events ([`Plugin::on_begin_pass`], [`Plugin::on_end_pass`]). ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/gui_zoom.rs
crates/egui/src/gui_zoom.rs
//! Helpers for zooming the whole GUI of an app (changing [`Context::pixels_per_point`]). //! use crate::{Button, Context, Key, KeyboardShortcut, Modifiers, Ui}; /// The suggested keyboard shortcuts for global gui zooming. pub mod kb_shortcuts { use super::{Key, KeyboardShortcut, Modifiers}; /// Primary keybo...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/hit_test.rs
crates/egui/src/hit_test.rs
use ahash::HashMap; use emath::TSTransform; use crate::{LayerId, Pos2, Sense, WidgetRect, WidgetRects, ahash, emath, id::IdSet}; /// Result of a hit-test against [`WidgetRects`]. /// /// Answers the question "what is under the mouse pointer?". /// /// Note that this doesn't care if the mouse button is pressed or not...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/ui_stack.rs
crates/egui/src/ui_stack.rs
use std::sync::Arc; use std::{any::Any, iter::FusedIterator}; use crate::{Direction, Frame, Id, Rect}; /// What kind is this [`crate::Ui`]? #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum UiKind { /// A [`crate::Window`]. Window, /// A [`crate::CentralPanel`]. CentralPanel, /// A left [`cr...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/animation_manager.rs
crates/egui/src/animation_manager.rs
use crate::{ Id, IdMap, InputState, emath::{NumExt as _, remap_clamp}, }; #[derive(Clone, Default)] pub(crate) struct AnimationManager { bools: IdMap<BoolAnim>, values: IdMap<ValueAnim>, } #[derive(Clone, Debug)] struct BoolAnim { last_value: f32, last_tick: f64, } #[derive(Clone, Debug)] str...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/plugin.rs
crates/egui/src/plugin.rs
use crate::{Context, FullOutput, RawInput, Ui}; use ahash::HashMap; use epaint::mutex::{Mutex, MutexGuard}; use std::sync::Arc; /// A plugin to extend egui. /// /// Add plugins via [`Context::add_plugin`]. /// /// Plugins should not hold a reference to the [`Context`], since this would create a cycle /// (which would ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/atomics/atom.rs
crates/egui/src/atomics/atom.rs
use crate::{AtomKind, FontSelection, Id, SizedAtom, Ui}; use emath::{NumExt as _, Vec2}; use epaint::text::TextWrapMode; /// A low-level ui building block. /// /// Implements [`From`] for [`String`], [`str`], [`crate::Image`] and much more for convenience. /// You can directly call the `atom_*` methods on anything tha...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/atomics/atom_kind.rs
crates/egui/src/atomics/atom_kind.rs
use crate::{FontSelection, Id, Image, ImageSource, SizedAtomKind, Ui, WidgetText}; use emath::Vec2; use epaint::text::TextWrapMode; /// The different kinds of [`crate::Atom`]s. #[derive(Clone, Default, Debug)] pub enum AtomKind<'a> { /// Empty, that can be used with [`crate::AtomExt::atom_grow`] to reserve space. ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/atomics/atoms.rs
crates/egui/src/atomics/atoms.rs
use crate::{Atom, AtomKind, Image, WidgetText}; use smallvec::SmallVec; use std::borrow::Cow; use std::ops::{Deref, DerefMut}; // Rarely there should be more than 2 atoms in one Widget. // I guess it could happen in a menu button with Image and right text... pub(crate) const ATOMS_SMALL_VEC_SIZE: usize = 2; /// A lis...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/atomics/sized_atom_kind.rs
crates/egui/src/atomics/sized_atom_kind.rs
use crate::{Id, Image}; use emath::Vec2; use epaint::Galley; use std::sync::Arc; /// A sized [`crate::AtomKind`]. #[derive(Clone, Default, Debug)] pub enum SizedAtomKind<'a> { #[default] Empty, Text(Arc<Galley>), Image(Image<'a>, Vec2), Custom(Id), } impl SizedAtomKind<'_> { /// Get the calcul...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/atomics/mod.rs
crates/egui/src/atomics/mod.rs
mod atom; mod atom_ext; mod atom_kind; mod atom_layout; mod atoms; mod sized_atom; mod sized_atom_kind; pub use atom::*; pub use atom_ext::*; pub use atom_kind::*; pub use atom_layout::*; pub use atoms::*; pub use sized_atom::*; pub use sized_atom_kind::*;
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/atomics/atom_ext.rs
crates/egui/src/atomics/atom_ext.rs
use crate::{Atom, FontSelection, Ui}; use emath::Vec2; /// A trait for conveniently building [`Atom`]s. /// /// The functions are prefixed with `atom_` to avoid conflicts with e.g. [`crate::RichText::size`]. pub trait AtomExt<'a> { /// Set the atom to a fixed size. /// /// If [`Atom::grow`] is `true`, this...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/atomics/atom_layout.rs
crates/egui/src/atomics/atom_layout.rs
use crate::atomics::ATOMS_SMALL_VEC_SIZE; use crate::{ AtomKind, Atoms, FontSelection, Frame, Id, Image, IntoAtoms, Response, Sense, SizedAtom, SizedAtomKind, Ui, Widget, }; use emath::{Align2, GuiRounding as _, NumExt as _, Rect, Vec2}; use epaint::text::TextWrapMode; use epaint::{Color32, Galley}; use smallve...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/atomics/sized_atom.rs
crates/egui/src/atomics/sized_atom.rs
use crate::SizedAtomKind; use emath::Vec2; /// A [`crate::Atom`] which has been sized. #[derive(Clone, Debug)] pub struct SizedAtom<'a> { pub(crate) grow: bool, /// The size of the atom. /// /// Used for placing this atom in [`crate::AtomLayout`], the cursor will advance by /// size.x + gap. p...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/util/fixed_cache.rs
crates/egui/src/util/fixed_cache.rs
use epaint::util::hash; const FIXED_CACHE_SIZE: usize = 1024; // must be small for web/WASM build (for unknown reason) /// Very stupid/simple key-value cache. TODO(emilk): improve #[derive(Clone)] pub(crate) struct FixedCache<K, V>([Option<(K, V)>; FIXED_CACHE_SIZE]); impl<K, V> Default for FixedCache<K, V> where ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/util/id_type_map.rs
crates/egui/src/util/id_type_map.rs
// TODO(emilk): it is possible we can simplify `Element` further by // assuming everything is possibly serializable, and by supplying serialize/deserialize functions for them. // For non-serializable types, these simply return `None`. // This will also allow users to pick their own serialization format per type. use s...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/util/undoer.rs
crates/egui/src/util/undoer.rs
use std::collections::VecDeque; #[derive(Clone, Debug, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub struct Settings { /// Maximum number of undos. /// If your state is resource intensive, you should keep this low. /// /// Default: `100` pub max_undos:...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/util/mod.rs
crates/egui/src/util/mod.rs
//! Miscellaneous tools used by the rest of egui. pub(crate) mod fixed_cache; pub mod id_type_map; pub mod undoer; pub use id_type_map::IdTypeMap; pub use epaint::emath::History; pub use epaint::util::{hash, hash_with}; /// Deprecated alias for [`crate::cache`]. #[deprecated = "Use egui::cache instead"] pub use cra...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/input_state/touch_state.rs
crates/egui/src/input_state/touch_state.rs
use std::{collections::BTreeMap, fmt::Debug}; use crate::{ Event, RawInput, TouchId, TouchPhase, data::input::TouchDeviceId, emath::{Pos2, Vec2, normalized_angle}, }; /// All you probably need to know about a multi-touch gesture. #[derive(Clone, Copy, Debug, PartialEq)] pub struct MultiTouchInfo { ///...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/input_state/mod.rs
crates/egui/src/input_state/mod.rs
mod touch_state; mod wheel_state; use crate::{ SafeAreaInsets, emath::{NumExt as _, Pos2, Rect, Vec2, vec2}, util::History, }; use crate::{ data::input::{ Event, EventFilter, KeyboardShortcut, Modifiers, NUM_POINTER_BUTTONS, PointerButton, RawInput, TouchDeviceId, ViewportInfo, }, ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
true
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/input_state/wheel_state.rs
crates/egui/src/input_state/wheel_state.rs
use emath::{Rect, Vec2, vec2}; use crate::{InputOptions, Modifiers, MouseWheelUnit, TouchPhase}; /// The current state of scrolling. /// /// There are two important types of scroll input deviced: /// * Discreen scroll wheels on a mouse /// * Smooth scroll input from a trackpad /// /// Scroll wheels will usually fire ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/cache/cache_storage.rs
crates/egui/src/cache/cache_storage.rs
use super::CacheTrait; /// A typemap of many caches, all implemented with [`CacheTrait`]. /// /// You can access egui's caches via [`crate::Memory::caches`], /// found with [`crate::Context::memory_mut`]. /// /// ``` /// use egui::cache::{CacheStorage, ComputerMut, FrameCache}; /// /// #[derive(Default)] /// struct Ch...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/cache/cache_trait.rs
crates/egui/src/cache/cache_trait.rs
/// A cache, storing some value for some length of time. #[expect(clippy::len_without_is_empty)] pub trait CacheTrait: 'static + Send + Sync { /// Call once per frame to evict cache. fn update(&mut self); /// Number of values currently in the cache. fn len(&self) -> usize; fn as_any_mut(&mut self)...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/cache/frame_publisher.rs
crates/egui/src/cache/frame_publisher.rs
use std::hash::Hash; use super::CacheTrait; /// Stores a key:value pair for the duration of this frame and the next. pub struct FramePublisher<Key: Eq + Hash, Value> { generation: u32, cache: ahash::HashMap<Key, (u32, Value)>, } impl<Key: Eq + Hash, Value> Default for FramePublisher<Key, Value> { fn defa...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/cache/mod.rs
crates/egui/src/cache/mod.rs
//! Caches for preventing the same value from being recomputed every frame. //! //! Computing the same thing each frame can be expensive, //! so often you want to save the result from the previous frame and reuse it. //! //! Enter [`FrameCache`]: it caches the results of a computation for one frame. //! If it is still ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/cache/frame_cache.rs
crates/egui/src/cache/frame_cache.rs
use super::CacheTrait; /// Something that does an expensive computation that we want to cache /// to save us from recomputing it each frame. pub trait ComputerMut<Key, Value>: 'static + Send + Sync { fn compute(&mut self, key: Key) -> Value; } /// Caches the results of a computation for one frame. /// If it is st...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/memory/theme.rs
crates/egui/src/memory/theme.rs
use crate::Button; /// Dark or Light theme. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub enum Theme { /// Dark mode: light text on a dark background. Dark, /// Light mode: dark text on a light background. Light, } ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/memory/mod.rs
crates/egui/src/memory/mod.rs
#![warn(missing_docs)] // Let's keep this file well-documented.` to memory.rs use std::num::NonZeroUsize; use ahash::{HashMap, HashSet}; use epaint::emath::TSTransform; use crate::{ EventFilter, Id, IdMap, LayerId, Order, Pos2, Rangef, RawInput, Rect, Style, Vec2, ViewportId, ViewportIdMap, ViewportIdSet, ar...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
true
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/text_selection/text_cursor_state.rs
crates/egui/src/text_selection/text_cursor_state.rs
//! Text cursor changes/interaction, without modifying the text. use epaint::text::{Galley, cursor::CCursor}; use unicode_segmentation::UnicodeSegmentation as _; use crate::{NumExt as _, Rect, Response, Ui, epaint}; use super::CCursorRange; /// The state of a text cursor selection. /// /// Used for [`crate::TextEdi...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/text_selection/accesskit_text.rs
crates/egui/src/text_selection/accesskit_text.rs
use emath::TSTransform; use crate::{Context, Galley, Id}; use super::{CCursorRange, text_cursor_state::is_word_char}; /// Update accesskit with the current text state. pub fn update_accesskit_for_text_widget( ctx: &Context, widget_id: Id, cursor_range: Option<CCursorRange>, role: accesskit::Role, ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/text_selection/mod.rs
crates/egui/src/text_selection/mod.rs
//! Helpers regarding text selection for labels and text edit. pub mod accesskit_text; mod cursor_range; mod label_text_selection; pub mod text_cursor_state; pub mod visuals; pub use cursor_range::CCursorRange; pub use label_text_selection::LabelSelectionState; pub use text_cursor_state::TextCursorState;
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/text_selection/cursor_range.rs
crates/egui/src/text_selection/cursor_range.rs
use epaint::{Galley, text::cursor::CCursor}; use crate::{Event, Id, Key, Modifiers, os::OperatingSystem}; use super::text_cursor_state::{ccursor_next_word, ccursor_previous_word, slice_char_range}; /// A selected text range (could be a range of length zero). /// /// The selection is based on character count (NOT byt...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/text_selection/visuals.rs
crates/egui/src/text_selection/visuals.rs
use std::sync::Arc; use crate::{Galley, Painter, Rect, Ui, Visuals, pos2, vec2}; use super::CCursorRange; #[derive(Clone, Debug)] pub struct RowVertexIndices { pub row: usize, pub vertex_indices: [u32; 6], } /// Adds text selection rectangles to the galley. pub fn paint_text_selection( galley: &mut Arc<...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/text_selection/label_text_selection.rs
crates/egui/src/text_selection/label_text_selection.rs
use std::sync::Arc; use emath::TSTransform; use crate::{ Context, CursorIcon, Event, Galley, Id, LayerId, Plugin, Pos2, Rect, Response, Ui, layers::ShapeIdx, text::CCursor, text_selection::CCursorRange, }; use super::{ TextCursorState, text_cursor_state::cursor_rect, visuals::{RowVertexIndices, p...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/button.rs
crates/egui/src/widgets/button.rs
use epaint::Margin; use crate::{ Atom, AtomExt as _, AtomKind, AtomLayout, AtomLayoutResponse, Color32, CornerRadius, Frame, Image, IntoAtoms, NumExt as _, Response, Sense, Stroke, TextStyle, TextWrapMode, Ui, Vec2, Widget, WidgetInfo, WidgetText, WidgetType, widget_style::{ButtonStyle, WidgetState}, }...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/image.rs
crates/egui/src/widgets/image.rs
use std::{borrow::Cow, slice::Iter, sync::Arc, time::Duration}; use emath::{Align, Float as _, GuiRounding as _, NumExt as _, Rot2}; use epaint::{ RectShape, text::{LayoutJob, TextFormat, TextWrapping}, }; use crate::{ Color32, Context, CornerRadius, Id, Mesh, Painter, Rect, Response, Sense, Shape, Spinne...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/radio_button.rs
crates/egui/src/widgets/radio_button.rs
use crate::{ Atom, AtomLayout, Atoms, Id, IntoAtoms, NumExt as _, Response, Sense, Ui, Vec2, Widget, WidgetInfo, WidgetType, epaint, }; /// One out of several alternatives, either selected or not. /// /// Usually you'd use [`Ui::radio_value`] or [`Ui::radio`] instead. /// /// ``` /// # egui::__run_test_ui(|ui|...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/hyperlink.rs
crates/egui/src/widgets/hyperlink.rs
use crate::{ CursorIcon, Label, Response, Sense, Stroke, Ui, Widget, WidgetInfo, WidgetText, WidgetType, epaint, text_selection, }; use self::text_selection::LabelSelectionState; /// Clickable text, that looks like a hyperlink. /// /// To link to a web page, use [`Hyperlink`], [`Ui::hyperlink`] or [`Ui::hyper...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/slider.rs
crates/egui/src/widgets/slider.rs
#![expect(clippy::needless_pass_by_value)] // False positives with `impl ToString` use std::ops::RangeInclusive; use crate::{ Color32, DragValue, EventFilter, Key, Label, MINUS_CHAR_STR, NumExt as _, Pos2, Rangef, Rect, Response, Sense, TextStyle, TextWrapMode, Ui, Vec2, Widget, WidgetInfo, WidgetText, emath,...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
true
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/image_button.rs
crates/egui/src/widgets/image_button.rs
use crate::{ Color32, CornerRadius, Image, Rect, Response, Sense, Ui, Vec2, Widget, WidgetInfo, WidgetType, widgets, }; /// A clickable image within a frame. #[must_use = "You should put this widget in a ui with `ui.add(widget);`"] #[derive(Clone, Debug)] #[deprecated(since = "0.33.0", note = "Use egui::Button...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/progress_bar.rs
crates/egui/src/widgets/progress_bar.rs
use crate::{ Color32, CornerRadius, NumExt as _, Pos2, Rect, Response, Rgba, Sense, Shape, Stroke, TextStyle, TextWrapMode, Ui, Vec2, Widget, WidgetInfo, WidgetText, WidgetType, lerp, vec2, }; enum ProgressBarText { Custom(WidgetText), Percentage, } /// A simple progress bar. /// /// See also: [`crate...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/separator.rs
crates/egui/src/widgets/separator.rs
use crate::{Response, Sense, Ui, Vec2, Widget, vec2, widget_style::SeparatorStyle}; /// A visual separator. A horizontal or vertical line (depending on [`crate::Layout`]). /// /// Usually you'd use the shorter version [`Ui::separator`]. /// /// ``` /// # egui::__run_test_ui(|ui| { /// // These are equivalent: /// ui.s...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/mod.rs
crates/egui/src/widgets/mod.rs
//! Widgets are pieces of GUI such as [`Label`], [`Button`], [`Slider`] etc. //! //! Example widget uses: //! * `ui.add(Label::new("Text").text_color(color::red));` //! * `if ui.add(Button::new("Click me")).clicked() { … }` use crate::{Response, Ui, epaint}; mod button; mod checkbox; pub mod color_picker; pub(crate) ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/checkbox.rs
crates/egui/src/widgets/checkbox.rs
use emath::Rect; use crate::{ Atom, AtomLayout, Atoms, Id, IntoAtoms, NumExt as _, Response, Sense, Shape, Ui, Vec2, Widget, WidgetInfo, WidgetType, epaint, pos2, widget_style::CheckboxStyle, }; // TODO(emilk): allow checkbox without a text label /// Boolean on/off control with text label. /// /// Usually you...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/label.rs
crates/egui/src/widgets/label.rs
use std::sync::Arc; use crate::{ Align, Direction, FontSelection, Galley, Pos2, Response, Sense, Stroke, TextWrapMode, Ui, Widget, WidgetInfo, WidgetText, WidgetType, epaint, pos2, text_selection::LabelSelectionState, }; /// Static text. /// /// Usually it is more convenient to use [`Ui::label`]. /// /// ``` ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/color_picker.rs
crates/egui/src/widgets/color_picker.rs
//! Color picker widgets. use crate::util::fixed_cache::FixedCache; use crate::{ Context, DragValue, Id, Painter, Popup, PopupCloseBehavior, Response, Sense, Ui, Widget as _, WidgetInfo, WidgetType, epaint, lerp, remap_clamp, }; use epaint::{ Mesh, Rect, Shape, Stroke, StrokeKind, Vec2, ecolor::{Color3...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/spinner.rs
crates/egui/src/widgets/spinner.rs
use epaint::{Color32, Pos2, Rect, Shape, Stroke, emath::lerp, vec2}; use crate::{Response, Sense, Ui, Widget, WidgetInfo, WidgetType}; /// A spinner widget used to indicate loading. /// /// See also: [`crate::ProgressBar`]. #[must_use = "You should put this widget in a ui with `ui.add(widget);`"] #[derive(Default)] p...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/drag_value.rs
crates/egui/src/widgets/drag_value.rs
#![expect(clippy::needless_pass_by_value)] // False positives with `impl ToString` use std::{cmp::Ordering, ops::RangeInclusive}; use crate::{ Button, CursorIcon, Id, Key, MINUS_CHAR_STR, Modifiers, NumExt as _, Response, RichText, Sense, TextEdit, TextWrapMode, Ui, Widget, WidgetInfo, emath, text, }; // ---...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/selected_label.rs
crates/egui/src/widgets/selected_label.rs
#![expect(deprecated, clippy::new_ret_no_self)] use crate::WidgetText; #[deprecated = "Use `Button::selectable()` instead"] pub struct SelectableLabel {} impl SelectableLabel { #[deprecated = "Use `Button::selectable()` instead"] pub fn new(selected: bool, text: impl Into<WidgetText>) -> super::Button<'stati...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/text_edit/builder.rs
crates/egui/src/widgets/text_edit/builder.rs
use std::sync::Arc; use emath::{Rect, TSTransform}; use epaint::{ StrokeKind, text::{Galley, LayoutJob, cursor::CCursor}, }; use crate::{ Align, Align2, Color32, Context, CursorIcon, Event, EventFilter, FontSelection, Id, ImeEvent, Key, KeyboardShortcut, Margin, Modifiers, NumExt as _, Response, Sense...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
true
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/text_edit/state.rs
crates/egui/src/widgets/text_edit/state.rs
use std::sync::Arc; use crate::mutex::Mutex; use crate::{ Context, Id, Vec2, text_selection::{CCursorRange, TextCursorState}, }; pub type TextEditUndoer = crate::util::undoer::Undoer<(CCursorRange, String)>; /// The text edit state stored between frames. /// /// Attention: You also need to `store` the updat...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/text_edit/mod.rs
crates/egui/src/widgets/text_edit/mod.rs
mod builder; mod output; mod state; mod text_buffer; pub use { crate::text_selection::TextCursorState, builder::TextEdit, output::TextEditOutput, state::TextEditState, text_buffer::TextBuffer, };
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/text_edit/text_buffer.rs
crates/egui/src/widgets/text_edit/text_buffer.rs
use std::{borrow::Cow, ops::Range}; use epaint::{ Galley, text::{TAB_SIZE, cursor::CCursor}, }; use crate::{ text::CCursorRange, text_selection::text_cursor_state::{ byte_index_from_char_index, ccursor_next_word, ccursor_previous_word, char_index_from_byte_index, find_line_start, slice...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/widgets/text_edit/output.rs
crates/egui/src/widgets/text_edit/output.rs
use std::sync::Arc; use crate::text::CCursorRange; /// The output from a [`TextEdit`](crate::TextEdit). pub struct TextEditOutput { /// The interaction response. pub response: crate::Response, /// How the text was displayed. pub galley: Arc<crate::Galley>, /// Where the text in [`Self::galley`] ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/old_popup.rs
crates/egui/src/containers/old_popup.rs
//! Old and deprecated API for popups. Use [`Popup`] instead. #![expect(deprecated)] use crate::containers::tooltip::Tooltip; use crate::{ Align, Context, Id, LayerId, Layout, Popup, PopupAnchor, PopupCloseBehavior, Pos2, Rect, Response, Ui, Widget as _, WidgetText, }; use emath::RectAlign; // ----------------...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/tooltip.rs
crates/egui/src/containers/tooltip.rs
use crate::pass_state::PerWidgetTooltipState; use crate::{ AreaState, Context, Id, InnerResponse, LayerId, Layout, Order, Popup, PopupAnchor, PopupKind, Response, Sense, }; use emath::Vec2; pub struct Tooltip<'a> { pub popup: Popup<'a>, /// The layer of the parent widget. parent_layer: LayerId, ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/menu.rs
crates/egui/src/containers/menu.rs
//! Popup menus, context menus and menu bars. //! //! Show menus via //! - [`Popup::menu`] and [`Popup::context_menu`] //! - [`Ui::menu_button`], [`MenuButton`] and [`SubMenuButton`] //! - [`MenuBar`] //! - [`Response::context_menu`] //! //! See [`MenuBar`] for an example. use crate::style::StyleModifier; use crate::{...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/scene.rs
crates/egui/src/containers/scene.rs
use core::f32; use emath::{GuiRounding as _, Pos2}; use crate::{ InnerResponse, LayerId, PointerButton, Rangef, Rect, Response, Sense, Ui, UiBuilder, Vec2, emath::TSTransform, }; /// Creates a transformation that fits a given scene rectangle into the available screen size. /// /// The resulting visual scene ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/combo_box.rs
crates/egui/src/containers/combo_box.rs
use epaint::Shape; use crate::{ Align2, Context, Id, InnerResponse, NumExt as _, Painter, Popup, PopupCloseBehavior, Rect, Response, ScrollArea, Sense, Stroke, TextStyle, TextWrapMode, Ui, UiBuilder, Vec2, WidgetInfo, WidgetText, WidgetType, epaint, style::StyleModifier, style::WidgetVisuals, vec2, }; #[e...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/mod.rs
crates/egui/src/containers/mod.rs
//! Containers are pieces of the UI which wraps other pieces of UI. Examples: [`Window`], [`ScrollArea`], [`Resize`], [`Panel`], etc. //! //! For instance, a [`Frame`] adds a frame and background to some contained UI. pub(crate) mod area; mod close_tag; pub mod collapsing_header; mod combo_box; pub mod frame; pub mod ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/area.rs
crates/egui/src/containers/area.rs
//! Area is a [`Ui`] that has no parent, it floats on the background. //! It has no frame or own size. It is potentially movable. //! It is the foundation for windows and popups. use emath::GuiRounding as _; use crate::{ Align2, Context, Id, InnerResponse, LayerId, Layout, NumExt as _, Order, Pos2, Rect, Response...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/window.rs
crates/egui/src/containers/window.rs
// WARNING: the code in here is horrible. It is a behemoth that needs breaking up into simpler parts. use std::sync::Arc; use emath::GuiRounding as _; use epaint::{CornerRadiusF32, RectShape}; use crate::collapsing_header::CollapsingState; use crate::*; use super::scroll_area::{ScrollBarVisibility, ScrollSource}; u...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
true
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/scroll_area.rs
crates/egui/src/containers/scroll_area.rs
//! See [`ScrollArea`] for docs. #![expect(clippy::needless_range_loop)] use std::ops::{Add, AddAssign, BitOr, BitOrAssign}; use emath::GuiRounding as _; use epaint::Margin; use crate::{ Context, CursorIcon, Id, NumExt as _, Pos2, Rangef, Rect, Response, Sense, Ui, UiBuilder, UiKind, UiStackInfo, Vec2, Vec2...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
true
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/modal.rs
crates/egui/src/containers/modal.rs
use emath::{Align2, Vec2}; use crate::{ Area, Color32, Context, Frame, Id, InnerResponse, Order, Response, Sense, Ui, UiBuilder, UiKind, }; /// A modal dialog. /// /// Similar to a [`crate::Window`] but centered and with a backdrop that /// blocks input to the rest of the UI. /// /// You can show multiple modals ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/frame.rs
crates/egui/src/containers/frame.rs
//! Frame container use crate::{ InnerResponse, Response, Sense, Style, Ui, UiBuilder, UiKind, UiStackInfo, epaint, layers::ShapeIdx, }; use epaint::{Color32, CornerRadius, Margin, MarginF32, Rect, Shadow, Shape, Stroke}; /// A frame around some content, including margin, colors, etc. /// /// ## Definitions /...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/collapsing_header.rs
crates/egui/src/containers/collapsing_header.rs
use std::hash::Hash; use crate::{ Context, Id, InnerResponse, NumExt as _, Rect, Response, Sense, Stroke, TextStyle, TextWrapMode, Ui, UiBuilder, UiKind, UiStackInfo, Vec2, WidgetInfo, WidgetText, WidgetType, emath, epaint, pos2, remap, remap_clamp, vec2, }; use emath::GuiRounding as _; use epaint::{Shape,...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/panel.rs
crates/egui/src/containers/panel.rs
//! Panels are [`Ui`] regions taking up e.g. the left side of a [`Ui`] or screen. //! //! Panels can either be a child of a [`Ui`] (taking up a portion of the parent) //! or be top-level (taking up a portion of the whole screen). //! //! Together with [`crate::Window`] and [`crate::Area`]:s, top-level panels are //! th...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
true
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/resize.rs
crates/egui/src/containers/resize.rs
use crate::{ Align2, Color32, Context, CursorIcon, Id, NumExt as _, Rect, Response, Sense, Shape, Ui, UiBuilder, UiKind, UiStackInfo, Vec2, Vec2b, pos2, vec2, }; #[derive(Clone, Copy, Debug)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub(crate) struct State { /// This is ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/popup.rs
crates/egui/src/containers/popup.rs
#![expect(deprecated)] // This is a new, safe wrapper around the old `Memory::popup` API. use std::iter::once; use emath::{Align, Pos2, Rect, RectAlign, Vec2, vec2}; use crate::{ Area, AreaState, Context, Frame, Id, InnerResponse, Key, LayerId, Layout, Order, Response, Sense, Ui, UiKind, UiStackInfo, con...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/sides.rs
crates/egui/src/containers/sides.rs
use emath::{Align, NumExt as _}; use crate::{Layout, Ui, UiBuilder}; /// Put some widgets on the left and right sides of a ui. /// /// The result will look like this: /// ```text /// parent Ui /// ______________________________________________________ /// | | | ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/containers/close_tag.rs
crates/egui/src/containers/close_tag.rs
#[expect(unused_imports)] use crate::{Ui, UiBuilder}; use std::sync::atomic::AtomicBool; /// A tag to mark a container as closable. /// /// Usually set via [`UiBuilder::closable`]. /// /// [`Ui::close`] will find the closest parent [`ClosableTag`] and set its `close` field to `true`. /// Use [`Ui::should_close`] to ch...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/data/key.rs
crates/egui/src/data/key.rs
/// Keyboard keys. /// /// egui usually uses logical keys, i.e. after applying any user keymap.\ // See comment at the end of `Key { … }` on how to add new keys. #[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd, Hash)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub enum Key ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/data/user_data.rs
crates/egui/src/data/user_data.rs
use std::{any::Any, sync::Arc}; /// A wrapper around `dyn Any`, used for passing custom user data /// to [`crate::ViewportCommand::Screenshot`]. #[derive(Clone, Debug, Default)] pub struct UserData { /// A user value given to the screenshot command, /// that will be returned in [`crate::Event::Screenshot`]. ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/data/mod.rs
crates/egui/src/data/mod.rs
//! All the data sent between egui and the backend pub mod input; mod key; pub mod output; mod user_data; pub use key::Key; pub use user_data::UserData;
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/data/output.rs
crates/egui/src/data/output.rs
//! All the data egui returns to the backend at the end of each frame. use crate::{OrderedViewportIdMap, RepaintCause, ViewportOutput, WidgetType}; /// What egui emits each frame from [`crate::Context::run`]. /// /// The backend should use this. #[derive(Clone, Default)] pub struct FullOutput { /// Non-rendering ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/data/input.rs
crates/egui/src/data/input.rs
//! The input needed by egui. use epaint::{ColorImage, MarginF32}; use crate::{ Key, OrderedViewportIdMap, Theme, ViewportId, ViewportIdMap, emath::{Pos2, Rect, Vec2}, }; /// What the integrations provides to egui at the start of each frame. /// /// Set the values that make sense, leave the rest at their `De...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
true
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/load/texture_loader.rs
crates/egui/src/load/texture_loader.rs
use std::sync::atomic::{AtomicU64, Ordering::Relaxed}; use emath::Vec2; use super::{ BytesLoader as _, Context, HashMap, ImagePoll, Mutex, SizeHint, SizedTexture, TextureHandle, TextureLoadResult, TextureLoader, TextureOptions, TexturePoll, }; #[derive(Clone, Debug, PartialEq, Eq, Hash)] struct PrimaryKey { ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/egui/src/load/bytes_loader.rs
crates/egui/src/load/bytes_loader.rs
use super::{ Bytes, BytesLoadResult, BytesLoader, BytesPoll, Context, Cow, HashMap, LoadError, Mutex, generate_loader_id, }; /// Maps URI:s to [`Bytes`], e.g. found with `include_bytes!`. /// /// By convention, the URI:s should be prefixed with `bytes://`. #[derive(Default)] pub struct DefaultBytesLoader { ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/ecolor/src/lib.rs
crates/ecolor/src/lib.rs
//! Color conversions and types. //! //! This crate is built for the wants and needs of [`egui`](https://github.com/emilk/egui/). //! //! If you want an actual _good_ color crate, use [`color`](https://crates.io/crates/color) instead. //! //! If you want a compact color representation, use [`Color32`]. //! If you want ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/ecolor/src/cint_impl.rs
crates/ecolor/src/cint_impl.rs
use super::{Color32, Hsva, HsvaGamma, Rgba, linear_f32_from_linear_u8, linear_u8_from_linear_f32}; use cint::{Alpha, ColorInterop, EncodedSrgb, Hsv, LinearSrgb, PremultipliedAlpha}; // ---- Color32 ---- impl From<Alpha<EncodedSrgb<u8>>> for Color32 { fn from(srgba: Alpha<EncodedSrgb<u8>>) -> Self { let Al...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/ecolor/src/hex_color_macro.rs
crates/ecolor/src/hex_color_macro.rs
/// Construct a [`crate::Color32`] from a hex RGB or RGBA string literal. /// /// Requires the "color-hex" feature. /// /// The string is checked at compile time. If the format is invalid, compilation fails. The valid /// format is the one described in <https://drafts.csswg.org/css-color-4/#hex-color>. Only 6 (RGB) or ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/ecolor/src/hex_color_runtime.rs
crates/ecolor/src/hex_color_runtime.rs
//! Convert colors to and from the hex-color string format at runtime //! //! Supports the 3, 4, 6, and 8-digit formats, according to the specification in //! <https://drafts.csswg.org/css-color-4/#hex-color> use std::{fmt::Display, str::FromStr}; use crate::Color32; #[repr(C)] #[derive(Clone, Copy, Debug, Eq, Hash,...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/ecolor/src/hsva.rs
crates/ecolor/src/hsva.rs
use crate::{ Color32, Rgba, gamma_u8_from_linear_f32, linear_f32_from_gamma_u8, linear_u8_from_linear_f32, }; /// Hue, saturation, value, alpha. All in the range [0, 1]. /// No premultiplied alpha. #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] #[derive(Clone, Copy, Debug, Default, Pa...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/ecolor/src/rgba.rs
crates/ecolor/src/rgba.rs
use crate::Color32; /// 0-1 linear space `RGBA` color with premultiplied alpha. /// /// See [`crate::Color32`] for explanation of what "premultiplied alpha" means. #[repr(C)] #[derive(Clone, Copy, Debug, Default, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] #[cfg_attr(featur...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/ecolor/src/hsva_gamma.rs
crates/ecolor/src/hsva_gamma.rs
use crate::{Color32, Hsva, Rgba, gamma_from_linear, linear_from_gamma}; /// Like Hsva but with the `v` value (brightness) being gamma corrected /// so that it is somewhat perceptually even. #[derive(Clone, Copy, Debug, Default, PartialEq)] pub struct HsvaGamma { /// hue 0-1 pub h: f32, /// saturation 0-1 ...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/ecolor/src/color32.rs
crates/ecolor/src/color32.rs
use crate::{Rgba, fast_round, linear_f32_from_linear_u8}; /// This format is used for space-efficient color representation (32 bits). /// /// Instead of manipulating this directly it is often better /// to first convert it to either [`Rgba`] or [`crate::Hsva`]. /// /// Internally this uses 0-255 gamma space `sRGBA` co...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/emath/src/easing.rs
crates/emath/src/easing.rs
//! Easing functions for animations. //! //! Contains most easing functions from <https://easings.net/>. //! //! All functions take a value in `[0, 1]` and return a value in `[0, 1]`. //! //! Derived from <https://github.com/warrenm/AHEasing/blob/master/AHEasing/easing.c>. use std::f32::consts::PI; #[inline] fn powf(b...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false
emilk/egui
https://github.com/emilk/egui/blob/9e95b9ca50c224077617434707f7bd29bd70938b/crates/emath/src/ordered_float.rs
crates/emath/src/ordered_float.rs
//! Total order on floating point types. //! Can be used for sorting, min/max computation, and other collection algorithms. use std::cmp::Ordering; use std::hash::{Hash, Hasher}; /// Wraps a floating-point value to add total order and hash. /// Possible types for `T` are `f32` and `f64`. /// /// All NaNs are consider...
rust
Apache-2.0
9e95b9ca50c224077617434707f7bd29bd70938b
2026-01-04T15:36:36.351731Z
false