1 #ifndef _RIVE_NESTED_ARTBOARD_BASE_HPP_
2 #define _RIVE_NESTED_ARTBOARD_BASE_HPP_
3 #include "rive/core/field_types/core_uint_type.hpp"
4 #include "rive/drawable.hpp"
6 class NestedArtboardBase : public Drawable {
8 typedef Drawable Super;
11 static const uint16_t typeKey = 92;
13 /// Helper to quickly determine if a core object extends another without RTTI
15 bool isTypeOf(uint16_t typeKey) const override {
17 case NestedArtboardBase::typeKey:
18 case DrawableBase::typeKey:
19 case NodeBase::typeKey:
20 case TransformComponentBase::typeKey:
21 case WorldTransformComponentBase::typeKey:
22 case ContainerComponentBase::typeKey:
23 case ComponentBase::typeKey:
30 uint16_t coreType() const override { return typeKey; }
32 static const uint16_t artboardIdPropertyKey = 197;
35 uint32_t m_ArtboardId = -1;
38 inline uint32_t artboardId() const { return m_ArtboardId; }
39 void artboardId(uint32_t value) {
40 if (m_ArtboardId == value) {
47 Core* clone() const override;
48 void copy(const NestedArtboardBase& object) {
49 m_ArtboardId = object.m_ArtboardId;
50 Drawable::copy(object);
53 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override {
54 switch (propertyKey) {
55 case artboardIdPropertyKey:
56 m_ArtboardId = CoreUintType::deserialize(reader);
59 return Drawable::deserialize(propertyKey, reader);
63 virtual void artboardIdChanged() {}