1 #ifndef __DALI_WIDGET_VIEW_WIDGET_VIEW_MANAGER_H__
2 #define __DALI_WIDGET_VIEW_WIDGET_VIEW_MANAGER_H__
6 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
8 * Licensed under the Flora License, Version 1.1 (the License);
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://floralicense.org/license/
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an AS IS BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 #include <dali/public-api/object/base-handle.h>
23 #include <dali/public-api/adaptor-framework/application.h>
33 namespace Internal DALI_INTERNAL
35 class WidgetViewManager;
39 * @addtogroup dali_widget_view
44 * @brief WidgetViewManager manages addition of WidgetView controls.
46 * This class provides the functionality of adding the widget views and controlling the widgets.
50 class DALI_IMPORT_API WidgetViewManager : public BaseHandle
55 * @brief Create widget view manager.
59 * @privilege %http://tizen.org/privilege/widget.viewer
60 * @param[in] application Application class for the widget view manager.
61 * @param[in] appId App ID of app with widget viewer dali.
62 * @return A handle to WidgetViewManager.
64 static WidgetViewManager New( Application application, const std::string& appId );
67 * @brief Downcast a handle to WidgetViewManager handle.
69 * If the BaseHandle points is a WidgetViewManager the downcast returns a valid handle.
70 * If not the returned handle is left empty.
73 * @param[in] handle Handle to an object
74 * @return handle to a WidgetViewManager or an empty handle
76 static WidgetViewManager DownCast( BaseHandle handle );
79 * @brief Creates an WidgetViewManager handle.
81 * Calling member functions with an uninitialised handle is not allowed.
87 * @brief Copy constructor.
90 * @param[in] handle The handle to copy from.
92 WidgetViewManager( const WidgetViewManager& handle );
95 * @brief Assignment operator.
98 * @param[in] handle The handle to copy from.
99 * @return A reference to this.
101 WidgetViewManager& operator=( const WidgetViewManager& handle );
106 * This is non-virtual since derived Handle types must not contain data or virtual methods.
109 ~WidgetViewManager();
112 * @brief Creates a new widget view object
116 * @privilege %http://tizen.org/privilege/widget.viewer
117 * @param[in] widgetId The widget id.
118 * @param[in] contentInfo Contents that will be given to the widget instance.
119 * @param[in] width The widget width.
120 * @param[in] height The widget height.
121 * @param[in] updatePeriod The period of updating contents of the widget.
122 * @return A handle to WidgetView.
124 WidgetView AddWidget( const std::string& widgetId, const std::string& contentInfo, int width, int height, float updatePeriod );
126 public: // Not intended for application developers
130 * @brief Creates a handle using the WidgetView::Internal implementation.
133 * @param[in] implementation The WidgetViewManager implementation.
135 explicit DALI_INTERNAL WidgetViewManager( Internal::WidgetViewManager* implementation );
142 } // namespace WidgetView
146 #endif // __DALI_WIDGET_VIEW_WIDGET_VIEW_MANAGER_H__