up-to-date submodule(rive-cpp)
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / shapes / paint / shape_paint_base.hpp
1 #ifndef _RIVE_SHAPE_PAINT_BASE_HPP_
2 #define _RIVE_SHAPE_PAINT_BASE_HPP_
3 #include "container_component.hpp"
4 #include "core/field_types/core_bool_type.hpp"
5 namespace rive
6 {
7         class ShapePaintBase : public ContainerComponent
8         {
9         protected:
10                 typedef ContainerComponent Super;
11
12         public:
13                 static const uint16_t typeKey = 21;
14
15                 /// Helper to quickly determine if a core object extends another without
16                 /// RTTI at runtime.
17                 bool isTypeOf(uint16_t typeKey) const override
18                 {
19                         switch (typeKey)
20                         {
21                                 case ShapePaintBase::typeKey:
22                                 case ContainerComponentBase::typeKey:
23                                 case ComponentBase::typeKey:
24                                         return true;
25                                 default:
26                                         return false;
27                         }
28                 }
29
30                 uint16_t coreType() const override { return typeKey; }
31
32                 static const uint16_t isVisiblePropertyKey = 41;
33
34         private:
35                 bool m_IsVisible = true;
36         public:
37                 inline bool isVisible() const { return m_IsVisible; }
38                 void isVisible(bool value)
39                 {
40                         if (m_IsVisible == value)
41                         {
42                                 return;
43                         }
44                         m_IsVisible = value;
45                         isVisibleChanged();
46                 }
47
48                 void copy(const ShapePaintBase& object)
49                 {
50                         m_IsVisible = object.m_IsVisible;
51                         ContainerComponent::copy(object);
52                 }
53
54                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
55                 {
56                         switch (propertyKey)
57                         {
58                                 case isVisiblePropertyKey:
59                                         m_IsVisible = CoreBoolType::deserialize(reader);
60                                         return true;
61                         }
62                         return ContainerComponent::deserialize(propertyKey, reader);
63                 }
64
65         protected:
66                 virtual void isVisibleChanged() {}
67         };
68 } // namespace rive
69
70 #endif