From 673f1939beb1b477a23d9641a07a2e05fff903b4 Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 26 Feb 2022 20:12:54 +0800 Subject: ... --- include/cru/ui/mapper/style/MarginStylerMapper.h | 26 +++++++++++++++++++++++ include/cru/ui/mapper/style/PaddingStylerMapper.h | 26 +++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 include/cru/ui/mapper/style/MarginStylerMapper.h create mode 100644 include/cru/ui/mapper/style/PaddingStylerMapper.h (limited to 'include/cru/ui/mapper/style') diff --git a/include/cru/ui/mapper/style/MarginStylerMapper.h b/include/cru/ui/mapper/style/MarginStylerMapper.h new file mode 100644 index 00000000..99e292b2 --- /dev/null +++ b/include/cru/ui/mapper/style/MarginStylerMapper.h @@ -0,0 +1,26 @@ +#pragma once +#include "../Mapper.h" +#include "cru/ui/mapper/style/IStylerMapper.h" +#include "cru/ui/style/Styler.h" + +namespace cru::ui::mapper::style { +class CRU_UI_API MarginStylerMapper + : public BasicPtrMapper, + public virtual IStylerMapper { + public: + MarginStylerMapper(); + ~MarginStylerMapper(); + + public: + bool SupportMapFromXml() override { return true; } + + ClonablePtr MapStylerFromXml( + xml::XmlElementNode* node) override { + return MapFromXml(node); + } + + protected: + ClonablePtr DoMapFromXml( + xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper::style diff --git a/include/cru/ui/mapper/style/PaddingStylerMapper.h b/include/cru/ui/mapper/style/PaddingStylerMapper.h new file mode 100644 index 00000000..2c0b4340 --- /dev/null +++ b/include/cru/ui/mapper/style/PaddingStylerMapper.h @@ -0,0 +1,26 @@ +#pragma once +#include "../Mapper.h" +#include "cru/ui/mapper/style/IStylerMapper.h" +#include "cru/ui/style/Styler.h" + +namespace cru::ui::mapper::style { +class CRU_UI_API PaddingStylerMapper + : public BasicPtrMapper, + public virtual IStylerMapper { + public: + PaddingStylerMapper(); + ~PaddingStylerMapper(); + + public: + bool SupportMapFromXml() override { return true; } + + ClonablePtr MapStylerFromXml( + xml::XmlElementNode* node) override { + return MapFromXml(node); + } + + protected: + ClonablePtr DoMapFromXml( + xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper::style -- cgit v1.2.3