use crate::{ControlImpl, Decorator};
use ferroui_base::input::InputElementImpl;
use ferroui_base::interactivity::InteractiveImpl;
use ferroui_base::layout::LayoutableImpl;
use ferroui_base::styling::ThemeVariant;
use ferroui_base::{
ferro_class, ferro_class_info, ferro_impl_classes, instantiate, FerroObjectImpl, Ref, StyledElementImpl,
StyledProperty, VisualImpl,
};
#[repr(C)]
pub struct ThemeVariantScope {
base: Decorator,
}
ferro_class!(ThemeVariantScope: Decorator);
ferro_class_info!(ThemeVariantScope { new: ThemeVariantScope::new });
ferro_impl_classes!(
ThemeVariantScope: FerroObjectImpl,
StyledElementImpl,
VisualImpl,
LayoutableImpl,
InteractiveImpl,
InputElementImpl,
ControlImpl
);
impl ThemeVariantScope {
pub fn actual_theme_variant_property() -> &'static StyledProperty<Option<ThemeVariant>> {
ThemeVariant::actual_theme_variant_property()
}
pub fn requested_theme_variant_property() -> &'static StyledProperty<Option<ThemeVariant>> {
ThemeVariant::requested_theme_variant_property()
}
pub fn construct() -> Self {
Self { base: Decorator::construct() }
}
pub fn new() -> Ref<Self> {
instantiate(Self::construct())
}
pub fn requested_theme_variant(&self) -> Option<ThemeVariant> {
self.get_value(Self::requested_theme_variant_property())
}
pub fn set_requested_theme_variant(&self, value: Option<ThemeVariant>) {
self.set_value(Self::requested_theme_variant_property(), value)
}
}