use crate::error::Result;
use windows::Win32::Foundation::HWND;
use std::fmt::Debug;
mod uielement;
mod button;
mod textblock;
mod textbox;
mod checkbox;
mod combobox;
mod slider;
mod progressbar;
mod toggle;
mod image;
mod listview;
pub use self::button::Button;
pub use self::checkbox::CheckBox;
pub use self::combobox::ComboBox;
pub use self::image::{Image, Stretch};
pub use self::listview::ListView;
pub use self::progressbar::ProgressBar;
pub use self::slider::{Slider, SliderOrientation};
pub use self::textblock::{TextAlignment, TextBlock};
pub use self::textbox::TextBox;
pub use self::toggle::ToggleSwitch;
pub use self::uielement::UIElement;
pub trait Control: Send + Sync + Debug {
fn create_control(&self, parent: HWND) -> Result<()>;
fn as_element(&self) -> &UIElement;
fn hwnd(&self) -> HWND {
self.as_element().hwnd()
}
fn is_created(&self) -> bool {
!self.hwnd().0.is_null()
}
fn as_any(&self) -> &dyn std::any::Any;
}