#pragma once #include "../render/BorderRenderObject.h" #include "IBorderControl.h" #include "SingleChildControl.h" namespace cru::ui::controls { class CRU_UI_API Container : public SingleChildControl, public virtual IBorderControl { static constexpr auto kControlName = "Container"; public: Container(); public: bool IsBorderEnabled() { return GetContainerRenderObject()->IsBorderEnabled(); } void SetBorderEnabled(bool enabled) { GetContainerRenderObject()->SetBorderEnabled(enabled); } std::shared_ptr GetForegroundBrush() { return GetContainerRenderObject()->GetForegroundBrush(); } void SetForegroundBrush( const std::shared_ptr& brush) { GetContainerRenderObject()->SetForegroundBrush(brush); } std::shared_ptr GetBackgroundBrush() { return GetContainerRenderObject()->GetBackgroundBrush(); } void SetBackgroundBrush( const std::shared_ptr& brush) { GetContainerRenderObject()->SetBackgroundBrush(brush); } void ApplyBorderStyle(const style::ApplyBorderStyleInfo& style) override { GetContainerRenderObject()->ApplyBorderStyle(style); } }; } // namespace cru::ui::controls