Merge "Fix Ime Rotation" into tizen_2.1
[platform/framework/native/uifw.git] / inc / FUiCtrlCustomListItemFormat.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        FUiCtrlCustomListItemFormat.h
20  * @brief       This is the header file for the %CustomListItemFormat class.
21  *
22  * This header file contains the declarations of the %CustomListItemFormat class and its helper classes.
23  */
24
25 #ifndef _FUI_CTRL_CUSTOM_LIST_ITEM_FORMAT_H_
26 #define _FUI_CTRL_CUSTOM_LIST_ITEM_FORMAT_H_
27
28 #include <FBaseObject.h>
29 #include <FBaseTypes.h>
30
31 namespace Tizen { namespace Ui { namespace Controls
32 {
33 /**
34  * @if OSPDEPREC
35  * @class       CustomListItemFormat
36  * @brief               <i> [Deprecated] </i> This class defines the common behavior of an item format of a CustomList control.
37  *
38  * @deprecated  This class is deprecated. There is no need to use this class.
39  * @since               2.0
40  *
41  * The %CustomListItemFormat class defines the common behavior of an item format of a CustomList control.
42  * A custom list item is composed of elements, which can be texts and bitmaps.
43  * A custom list item format determines the configuration of elements of a list item
44  * and the position and the size of a custom list item.
45  *
46  * Note that %CustomListItemFormat needs to be created on a heap and it must be
47  * deleted explicitly after use. However, CustomListItem must
48  * be manually deleted because items are removed from memory by the List when
49  * it is destroyed.
50  *
51  * Refer to CustomListItem.
52  * @endif
53  */
54 class _OSP_EXPORT_ CustomListItemFormat
55         : public Tizen::Base::Object
56 {
57 public:
58         /**
59          * @if OSPDEPREC
60          * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
61          *
62          * @brief               <i> [Deprecated] </i>
63          * @deprecated  This class is deprecated. There is no need to use this class.
64          * @since               2.0
65          * @endif
66          */
67         CustomListItemFormat(void);
68
69         /**
70          * @if OSPDEPREC
71          * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
72          *
73          * @brief               <i> [Deprecated] </i>
74          * @deprecated  This class is deprecated. There is no need to use this class.
75          * @since               2.0
76          * @endif
77          */
78         virtual ~CustomListItemFormat(void);
79
80 public:
81         /**
82          * @if OSPDEPREC
83          * Initializes this instance of %CustomListItemFormat.
84          *
85          * @brief               <i> [Deprecated] </i>
86          * @deprecated  This class is deprecated. There is no need to use this class.
87          * @since                       2.0
88          *
89          * @return              An error code
90          * @exception   E_SUCCESS                       The method is successful.
91          * @exception   E_OUT_OF_MEMORY     The memory is insufficient.
92          * @endif
93          */
94         result Construct(void);
95
96         /**
97          * @if OSPDEPREC
98          * Adds the %CustomListElement with bounds equal to @c rect.
99          *
100          * @brief               <i> [Deprecated] </i>
101          * @deprecated  This class is deprecated. There is no need to use this class.
102          * @since                       2.0
103          *
104          * @return              An error code
105          * @param[in]   elementId        The ID of the element
106          * @param[in]   rect    The bounds of the element
107          * @exception   E_SUCCESS               The method is successful.
108          * @exception   E_SYSTEM        A system error has occurred.
109          * @endif
110          */
111         result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect);
112
113         /**
114          * @if OSPDEPREC
115          * Adds the %CustomListElement with bounds equal to @c rect and size of the text @c textSize.
116          *
117          * @brief               <i> [Deprecated] </i>
118          * @deprecated  This class is deprecated. There is no need to use this class.
119          * @since                       2.0
120          *
121          * @return              An error code
122          * @param[in]   elementId               The ID of the element
123          * @param[in]   rect                    The bounds of the element
124          * @param[in]   textSize                The size of the text
125          * @exception   E_SUCCESS               The method is successful.
126          * @exception   E_SYSTEM        A system error has occurred.
127          * @endif
128          */
129         result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize);
130
131         /**
132          * @if OSPDEPREC
133          * Adds the %CustomListElement with bounds equal to @c rect, specifying the size of text and the color of text.
134          *
135          * @brief               <i> [Deprecated] </i>
136          * @deprecated  This class is deprecated. There is no need to use this class.
137          * @since     2.0
138          *
139          * @return    An error code
140          * @param[in] elementId          The ID of the element
141          * @param[in] rect               The bounds of the element
142          * @param[in] textSize           The size of the text
143          * @param[in] normalTextColor    The color of the text in the normal status
144          * @param[in] focusedTextColor   The color of the text in the focused status
145          * @exception   E_SUCCESS          The method is successful.
146          * @exception   E_SYSTEM           A system error has occurred.
147          * @endif
148          */
149         result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& focusedTextColor);
150
151         /**
152          * @if OSPDEPREC
153          * Adds the %CustomListElement with bounds equal to @c rect, specifying the size of text and the color of text.
154          *
155          * @brief               <i> [Deprecated] </i>
156          * @deprecated  This class is deprecated. There is no need to use this class.
157          * @since     2.0
158          *
159          * @return    An error code
160          * @param[in] elementId              The ID of the element
161          * @param[in] rect                   The bounds of the element
162          * @param[in] textSize               The size of the text
163          * @param[in] normalTextColor        The color of the text in the normal status
164          * @param[in] focusedTextColor       The color of the text in the focused status
165          * @param[in] highlightedTextColor   The color of the text in the highlighted status
166          * @exception   E_SUCCESS              The method is successful.
167          * @exception   E_SYSTEM               A system error has occurred.
168          * @endif
169          */
170         result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& focusedTextColor, const Tizen::Graphics::Color& highlightedTextColor);
171
172         /**
173          * @if OSPDEPREC
174          * Gets the position and size of the element.
175          *
176          * @brief               <i> [Deprecated] </i>
177          * @deprecated  This class is deprecated. There is no need to use this class.
178          * @since                       2.0
179          *
180          * @return              The bounds of the element, @n
181          *                              else a rectangle of (0, 0, -1, -1) if there is no element matching the specified ID
182          * @param[in]   elementId        The ID of the element
183          * @endif
184          */
185         Tizen::Graphics::Rectangle GetElement(int elementId) const;
186
187         /**
188          * @if OSPDEPREC
189          * Gets the ID of the first element.
190          *
191          * @brief               <i> [Deprecated] </i>
192          * @deprecated  This class is deprecated. There is no need to use this class.
193          * @since               2.0
194          *
195          * @return      The ID of the first element, @n
196          *              else @c -1 if a system error occurs
197          * @endif
198          */
199         int GetFirstElementId(void) const;
200
201         /**
202          * @if OSPDEPREC
203          * Gets the ID of the next element of the specified element.
204          *
205          * @brief               <i> [Deprecated] </i>
206          * @deprecated  This class is deprecated. There is no need to use this class.
207          * @since               2.0
208          *
209          * @return      The ID of the next element of the specified element, @n
210          *              else @c -1 if there is no element next to the element specified by @c elementId
211          * @param[in] elementId         The ID of the element
212          * @endif
213          */
214         int GetNextElementId(int elementId) const;
215
216         /**
217          * @if OSPDEPREC
218          * Gets the ID of the first element of all enabled items.
219          *
220          * @brief               <i> [Deprecated] </i>
221          * @deprecated  This class is deprecated. There is no need to use this class.
222          * @since               2.0
223          *
224          * @return              The ID of the first enabled element, @n
225          *                              else @c -1 if no element is enabled
226          * @endif
227          */
228         int GetFirstEnabledElementId(void) const;
229
230         /**
231          * @if OSPDEPREC
232          * Gets the ID of the next enabled element after the specified element.
233          *
234          * @brief               <i> [Deprecated] </i>
235          * @deprecated  This class is deprecated. There is no need to use this class.
236          * @since               2.0
237          *
238          * @return              The ID of the next enabled element, @n
239          *                              else @c -1 if no element after the specified element is enabled
240          * @param[in] elementId         The ID of the element
241          * @endif
242          */
243         int GetNextEnabledElementId(int elementId) const;
244
245         /**
246          * @if OSPDEPREC
247          * Gets the ID of the previous enabled element ID of the specified element.
248          *
249          * @brief               <i> [Deprecated] </i>
250          * @deprecated  This class is deprecated. There is no need to use this class.
251          * @since               2.0
252          *
253          * @return              The ID of the previous enabled element, @n
254          *                              else @c -1 if no element before the specified element is enabled
255          * @param[in] elementId         The ID of the element
256          * @endif
257          */
258         int GetPreviousEnabledElementId(int elementId) const;
259
260         /**
261          * @if OSPDEPREC
262          * Sets the event status for the specified element.
263          *
264          * @brief               <i> [Deprecated] </i>
265          * @deprecated  This class is deprecated. There is no need to use this class.
266          * @since                       2.0
267          *
268          * @param[in] elementId         The ID of the element
269          * @param[in]   enable          Set to @c true to allow the specified element to handle the events, @n
270          *                              else @c false
271          * @endif
272          */
273         void SetElementEventEnabled(int elementId, bool enable);
274
275         /**
276          * @if OSPDEPREC
277          * Checks whether the event status is enabled for the specified element.
278          *
279          * @brief               <i> [Deprecated] </i>
280          * @deprecated  This class is deprecated. There is no need to use this class.
281          * @since                       2.0
282          *
283          * @return              @c true if the event status is enabled, @n
284          *                              else @c false
285          * @param[in] elementId         The ID of the element
286          * @endif
287          */
288         bool IsElementEventEnabled(int elementId);
289
290 private:
291         //
292         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
293         //
294         CustomListItemFormat(const CustomListItemFormat& rhs);
295
296         //
297         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
298         //
299         CustomListItemFormat& operator =(const CustomListItemFormat& rhs);
300
301 private:
302
303         class _CustomListItemFormatImpl* __pCustomListItemFormatImpl;
304
305         friend class _CustomListItemImpl;
306         friend class _CustomListImpl;
307         friend class _ExpandableListImpl;
308         friend class _SlidableListImpl;
309         friend class _GroupedListImpl;
310         friend class _SlidableGroupedListImpl;
311 }; //CustomListItemFormat
312
313 }}} //Tizen::Ui::Controls
314
315 #endif // _FUI_CTRL_CUSTOM_LIST_ITEM_FORMAT_H_