2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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.
20 * @file FUiCtrlCustomListItem.h
21 * @brief This is the header file for the %CustomListItem class.
23 * This header file contains the declarations of the %CustomListItem class and its helper classes.
27 #ifndef _FUI_CTRL_CUSTOM_LIST_ITEM_H_
28 #define _FUI_CTRL_CUSTOM_LIST_ITEM_H_
30 #include <FBaseObject.h>
31 #include <FBaseTypes.h>
32 #include <FUiCtrlICustomListElement.h>
34 namespace Tizen { namespace Ui { namespace Controls
36 class _CustomListItemImpl;
37 class CustomListItemFormat;
40 * @class CustomListItem
41 * @brief <i> [Deprecated] </i> This class defines the common behavior of an item of the CustomList control.
43 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class.
46 * The %CustomListItem class represents a custom list item which is the unit of
47 * handling of a custom list. A custom list item is composed of one or more elements,
48 * which can be texts and bitmaps. Custom drawable elements are also supported via
49 * ICustomListElement. The value of the elements is set using %CustomListItem.
51 * Note that %CustomListItem needs to be created on a heap. CustomListItems will be deleted automatically
52 * when the CustomList is destroyed. If you want to remove certain list items, you must use RemoveItemAt().
54 * Refer to CustomListItemFormat.
58 class _OSP_EXPORT_ CustomListItem
59 : public Tizen::Base::Object
64 * The object is not fully constructed after this constructor is called. @n
65 * For full construction, the CustomListItem::Construct() method must be called right after calling this constructor.
67 * @brief <i> [Deprecated] </i>
68 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
77 * This polymorphic destructor should be overridden if required. @n
78 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
80 * @brief <i> [Deprecated] </i>
81 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
85 virtual ~CustomListItem(void);
90 * Initializes this instance of %CustomListItem with the specified parameter.
92 * @brief <i> [Deprecated] </i>
93 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
96 * @return An error code
97 * @param[in] itemHeight The height of %CustomListItem
98 * @exception E_SUCCESS The method is successful.
99 * @exception E_SYSTEM A system error has occurred.
102 result Construct(int itemHeight);
106 * Sets the format of %CustomListItem.
108 * @brief <i> [Deprecated] </i>
109 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
112 * @param[in] itemFormat An instance of %CustomListItemFormat
113 * @remarks Do not delete @c itemFormat before the associated %CustomListItem is removed from %CustomList,
114 * because %CustomListItemFormat is constantly used while %CustomListItem is added to CustomList.
117 void SetItemFormat(const CustomListItemFormat& itemFormat);
120 * Gets the format of %CustomListItem.
124 * @return A pointer to CustomListItemFormat, @n
125 * else @c null if a system error occurs
127 const CustomListItemFormat* GetItemFormat(void) const;
131 * Sets the background bitmap image which is displayed when the item is focused.
133 * @brief <i> [Deprecated] </i>
134 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
137 * @param[in] bitmap The background bitmap image
138 * @remarks The specified bitmap is automatically scaled to the size of an associated item.
139 * @see SetNormalItemBackgroundBitmap()
142 void SetFocusedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap);
146 * Sets the background image of the item which is displayed when the item is in normal state.
148 * @brief <i> [Deprecated] </i>
149 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
152 * @param[in] bitmap The background bitmap image
153 * @remarks The specified bitmap is automatically scaled to the size of an+B6 associated item.
154 * @see SetFocusedItemBackgroudBitmap()
157 void SetNormalItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap);
161 * Sets the highlighted background image on the rectangle of each list item.
163 * @brief <i> [Deprecated] </i>
164 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
167 * @param[in] bitmap The background image
168 * @remarks When a user navigates the user interface using the directional keys, @n
169 * the selected UI control is highlighted and takes the focus.
173 void SetHighlightedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap);
177 * Sets the text of the element for %CustomListItem.
179 * @brief <i> [Deprecated] </i>
180 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
183 * @return An error code
184 * @param[in] elementId The ID of the element
185 * @param[in] text The text string to add
186 * @exception E_SUCCESS The method is successful.
187 * @exception E_SYSTEM A system error has occurred.
188 * @remarks To display text in multi-lines or to denote the end of line use '\\n'.
191 result SetElement(int elementId, const Tizen::Base::String& text);
195 * Sets the bitmap of the element for %CustomListItem.
197 * @brief <i> [Deprecated] </i>
198 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
201 * @return An error code
202 * @param[in] elementId The ID of the element
203 * @param[in] normalBitmap The bitmap displayed when the item is in the normal state
204 * @param[in] pFocusedBitmap The bitmap displayed when the item is focused
205 * @exception E_SUCCESS The method is successful.
206 * @exception E_SYSTEM A system error has occurred.
209 result SetElement(int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap);
214 * Sets the bitmap of the element for %CustomListItem.
216 * @brief <i> [Deprecated] </i>
217 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
220 * @return An error code
221 * @param[in] elementId The ID of the element
222 * @param[in] normalBitmap The bitmap displayed when the item is in the normal state
223 * @param[in] pFocusedBitmap The bitmap displayed when the item is selected
224 * @param[in] pHighlightedBitmap The bitmap displayed when the item is highlighted
225 * @exception E_SUCCESS The method is successful.
226 * @exception E_SYSTEM A system error has occurred.
229 result SetElement(int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap);
233 * Sets the custom element for %CustomListItem.
235 * @brief <i> [Deprecated] </i>
236 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
239 * @return An error code
240 * @param[in] elementId The ID of the element
241 * @param[in] element The custom element
242 * @exception E_SUCCESS The method is successful.
243 * @exception E_SYSTEM A system error has occurred.
244 * @remarks Do not delete @c element before the associated %CustomListItem is removed from CustomList, @n
245 * as ICustomListElement is constantly used while %CustomListItem is added to %CustomList. @n
246 * Call RefreshItem() to draw the custom element that has been set with this method.
249 result SetElement(int elementId, const ICustomListElement& element);
253 * Sets the element ID of the checkbox of %CustomListItem.
255 * @brief <i> [Deprecated] </i>
256 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
259 * @return An error code
260 * @param[in] elementId The ID of the element
261 * @exception E_SUCCESS The method is successful.
262 * @exception E_SYSTEM A system error has occurred.
265 result SetCheckBox(int elementId);
269 * Gets the percentage value of %CustomListItem.
271 * @brief <i> [Deprecated] </i>
272 * @deprecated This class is deprecated. Instead of using this class, use CustomItem class
275 * @return The percentage value, @n
276 * else @c -1 if a system error occurs
279 int GetValue(void) const;
283 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
285 CustomListItem(const CustomListItem& rhs);
288 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
290 CustomListItem& operator =(const CustomListItem& rhs);
294 CustomListItemFormat* __pCustomListItemFormat;
295 _CustomListItemImpl* __pCustomListItemImpl;
297 friend class _CustomListImpl;
298 friend class _CustomListItemImpl;
299 friend class _ExpandableListImpl;
300 friend class _SlidableListImpl;
301 friend class _GroupedListImpl;
302 friend class _SlidableGroupedListImpl;
303 friend class _ListImpl;
305 friend class _CustomListItemDataProvider;
306 friend class _SlidableListItemProvider;
307 friend class _ListBaseImpl;
308 friend class _GroupedListItemDataProvider;
309 friend class _ExpandableListItemDataProvider;
310 friend class _SlidableGroupedListItemProvider;
311 friend class _ListItemDataProvider;
314 }}} // Tizen::Ui::Controls
316 #endif // _FUI_CTRL_CUSTOM_LIST_ITEM_H_