Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
impl fmt::Debug for WindowLevel. (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Jul 30, 2023
1 parent 1337a0f commit 04f71ee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
//! Platform independent window types.

use std::any::Any;
use std::fmt;
use std::time::Duration;

use crate::application::Application;
Expand Down Expand Up @@ -162,6 +163,17 @@ pub enum WindowLevel {
Modal(WindowHandle),
}

impl fmt::Debug for WindowLevel {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
WindowLevel::AppWindow => write!(f, "AppWindow"),
WindowLevel::Tooltip(_) => write!(f, "Tooltip"),
WindowLevel::DropDown(_) => write!(f, "DropDown"),
WindowLevel::Modal(_) => write!(f, "Modal"),
}
}
}

/// Contains the different states a Window can be in.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum WindowState {
Expand Down

0 comments on commit 04f71ee

Please sign in to comment.