1 #ifndef DALI_CANVAS_RENDERER_DRAWABLE_GROUP_H
2 #define DALI_CANVAS_RENDERER_DRAWABLE_GROUP_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-handle.h>
25 #include <dali/devel-api/adaptor-framework/canvas-renderer-drawable.h>
26 #include <dali/devel-api/adaptor-framework/canvas-renderer.h>
27 #include <dali/public-api/dali-adaptor-common.h>
32 * @addtogroup dali_adaptor_framework
36 namespace Internal DALI_INTERNAL
42 } // namespace Adaptor
43 } // namespace DALI_INTERNAL
46 * @brief A class that holds many Drawable object. As a whole they can be transformed, their transparency can be changed.
48 class DALI_ADAPTOR_API CanvasRenderer::DrawableGroup : public CanvasRenderer::Drawable
52 * @brief Creates an initialized handle to a new CanvasRenderer::DrawableGroup.
53 * @return A handle to a newly allocated DrawableGroup
55 static DrawableGroup New();
59 * @brief Creates an empty handle. Use CanvasRenderer::DrawableGroup::New() to create an initialized object.
69 * @brief This copy constructor is required for (smart) pointer semantics.
71 * @param[in] handle A reference to the copied handle
73 DrawableGroup(const DrawableGroup& handle) = default;
77 * @brief Add drawable object to the DrawableGroup. This method is similar to registration.
78 * @param[in] drawable The drawable object.
79 * @return Returns True when it's successful. False otherwise.
81 bool AddDrawable(Drawable& drawable);
84 * @brief Clears the drawable object added to the DrawableGroup. This method does not free the memory of the added drawable object.
85 * @return Returns True when it's successful. False otherwise.
89 public: // Not intended for application developers
92 * @brief The constructor.
93 * @note Not intended for application developers.
95 * @param[in] pointer A pointer to a newly allocated CanvasRenderer::DrawableGroup
97 explicit DALI_INTERNAL DrawableGroup(Internal::Adaptor::DrawableGroup* impl);
106 #endif // DALI_CANVAS_RENDERER_DRAWABLE_GROUP_H