2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
19 * @file FUiCtrlCustomListItem.h
20 * @brief This is the header file for the %CustomListItem class.
22 * This header file contains the declarations of the %CustomListItem class and its helper classes.
25 #ifndef _FUI_CTRL_CUSTOM_LIST_ITEM_H_
26 #define _FUI_CTRL_CUSTOM_LIST_ITEM_H_
28 #include <FBaseObject.h>
29 #include <FBaseTypes.h>
30 #include <FUiCtrlICustomListElement.h>
32 namespace Tizen { namespace Ui { namespace Controls
34 class _CustomListItemImpl;
35 class CustomListItemFormat;
38 * @class CustomListItem
39 * @brief <i> [Deprecated] </i> This class defines the common behavior of an item of the CustomList control.
41 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
44 * The %CustomListItem class represents a custom list item which is the unit of
45 * handling of a custom list. A custom list item is composed of one or more elements,
46 * which can be texts and bitmaps. Custom drawable elements are also supported via
47 * ICustomListElement. The value of the elements is set using %CustomListItem.
49 * Note that %CustomListItem needs to be created on a heap. CustomListItems will be deleted automatically
50 * when the CustomList is destroyed. If you want to remove certain list items, you must use RemoveItemAt().
52 * Refer to CustomListItemFormat.
56 class _OSP_EXPORT_ CustomListItem
57 : public Tizen::Base::Object
62 * 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.
64 * @brief <i> [Deprecated] </i>
65 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
74 * 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.
76 * @brief <i> [Deprecated] </i>
77 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
81 virtual ~CustomListItem(void);
86 * Initializes this instance of %CustomListItem with the specified parameter.
88 * @brief <i> [Deprecated] </i>
89 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
92 * @return An error code
93 * @param[in] itemHeight The height of %CustomListItem
94 * @exception E_SUCCESS The method is successful.
95 * @exception E_SYSTEM A system error has occurred.
98 result Construct(int itemHeight);
102 * Sets the format of %CustomListItem.
104 * @brief <i> [Deprecated] </i>
105 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
108 * @param[in] itemFormat An instance of %CustomListItemFormat
109 * @remarks Do not delete @c itemFormat before the associated %CustomListItem is removed from %CustomList, because %CustomListItemFormat is constantly
110 * used while %CustomListItem is added to CustomList.
113 void SetItemFormat(const CustomListItemFormat& itemFormat);
116 * Gets the format of %CustomListItem.
120 * @return A pointer to CustomListItemFormat, @n
121 * else @c null if a system error occurs
123 const CustomListItemFormat* GetItemFormat(void) const;
127 * Sets the background bitmap image which is displayed when the item is focused.
129 * @brief <i> [Deprecated] </i>
130 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
133 * @param[in] bitmap The background bitmap image
134 * @remarks The specified bitmap is automatically scaled to the size of an associated item.
135 * @see SetNormalItemBackgroundBitmap()
138 void SetFocusedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap);
142 * Sets the background image of the item which is displayed when the item is in normal state.
144 * @brief <i> [Deprecated] </i>
145 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
148 * @param[in] bitmap The background bitmap image
149 * @remarks The specified bitmap is automatically scaled to the size of an+B6 associated item.
150 * @see SetFocusedItemBackgroudBitmap()
153 void SetNormalItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap);
157 * Sets the highlighted background image on the rectangle of each list item.
159 * @brief <i> [Deprecated] </i>
160 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
163 * @param[in] bitmap The background image
164 * @remarks When a user navigates the user interface using the directional keys, @n
165 * the selected UI control is highlighted and takes the focus.
169 void SetHighlightedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap);
173 * Sets the text of the element for %CustomListItem.
175 * @brief <i> [Deprecated] </i>
176 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
179 * @return An error code
180 * @param[in] elementId The ID of the element
181 * @param[in] text The text string to be added
182 * @exception E_SUCCESS The method is successful.
183 * @exception E_SYSTEM A system error has occurred.
184 * @remarks To display text in multi-lines or to denote the end of line use '\\n'.
187 result SetElement(int elementId, const Tizen::Base::String& text);
191 * Sets the bitmap of the element for %CustomListItem.
193 * @brief <i> [Deprecated] </i>
194 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
197 * @return An error code
198 * @param[in] elementId The ID of the element
199 * @param[in] normalBitmap The bitmap displayed when the item is in the normal state
200 * @param[in] pFocusedBitmap The bitmap displayed when the item is focused
201 * @exception E_SUCCESS The method is successful.
202 * @exception E_SYSTEM A system error has occurred.
205 result SetElement(int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap);
210 * Sets the bitmap of the element for %CustomListItem.
212 * @brief <i> [Deprecated] </i>
213 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
216 * @return An error code
217 * @param[in] elementId The ID of the element
218 * @param[in] normalBitmap The bitmap displayed when the item is in the normal state
219 * @param[in] pFocusedBitmap The bitmap displayed when the item is selected
220 * @param[in] pHighlightedBitmap The bitmap displayed when the item is highlighted
221 * @exception E_SUCCESS The method is successful.
222 * @exception E_SYSTEM A system error has occurred.
225 result SetElement(int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
229 * Sets the custom element for %CustomListItem.
231 * @brief <i> [Deprecated] </i>
232 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
235 * @return An error code
236 * @param[in] elementId The ID of the element
237 * @param[in] element The custom element
238 * @exception E_SUCCESS The method is successful.
239 * @exception E_SYSTEM A system error has occurred.
240 * @remarks Do not delete @c element before the associated %CustomListItem is removed from CustomList, @n
241 * as ICustomListElement is constantly used while %CustomListItem is added to %CustomList. @n
242 * Call RefreshItem() to draw the custom element that has been set with this method.
245 result SetElement(int elementId, const ICustomListElement& element);
249 * Sets the element ID of the checkbox of %CustomListItem.
251 * @brief <i> [Deprecated] </i>
252 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
255 * @return An error code
256 * @param[in] elementId The ID of the element
257 * @exception E_SUCCESS The method is successful.
258 * @exception E_SYSTEM A system error has occurred.
261 result SetCheckBox(int elementId);
265 * Sets the percent value of %CustomListItem.
267 * @brief <i> [Deprecated] </i>
268 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
271 * @return An error code
272 * @param[in] value The percent value of %CustomListItem @n
273 * The valid range of integers is from @c 0 to @c 100
274 * @exception E_SUCCESS The method is successful.
275 * @exception E_SYSTEM A system error has occurred.
278 result SetValue(int value);
282 * Gets the percentage value of %CustomListItem.
284 * @brief <i> [Deprecated] </i>
285 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
288 * @return The percentage value, @n
289 * else @c -1 if a system error occurs
292 int GetValue(void) const;
296 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
298 CustomListItem(const CustomListItem& rhs);
301 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
303 CustomListItem& operator =(const CustomListItem& rhs);
307 CustomListItemFormat* __pCustomListItemFormat;
308 _CustomListItemImpl* __pCustomListItemImpl;
310 friend class _CustomListImpl;
311 friend class _CustomListItemImpl;
312 friend class _ExpandableListImpl;
313 friend class _SlidableListImpl;
314 friend class _GroupedListImpl;
315 friend class _SlidableGroupedListImpl;
316 friend class _ListImpl;
318 friend class _CustomListItemDataProvider;
319 friend class _SlidableListItemProvider;
320 friend class _ListBaseImpl;
321 friend class _GroupedListItemDataProvider;
322 friend class _ExpandableListItemDataProvider;
323 friend class _SlidableGroupedListItemProvider;
324 friend class _ListItemDataProvider;
327 }}} // Tizen::Ui::Controls
329 #endif // _FUI_CTRL_CUSTOM_LIST_ITEM_H_