Introduce window::Level enum

... and add `level` field to `window::Settings`
This commit is contained in:
Héctor Ramón Jiménez 2023-05-25 23:14:07 +02:00
parent b924e86630
commit a7fa7e4005
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
5 changed files with 46 additions and 16 deletions

View file

@ -2,12 +2,14 @@
pub mod icon;
mod event;
mod level;
mod mode;
mod redraw_request;
mod user_attention;
pub use event::Event;
pub use icon::Icon;
pub use level::Level;
pub use mode::Mode;
pub use redraw_request::RedrawRequest;
pub use user_attention::UserAttention;

19
core/src/window/level.rs Normal file
View file

@ -0,0 +1,19 @@
/// A window level groups windows with respect to their z-position.
///
/// The relative ordering between windows in different window levels is fixed.
/// The z-order of a window within the same window level may change dynamically
/// on user interaction.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum Level {
/// The default behavior.
#[default]
Normal,
/// The window will always be below normal windows.
///
/// This is useful for a widget-based app.
AlwaysOnBottom,
/// The window will always be on top of normal windows.
AlwaysOnTop,
}