aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/mapper/style/IStylerMapper.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-24 18:28:25 +0800
committercrupest <crupest@outlook.com>2022-01-24 18:28:25 +0800
commit549b072d241a8d2d1ca187bba8c1cb5190dd737e (patch)
tree1058514562df4a43df89982e63984a49d5fef79e /include/cru/ui/mapper/style/IStylerMapper.hpp
parent7a95d9af36221f36402495513c3563c5dc2163ad (diff)
downloadcru-549b072d241a8d2d1ca187bba8c1cb5190dd737e.tar.gz
cru-549b072d241a8d2d1ca187bba8c1cb5190dd737e.tar.bz2
cru-549b072d241a8d2d1ca187bba8c1cb5190dd737e.zip
...
Diffstat (limited to 'include/cru/ui/mapper/style/IStylerMapper.hpp')
-rw-r--r--include/cru/ui/mapper/style/IStylerMapper.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/cru/ui/mapper/style/IStylerMapper.hpp b/include/cru/ui/mapper/style/IStylerMapper.hpp
new file mode 100644
index 00000000..03ee4289
--- /dev/null
+++ b/include/cru/ui/mapper/style/IStylerMapper.hpp
@@ -0,0 +1,17 @@
+#pragma once
+#include "../../Base.hpp"
+#include "cru/common/ClonablePtr.hpp"
+#include "cru/ui/mapper/Mapper.hpp"
+#include "cru/ui/style/Styler.hpp"
+#include "cru/xml/XmlNode.hpp"
+
+namespace cru::ui::mapper::style {
+struct IStylerMapper : virtual Interface {
+ bool XmlElementIsOfThisType(xml::XmlElementNode* node) {
+ return dynamic_cast<MapperBase*>(this)->XmlElementIsOfThisType(node);
+ }
+
+ virtual ClonablePtr<ui::style::Styler> MapStylerFromXml(
+ xml::XmlElementNode* node) = 0;
+};
+} // namespace cru::ui::mapper::style