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                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
49                 {
50                         switch (propertyKey)
51                         {
52                                 case isVisiblePropertyKey:
53                                         m_IsVisible = CoreBoolType::deserialize(reader);
54                                         return true;
55                         }
56                         return ContainerComponent::deserialize(propertyKey, reader);
57                 }
58
59         protected:
60                 virtual void isVisibleChanged() {}
61         };
62 } // namespace rive
63
64 #endif