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 FUiCtrlCustomListItemFormat.h
21 * @brief This is the header file for the %CustomListItemFormat class.
23 * This header file contains the declarations of the %CustomListItemFormat class and its helper classes.
27 #ifndef _FUI_CTRL_CUSTOM_LIST_ITEM_FORMAT_H_
28 #define _FUI_CTRL_CUSTOM_LIST_ITEM_FORMAT_H_
30 #include <FBaseObject.h>
31 #include <FBaseTypes.h>
33 namespace Tizen { namespace Ui { namespace Controls
37 * @class CustomListItemFormat
38 * @brief <i> [Deprecated] </i> This class defines the common behavior of an item format of a CustomList control.
40 * @deprecated This class is deprecated. There is no need to use this class.
43 * The %CustomListItemFormat class defines the common behavior of an item format of a CustomList control.
44 * A custom list item is composed of elements, which can be texts and bitmaps.
45 * A custom list item format determines the configuration of elements of a list item
46 * and the position and the size of a custom list item.
48 * Note that %CustomListItemFormat needs to be created on a heap and it must be
49 * deleted explicitly after use. However, CustomListItem must
50 * be manually deleted because items are removed from memory by the List when
53 * Refer to CustomListItem.
56 class _OSP_EXPORT_ CustomListItemFormat
57 : public Tizen::Base::Object
62 * The object is not fully constructed after this constructor is called. @n
63 * For full construction, the CustomListItemFormat::Construct() method must be called right after calling this constructor.
65 * @brief <i> [Deprecated] </i>
66 * @deprecated This class is deprecated. There is no need to use this class.
70 CustomListItemFormat(void);
74 * This polymorphic destructor should be overridden if required. @n
75 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
77 * @brief <i> [Deprecated] </i>
78 * @deprecated This class is deprecated. There is no need to use this class.
82 virtual ~CustomListItemFormat(void);
87 * Initializes this instance of %CustomListItemFormat.
89 * @brief <i> [Deprecated] </i>
90 * @deprecated This class is deprecated. There is no need to use this class.
93 * @return An error code
94 * @exception E_SUCCESS The method is successful.
95 * @exception E_OUT_OF_MEMORY The memory is insufficient.
98 result Construct(void);
102 * Adds the %CustomListElement with bounds equal to @c rect.
104 * @brief <i> [Deprecated] </i>
105 * @deprecated This class is deprecated. There is no need to use this class.
108 * @return An error code
109 * @param[in] elementId The ID of the element
110 * @param[in] rect The bounds of the element
111 * @exception E_SUCCESS The method is successful.
112 * @exception E_SYSTEM A system error has occurred.
115 result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect);
119 * Adds the %CustomListElement with bounds equal to @c rect and size of the text @c textSize.
121 * @brief <i> [Deprecated] </i>
122 * @deprecated This class is deprecated. There is no need to use this class.
125 * @return An error code
126 * @param[in] elementId The ID of the element
127 * @param[in] rect The bounds of the element
128 * @param[in] textSize The size of the text
129 * @exception E_SUCCESS The method is successful.
130 * @exception E_SYSTEM A system error has occurred.
133 result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize);
137 * Adds the %CustomListElement with bounds equal to @c rect, specifying the size of text and the color of text.
139 * @brief <i> [Deprecated] </i>
140 * @deprecated This class is deprecated. There is no need to use this class.
143 * @return An error code
144 * @param[in] elementId The ID of the element
145 * @param[in] rect The bounds of the element
146 * @param[in] textSize The size of the text
147 * @param[in] normalTextColor The color of the text in the normal status
148 * @param[in] focusedTextColor The color of the text in the focused status
149 * @exception E_SUCCESS The method is successful.
150 * @exception E_SYSTEM A system error has occurred.
153 result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& focusedTextColor);
157 * Adds the %CustomListElement with bounds equal to @c rect, specifying the size of text and the color of text.
159 * @brief <i> [Deprecated] </i>
160 * @deprecated This class is deprecated. There is no need to use this class.
163 * @return An error code
164 * @param[in] elementId The ID of the element
165 * @param[in] rect The bounds of the element
166 * @param[in] textSize The size of the text
167 * @param[in] normalTextColor The color of the text in the normal status
168 * @param[in] focusedTextColor The color of the text in the focused status
169 * @param[in] highlightedTextColor The color of the text in the highlighted status
170 * @exception E_SUCCESS The method is successful.
171 * @exception E_SYSTEM A system error has occurred.
174 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);
178 * Gets the position and size of the element.
180 * @brief <i> [Deprecated] </i>
181 * @deprecated This class is deprecated. There is no need to use this class.
184 * @return The bounds of the element, @n
185 * else a rectangle of (0, 0, -1, -1) if there is no element matching the specified ID
186 * @param[in] elementId The ID of the element
189 Tizen::Graphics::Rectangle GetElement(int elementId) const;
193 * Gets the ID of the first element.
195 * @brief <i> [Deprecated] </i>
196 * @deprecated This class is deprecated. There is no need to use this class.
199 * @return The ID of the first element, @n
200 * else @c -1 if a system error occurs
203 int GetFirstElementId(void) const;
207 * Gets the ID of the next element of the specified element.
209 * @brief <i> [Deprecated] </i>
210 * @deprecated This class is deprecated. There is no need to use this class.
213 * @return The ID of the next element of the specified element, @n
214 * else @c -1 if there is no element next to the element specified by @c elementId
215 * @param[in] elementId The ID of the element
218 int GetNextElementId(int elementId) const;
222 * Gets the ID of the first element of all enabled items.
224 * @brief <i> [Deprecated] </i>
225 * @deprecated This class is deprecated. There is no need to use this class.
228 * @return The ID of the first enabled element, @n
229 * else @c -1 if no element is enabled
232 int GetFirstEnabledElementId(void) const;
236 * Gets the ID of the next enabled element after the specified element.
238 * @brief <i> [Deprecated] </i>
239 * @deprecated This class is deprecated. There is no need to use this class.
242 * @return The ID of the next enabled element, @n
243 * else @c -1 if no element after the specified element is enabled
244 * @param[in] elementId The ID of the element
247 int GetNextEnabledElementId(int elementId) const;
251 * Gets the ID of the previous enabled element ID of the specified element.
253 * @brief <i> [Deprecated] </i>
254 * @deprecated This class is deprecated. There is no need to use this class.
257 * @return The ID of the previous enabled element, @n
258 * else @c -1 if no element before the specified element is enabled
259 * @param[in] elementId The ID of the element
262 int GetPreviousEnabledElementId(int elementId) const;
266 * Sets the event status for the specified element.
268 * @brief <i> [Deprecated] </i>
269 * @deprecated This class is deprecated. There is no need to use this class.
272 * @param[in] elementId The ID of the element
273 * @param[in] enable Set to @c true to allow the specified element to handle the events, @n
277 void SetElementEventEnabled(int elementId, bool enable);
281 * Checks whether the event status is enabled for the specified element.
283 * @brief <i> [Deprecated] </i>
284 * @deprecated This class is deprecated. There is no need to use this class.
287 * @return @c true if the event status is enabled, @n
289 * @param[in] elementId The ID of the element
292 bool IsElementEventEnabled(int elementId);
296 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
298 CustomListItemFormat(const CustomListItemFormat& rhs);
301 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
303 CustomListItemFormat& operator =(const CustomListItemFormat& rhs);
307 class _CustomListItemFormatImpl* __pCustomListItemFormatImpl;
309 friend class _CustomListItemImpl;
310 friend class _CustomListImpl;
311 friend class _ExpandableListImpl;
312 friend class _SlidableListImpl;
313 friend class _GroupedListImpl;
314 friend class _SlidableGroupedListImpl;
315 }; //CustomListItemFormat
317 }}} //Tizen::Ui::Controls
319 #endif // _FUI_CTRL_CUSTOM_LIST_ITEM_FORMAT_H_