diff options
Diffstat (limited to 'include/cru/ui/style/ApplyBorderStyleInfo.hpp')
-rw-r--r-- | include/cru/ui/style/ApplyBorderStyleInfo.hpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/include/cru/ui/style/ApplyBorderStyleInfo.hpp b/include/cru/ui/style/ApplyBorderStyleInfo.hpp index e9c4ca44..5058b51f 100644 --- a/include/cru/ui/style/ApplyBorderStyleInfo.hpp +++ b/include/cru/ui/style/ApplyBorderStyleInfo.hpp @@ -1,12 +1,28 @@ #pragma once +#include <optional> #include "../Base.hpp" namespace cru::ui::style { struct ApplyBorderStyleInfo { - std::shared_ptr<platform::graphics::IBrush> border_brush; + explicit ApplyBorderStyleInfo( + std::optional<std::shared_ptr<platform::graphics::IBrush>> border_brush = + std::nullopt, + std::optional<Thickness> border_thickness = std::nullopt, + std::optional<CornerRadius> border_radius = std::nullopt, + std::optional<std::shared_ptr<platform::graphics::IBrush>> + foreground_brush = std::nullopt, + std::optional<std::shared_ptr<platform::graphics::IBrush>> + background_brush = std::nullopt) + : border_brush(std::move(border_brush)), + border_thickness(std::move(border_thickness)), + border_radius(std::move(border_radius)), + foreground_brush(std::move(foreground_brush)), + background_brush(std::move(background_brush)) {} + + std::optional<std::shared_ptr<platform::graphics::IBrush>> border_brush; std::optional<Thickness> border_thickness; std::optional<CornerRadius> border_radius; - std::shared_ptr<platform::graphics::IBrush> foreground_brush; - std::shared_ptr<platform::graphics::IBrush> background_brush; + std::optional<std::shared_ptr<platform::graphics::IBrush>> foreground_brush; + std::optional<std::shared_ptr<platform::graphics::IBrush>> background_brush; }; } // namespace cru::ui::style |