update header files for Doxygen
[framework/osp/shell.git] / inc / FShellAppWidgetPopup.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        FShellAppWidgetPopup.h
20  * @brief       This is the header file for the %AppWidgetPopup class.
21  *
22  * This header file contains the declarations of the %AppWidgetPopup class.
23  */
24
25 #ifndef _FSHELL_APPWIDGET_POPUP_H_
26 #define _FSHELL_APPWIDGET_POPUP_H_
27
28 #include <FUiWindow.h>
29
30 namespace Tizen { namespace Shell
31 {
32
33 /**
34  * @class       AppWidgetPopup
35  * @brief       This class provides the popup for an AppWidgetProvider.
36  * @since       2.1
37  *
38  * The %AppWidgetPopup class supports detailed screen for an AppWidgetProvider.
39  *
40  */
41 class _OSP_EXPORT_ AppWidgetPopup
42         : public Tizen::Ui::Window
43 {
44 public:
45         /**
46          * The object is not fully constructed after this constructor is called. @n
47          * For full construction, the Construct() method must be called right after calling this constructor.
48          *
49          * @since       2.1
50          */
51         AppWidgetPopup(void);
52
53         /**
54          * This destructor overrides Tizen::Base::Object::~Object().
55          *
56          * @since       2.1
57          */
58         virtual ~AppWidgetPopup(void);
59
60         /**
61          * Initializes this instance of %AppWidgetPopup with a specified parameter.
62          *
63          * @since       2.1
64          * @feature             %http://tizen.org/feature/shell.appwidget
65          * @return      An error code
66          * @param[in]   size                            The new width and height
67          * @exception   E_SUCCESS           The method is successful.
68          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
69          * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature. @n
70          *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
71          * @remarks             Before calling this method, check whether the feature is supported by 
72          *                      Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
73          * @see AppWidgetPopupProvider::OnAppWidgetPopupProviderInitializing()
74          */
75         result Construct(const Tizen::Graphics::FloatDimension& size);
76
77         /**
78          * Initializes this instance of %AppWidgetPopup with a specified parameter.
79          *
80          * @since       2.1
81          * @feature             %http://tizen.org/feature/shell.appwidget
82          * @return      An error code
83          * @param[in]   layout                          The layout for both the portrait and landscape mode
84          * @param[in]   size                            The new width and height
85          * @exception   E_SUCCESS           The method is successful.
86          * @exception   E_INVALID_ARG           A specified input parameter is invalid.
87          * @exception   E_UNSUPPORTED_OPERATION   The Emulator or target device does not support the required feature. @n
88          *                                                                      For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
89          * @remarks             Before calling this method, check whether the feature is supported by 
90          *                      Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
91          * @see AppWidgetPopupProvider::OnAppWidgetPopupProviderInitializing()
92          */
93         result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& size);
94
95         /**
96          * Gets the bounds of the client area.
97          *
98          * @since               2.1
99          *
100          * @return              The bounds of the client area in a Tizen::Graphics::FloatRectangle instance
101          */
102         Tizen::Graphics::FloatRectangle GetClientAreaBounds(void) const;
103
104         /**
105          * Gets a graphics canvas whose bounds (position and size) are equal to the bounds of the client area of the %AppWidgetPopup instance.
106          *
107          * @since               2.1
108          *
109          * @return              The graphic canvas of the %AppWidgetPopup instance, @n
110          *                              else @c null if an error occurs
111          * @exception   E_SUCCESS                                       The method is successful.
112          * @exception   E_RESOURCE_UNAVAILABLE          The required resource is currently unavailable.
113          * @remarks
114          *                        - This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the client area of the %AppWidgetPopup instance. @n
115          *                              It is the responsibility of the developers to deallocate the canvas after use.
116          *                        - The canvas is valid only if the properties of the parent control of the canvas remain unchanged. @n
117          *                              Therefore, delete the previously allocated canvas and create a new canvas using the GetClientAreaCanvasN() method if the size or position of the
118          *                              control is changed.
119          *                        - The specific error code can be accessed using the GetLastResult() method.
120          */
121         Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;
122
123         /**
124          * Translates a specified position to the client coordinates.
125          *
126          * @since       2.1
127          *
128          * @return      The float position in relative to the top-left corner of the client area, @n
129          *                              else @c (-1.0f,-1.0f) if the instance is invalid
130          * @param[in]   controlPosition       The float position relative to the top-left corner of the %AppWidgetPopup instance
131          * @see         TranslateToControlPosition()
132          */
133         Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& controlPosition) const;
134
135         /**
136          * Translates a specified client position to the control coordinate.
137          *
138          * @since       2.1
139          *
140          * @return      The float position in relative to the top-left corner of the Popup control, @n
141          *                              else @c (-1.0f,-1.0f) if the instance is invalid
142          * @param[in]   clientPosition        The float position relative to the top-left corner of the client area
143          * @see         TranslateToClientAreaPosition()
144          */
145         Tizen::Graphics::FloatPoint TranslateToControlPosition(const Tizen::Graphics::FloatPoint& clientPosition) const;
146
147 protected:
148         //
149         // This method is for internal use only. Using this method can cause behavioral, security-related,
150         // and consistency-related issues in the application.
151         //
152         // This method is reserved and may change its name at any time without prior notice.
153         //
154         virtual void AppWidgetPopup_Reserved1(void) {}
155
156         //
157         // This method is for internal use only. Using this method can cause behavioral, security-related,
158         // and consistency-related issues in the application.
159         //
160         // This method is reserved and may change its name at any time without prior notice.
161         //
162         virtual void AppWidgetPopup_Reserved2(void) {}
163
164         //
165         // This method is for internal use only. Using this method can cause behavioral, security-related,
166         // and consistency-related issues in the application.
167         //
168         // This method is reserved and may change its name at any time without prior notice.
169         //
170         virtual void AppWidgetPopup_Reserved3(void) {}
171
172         //
173         // This method is for internal use only. Using this method can cause behavioral, security-related,
174         // and consistency-related issues in the application.
175         //
176         // This method is reserved and may change its name at any time without prior notice.
177         //
178         virtual void AppWidgetPopup_Reserved4(void) {}
179
180         //
181         // This method is for internal use only. Using this method can cause behavioral, security-related,
182         // and consistency-related issues in the application.
183         //
184         // This method is reserved and may change its name at any time without prior notice.
185         //
186         virtual void AppWidgetPopup_Reserved5(void) {}
187
188 private:
189         //
190         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
191         //
192         AppWidgetPopup(const AppWidgetPopup& rhs);
193
194         //
195         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
196         //
197         AppWidgetPopup& operator =(const AppWidgetPopup& rhs);
198 }; // AppWidgetPopup
199
200 }} // Tizen::Shell
201
202 #endif // _FSHELL_APPWIDGET_POPUP_H_