Introduce window::Level enum
... and add `level` field to `window::Settings`
This commit is contained in:
parent
b924e86630
commit
a7fa7e4005
5 changed files with 46 additions and 16 deletions
|
|
@ -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
19
core/src/window/level.rs
Normal 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,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue