diff options
author | crupest <crupest@outlook.com> | 2022-01-22 22:37:24 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-01-22 22:37:24 +0800 |
commit | 13860c88910c00478abe3001cc80125e76767381 (patch) | |
tree | 507f517467a4e3c851f87a1158f751c38d8644be /include/cru/ui/mapper/CursorMapper.hpp | |
parent | 14d9efc39635dab2c6c0f791d6b0a63c92d941ee (diff) | |
download | cru-13860c88910c00478abe3001cc80125e76767381.tar.gz cru-13860c88910c00478abe3001cc80125e76767381.tar.bz2 cru-13860c88910c00478abe3001cc80125e76767381.zip |
...
Diffstat (limited to 'include/cru/ui/mapper/CursorMapper.hpp')
-rw-r--r-- | include/cru/ui/mapper/CursorMapper.hpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/cru/ui/mapper/CursorMapper.hpp b/include/cru/ui/mapper/CursorMapper.hpp index b4254061..6cb61d87 100644 --- a/include/cru/ui/mapper/CursorMapper.hpp +++ b/include/cru/ui/mapper/CursorMapper.hpp @@ -1,5 +1,21 @@ #pragma once #include "Mapper.hpp" #include "cru/platform/gui/Cursor.hpp" +#include "cru/xml/XmlNode.hpp" -namespace cru::ui::mapper::style {} +namespace cru::ui::mapper { +class CRU_UI_API CursorMapper : public BasicRefMapper<platform::gui::ICursor> { + public: + CRU_DEFAULT_CONSTRUCTOR_DESTRUCTOR(CursorMapper); + + public: + bool SupportMapFromString() override { return true; } + bool SupportMapFromXml() override { return true; } + bool XmlElementIsOfThisType(xml::XmlElementNode* node) override; + + protected: + std::shared_ptr<platform::gui::ICursor> DoMapFromString(String str) override; + std::shared_ptr<platform::gui::ICursor> DoMapFromXml( + xml::XmlElementNode* node) override; +}; +} // namespace cru::ui::mapper |