diff --git a/egui/src/demos/app.rs b/egui/src/demos/app.rs index ad810bad..099e6eb6 100644 --- a/egui/src/demos/app.rs +++ b/egui/src/demos/app.rs @@ -1,4 +1,4 @@ -use crate::{app, demos, Context, History, Ui}; +use crate::{app, demos, util::History, Context, Ui}; use std::sync::Arc; // ---------------------------------------------------------------------------- diff --git a/egui/src/input.rs b/egui/src/input.rs index 10d95c4d..ff987310 100644 --- a/egui/src/input.rs +++ b/egui/src/input.rs @@ -1,6 +1,6 @@ //! The input needed by Egui. -use crate::{math::*, History}; +use crate::{math::*, util::History}; /// If mouse moves more than this, it is no longer a click (but maybe a drag) const MAX_CLICK_DIST: f32 = 6.0; diff --git a/egui/src/lib.rs b/egui/src/lib.rs index 06373138..c2292ce8 100644 --- a/egui/src/lib.rs +++ b/egui/src/lib.rs @@ -60,11 +60,9 @@ pub mod align; mod animation_manager; pub mod app; -pub(crate) mod cache; pub mod containers; mod context; pub mod demos; -mod history; mod id; mod input; mod introspection; @@ -73,12 +71,12 @@ mod layout; pub mod math; mod memory; pub mod menu; -pub mod mutex; pub mod paint; mod painter; mod style; mod types; mod ui; +pub mod util; pub mod widgets; pub use { @@ -86,7 +84,6 @@ pub use { containers::*, context::Context, demos::DemoApp, - history::History, id::Id, input::*, layers::*, @@ -101,6 +98,7 @@ pub use { style::Style, types::*, ui::Ui, + util::mutex, widgets::*, }; diff --git a/egui/src/memory.rs b/egui/src/memory.rs index ac912279..a1dcafcd 100644 --- a/egui/src/memory.rs +++ b/egui/src/memory.rs @@ -1,11 +1,10 @@ use std::collections::{HashMap, HashSet}; use crate::{ - area, - cache::Cache, - collapsing_header, menu, + area, collapsing_header, menu, paint::color::{Hsva, Srgba}, resize, scroll_area, + util::Cache, widgets::text_edit, window, Id, LayerId, Pos2, Rect, }; diff --git a/egui/src/cache.rs b/egui/src/util/cache.rs similarity index 100% rename from egui/src/cache.rs rename to egui/src/util/cache.rs diff --git a/egui/src/history.rs b/egui/src/util/history.rs similarity index 100% rename from egui/src/history.rs rename to egui/src/util/history.rs diff --git a/egui/src/util/mod.rs b/egui/src/util/mod.rs new file mode 100644 index 00000000..f982d99d --- /dev/null +++ b/egui/src/util/mod.rs @@ -0,0 +1,8 @@ +//! Tools used by Egui, but that doesn't depend on anything in Egui. + +pub(crate) mod cache; +mod history; +pub mod mutex; + +pub(crate) use cache::Cache; +pub use history::History; diff --git a/egui/src/mutex.rs b/egui/src/util/mutex.rs similarity index 100% rename from egui/src/mutex.rs rename to egui/src/util/mutex.rs