Fix for klockwork minor issues.
[platform/framework/native/uifw.git] / inc / FUiCtrlICustomListElement.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0/
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  * @if OSPDEPREC
19  * @file        FUiCtrlICustomListElement.h
20  * @brief       This is the header file for the %ICustomListElement interface.
21  *
22  * This header files contains the declarations of %ICustomListElement interface.
23  * @endif
24  */
25
26 #ifndef _FUI_CTRL_ICUSTOM_LIST_ELEMENT_H_
27 #define _FUI_CTRL_ICUSTOM_LIST_ELEMENT_H_
28
29 //includes
30 #include <FGrpCanvas.h>
31
32 namespace Tizen { namespace Ui { namespace Controls
33 {
34
35 /**
36  * @if OSPDEPREC
37  * @enum        CustomListItemStatus
38  *
39  * Defines the value of status of the CustomList item.
40  *
41  * @brief <i> [Deprecated]  </i>
42  * @deprecated This enum is deprecated. Instead of using this enum, use the ListItemStatus enumeration.
43  * @since   2.0
44  * @endif
45  */
46 enum CustomListItemStatus
47 {
48         CUSTOM_LIST_ITEM_STATUS_NORMAL = 0,     /**< @if OSPDEPREC The status of the item is normal @endif */
49         CUSTOM_LIST_ITEM_STATUS_SELECTED,       /**< @if OSPDEPREC The status of the item is selected @endif */
50         CUSTOM_LIST_ITEM_STATUS_FOCUSED         /**< @if OSPDEPREC The status of the item is focused @endif */
51 };
52
53 /**
54  * @if OSPDEPREC
55  * @interface   ICustomListElement
56  * @brief       <i> [Deprecated] </i> This interface represents the common behaviors for a CustomList element.
57  *
58  * @deprecated  This class is deprecated. Instead of using this class, use the ICustomElement class.
59  * @since               2.0
60  *
61  *
62  * The %ICustomListElement interface provides interfaces used for custom drawing
63  * in a custom list item.
64  *
65  * If an application wants to draw its own contents in a custom list item, it must
66  * implement %ICustomListElement and add elements by calling SetElement(int elementId,
67  * const %ICustomListElement &element). When the custom list item needs to be redrawn,
68  * DrawElement() is called by the framework.
69  * @endif
70  */
71 class _OSP_EXPORT_ ICustomListElement
72         : public Tizen::Base::Object
73 {
74 public:
75         /**
76          * @if OSPDEPREC
77          * This is the destructor for this class.
78          *
79          * @brief       <i> [Deprecated] </i>
80          * @deprecated  This class is deprecated. Instead of using this class, use the ICustomElement class.
81          * @since               2.0
82          * @endif
83          */
84         virtual ~ICustomListElement(void) {}
85
86 // Operation
87 public:
88         /**
89          * @if OSPDEPREC
90          * Draws a custom element of the item.
91          *
92          * @brief       <i> [Deprecated] </i>
93          * @deprecated  This class is deprecated. Instead of using this class, use the ICustomElement class.
94          * @since                       2.0
95          *
96          * @return              An error code
97          * @param[in]   canvas          The graphic canvas of the list control
98          * @param[in] rect        The location and size of the CustomList element
99          * @param[in]   itemStatus      The status of the item
100          * @exception   E_SUCCESS       The method is successful.
101          * @exception   E_SYSTEM        A system error has occurred.
102          * @endif
103          */
104         virtual result DrawElement(const Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::Rectangle& rect, CustomListItemStatus itemStatus) = 0;
105 }; //ICustomListElement
106 }}} //Tizen::Ui::Controls
107 #endif // _FUI_CTRL_ICUSTOM_LIST_ELEMENT_H_