aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/mapper/style/IStylerMapper.hpp
blob: d00f39be4c0dc3c65fdb65379f80985f25bfbf94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 CRU_UI_API 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