1 #ifndef DALI_INTERNAL_DRAWABLE_GROUP_IMPL_H
2 #define DALI_INTERNAL_DRAWABLE_GROUP_IMPL_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/object/base-object.h>
26 #include <dali/devel-api/adaptor-framework/canvas-renderer-drawable-group.h>
27 #include <dali/internal/canvas-renderer/common/drawable-impl.h>
36 * Dali internal DrawableGroup.
38 class DrawableGroup : public Internal::Adaptor::Drawable
42 * @brief List of drawables.
44 using DrawableVector = std::vector<Dali::CanvasRenderer::Drawable>;
54 ~DrawableGroup() override;
57 * @copydoc Dali::CanvasRenderer::DrawableGroup::AddDrawable()
59 virtual bool AddDrawable(Dali::CanvasRenderer::Drawable& drawable);
62 * @copydoc Dali::CanvasRenderer::DrawableGroup::Clear()
67 * @brief Get list of drawables that added this group.
68 * @return Returns list of drawables.
70 virtual DrawableVector GetDrawables() const;
72 DrawableGroup(const DrawableGroup&) = delete;
73 DrawableGroup& operator=(DrawableGroup&) = delete;
74 DrawableGroup(DrawableGroup&&) = delete;
75 DrawableGroup& operator=(DrawableGroup&&) = delete;
78 } // namespace Adaptor
80 } // namespace Internal
82 inline static Internal::Adaptor::DrawableGroup& GetImplementation(Dali::CanvasRenderer::DrawableGroup& drawablegroup)
84 DALI_ASSERT_ALWAYS(drawablegroup && "DrawableGroup handle is empty.");
86 BaseObject& handle = drawablegroup.GetBaseObject();
88 return static_cast<Internal::Adaptor::DrawableGroup&>(handle);
91 inline static const Internal::Adaptor::DrawableGroup& GetImplementation(const Dali::CanvasRenderer::DrawableGroup& drawablegroup)
93 DALI_ASSERT_ALWAYS(drawablegroup && "DrawableGroup handle is empty.");
95 const BaseObject& handle = drawablegroup.GetBaseObject();
97 return static_cast<const Internal::Adaptor::DrawableGroup&>(handle);
102 #endif // DALI_INTERNAL_DRAWABLE_GROUP_IMPL_H