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 FUiCtrlCustomListItemFormat.h
20 * @brief This is the header file for the %CustomListItemFormat class.
22 * This header file contains the declarations of the %CustomListItemFormat class and its helper classes.
25 #ifndef _FUI_CTRL_CUSTOM_LIST_ITEM_FORMAT_H_
26 #define _FUI_CTRL_CUSTOM_LIST_ITEM_FORMAT_H_
28 #include <FBaseObject.h>
29 #include <FBaseTypes.h>
31 namespace Tizen { namespace Ui { namespace Controls
35 * @class CustomListItemFormat
36 * @brief <i> [Deprecated] </i> This class defines the common behavior of an item format of a CustomList control.
38 * @deprecated This class is deprecated. There is no need to use this class.
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.
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
51 * Refer to CustomListItem.
54 class _OSP_EXPORT_ CustomListItemFormat
55 : public Tizen::Base::Object
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.
62 * @brief <i> [Deprecated] </i>
63 * @deprecated This class is deprecated. There is no need to use this class.
67 CustomListItemFormat(void);
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.
73 * @brief <i> [Deprecated] </i>
74 * @deprecated This class is deprecated. There is no need to use this class.
78 virtual ~CustomListItemFormat(void);
83 * Initializes this instance of %CustomListItemFormat.
85 * @brief <i> [Deprecated] </i>
86 * @deprecated This class is deprecated. There is no need to use this class.
89 * @return An error code
90 * @exception E_SUCCESS The method is successful.
91 * @exception E_OUT_OF_MEMORY The memory is insufficient.
94 result Construct(void);
98 * Adds the %CustomListElement with bounds equal to @c rect.
100 * @brief <i> [Deprecated] </i>
101 * @deprecated This class is deprecated. There is no need to use this class.
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.
111 result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect);
115 * Adds the %CustomListElement with bounds equal to @c rect and size of the text @c textSize.
117 * @brief <i> [Deprecated] </i>
118 * @deprecated This class is deprecated. There is no need to use this class.
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.
129 result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize);
133 * Adds the %CustomListElement with bounds equal to @c rect, specifying the size of text and the color of text.
135 * @brief <i> [Deprecated] </i>
136 * @deprecated This class is deprecated. There is no need to use this class.
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.
149 result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& focusedTextColor);
153 * Adds the %CustomListElement with bounds equal to @c rect, specifying the size of text and the color of text.
155 * @brief <i> [Deprecated] </i>
156 * @deprecated This class is deprecated. There is no need to use this class.
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.
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);
174 * Gets the position and size of the element.
176 * @brief <i> [Deprecated] </i>
177 * @deprecated This class is deprecated. There is no need to use this class.
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
185 Tizen::Graphics::Rectangle GetElement(int elementId) const;
189 * Gets the ID of the first element.
191 * @brief <i> [Deprecated] </i>
192 * @deprecated This class is deprecated. There is no need to use this class.
195 * @return The ID of the first element, @n
196 * else @c -1 if a system error occurs
199 int GetFirstElementId(void) const;
203 * Gets the ID of the next element of the specified element.
205 * @brief <i> [Deprecated] </i>
206 * @deprecated This class is deprecated. There is no need to use this class.
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
214 int GetNextElementId(int elementId) const;
218 * Gets the ID of the first element of all enabled items.
220 * @brief <i> [Deprecated] </i>
221 * @deprecated This class is deprecated. There is no need to use this class.
224 * @return The ID of the first enabled element, @n
225 * else @c -1 if no element is enabled
228 int GetFirstEnabledElementId(void) const;
232 * Gets the ID of the next enabled element after the specified element.
234 * @brief <i> [Deprecated] </i>
235 * @deprecated This class is deprecated. There is no need to use this class.
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
243 int GetNextEnabledElementId(int elementId) const;
247 * Gets the ID of the previous enabled element ID of the specified element.
249 * @brief <i> [Deprecated] </i>
250 * @deprecated This class is deprecated. There is no need to use this class.
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
258 int GetPreviousEnabledElementId(int elementId) const;
262 * Sets the event status for the specified element.
264 * @brief <i> [Deprecated] </i>
265 * @deprecated This class is deprecated. There is no need to use this class.
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
273 void SetElementEventEnabled(int elementId, bool enable);
277 * Checks whether the event status is enabled for the specified element.
279 * @brief <i> [Deprecated] </i>
280 * @deprecated This class is deprecated. There is no need to use this class.
283 * @return @c true if the event status is enabled, @n
285 * @param[in] elementId The ID of the element
288 bool IsElementEventEnabled(int elementId);
292 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
294 CustomListItemFormat(const CustomListItemFormat& rhs);
297 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
299 CustomListItemFormat& operator =(const CustomListItemFormat& rhs);
303 class _CustomListItemFormatImpl* __pCustomListItemFormatImpl;
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
313 }}} //Tizen::Ui::Controls
315 #endif // _FUI_CTRL_CUSTOM_LIST_ITEM_FORMAT_H_