1 #ifndef __DALI_WIDGET_VIEW_WIDGET_VIEW_MANAGER_H__
2 #define __DALI_WIDGET_VIEW_WIDGET_VIEW_MANAGER_H__
5 * Copyright (c) 2016 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 <public_api/widget_view/widget_view.h>
25 #include <dali/public-api/object/base-handle.h>
26 #include <dali/public-api/adaptor-framework/application.h>
34 namespace Internal DALI_INTERNAL
36 class WidgetViewManager;
40 * @addtogroup dali_widget_view
45 * @brief WidgetViewManager manages addition of WidgetView controls.
47 * This class provides the functionality of adding the widget views and controlling the widgets.
51 class DALI_IMPORT_API WidgetViewManager : public BaseHandle
56 * @brief Create widget view manager.
59 * @param[in] application Application class for the widget view manager.
60 * @param[in] name Widget view manager name. It is used for socket name internally.
61 * @return A handle to WidgetViewManager.
63 static WidgetViewManager New( Application application, const std::string& name );
66 * @brief Downcast a handle to WidgetViewManager handle.
68 * If the BaseHandle points is a WidgetViewManager the downcast returns a valid handle.
69 * If not the returned handle is left empty.
72 * @param[in] handle Handle to an object
73 * @return handle to a WidgetViewManager or an empty handle
75 static WidgetViewManager DownCast( BaseHandle handle );
78 * @brief Creates an WidgetViewManager handle.
80 * Calling member functions with an uninitialised handle is not allowed.
86 * @brief Copy constructor.
89 * @param[in] handle The handle to copy from.
91 WidgetViewManager( const WidgetViewManager& handle );
94 * @brief Assignment operator.
97 * @param[in] handle The handle to copy from.
98 * @return A reference to this.
100 WidgetViewManager& operator=( const WidgetViewManager& handle );
105 * This is non-virtual since derived Handle types must not contain data or virtual methods.
108 ~WidgetViewManager();
111 * @brief Creates a new widget view object
114 * @param[in] widgetId The widget id.
115 * @param[in] contentInfo Contents that will be given to the widget instance.
116 * @param[in] width The widget width.
117 * @param[in] height The widget height.
118 * @param[in] period The period of updating contents of the widget.
119 * @return A handle to WidgetView.
121 WidgetView AddWidget( const std::string& widgetId, const std::string& contentInfo, int width, int height, double period );
123 public: // Not intended for application developers
126 * @brief Creates a handle using the WidgetView::Internal implementation.
129 * @param[in] implementation The WidgetViewManager implementation.
131 explicit DALI_INTERNAL WidgetViewManager( Internal::WidgetViewManager* implementation );
138 } // namespace WidgetView
142 #endif // __DALI_WIDGET_VIEW_WIDGET_VIEW_MANAGER_H__