Merge "Unchecked GetCharacter func when index is over string length" into tizen_2.2
[platform/framework/native/uifw.git] / inc / FUiCtrlICustomElementF.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
19 /**
20  * @file        FUiCtrlICustomElementF.h
21  * @brief       This is the header file for the %ICustomElementF class.
22  *
23  * This header file contains the declarations of the %ICustomElementF class and its helper classes.
24  */
25
26 #ifndef _FUI_CTRL_ICUSTOM_ELEMENT_F_H_
27 #define _FUI_CTRL_ICUSTOM_ELEMENT_F_H_
28
29 #include <FBaseObject.h>
30 #include <FGrpCanvas.h>
31 #include <FUiCtrlListViewTypes.h>
32
33 namespace Tizen { namespace Ui { namespace Controls
34 {
35
36 /**
37  * @interface   ICustomElementF
38  * @brief       This interface represents the common behaviors of a custom element.
39  *
40  * @since               2.1
41  *
42  * The %ICustomElementF interface is the listener interface for custom drawing in a list item.
43  * The class that processes a custom drawing event implements this interface. The list items are added by calling the
44  * AddElement(int elementId, const %ICustomElementF &element) method. When the custom drawing event occurs and the list item must be
45  * redrawn, the OnDraw() method is invoked.
46  *
47  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
48  *
49  */
50 class _OSP_EXPORT_ ICustomElementF
51 {
52 public:
53         /**
54          * This polymorphic destructor should be overridden if required.@n
55          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
56          *
57          * @since       2.1
58          */
59         virtual ~ICustomElementF(void) {}
60
61 // Operation
62 public:
63         /**
64          * Called when a custom element of the item is drawn.
65          *
66          * @since       2.1
67          *
68          * @return      @c true if the drawing is successful, @n
69          *           else @c false
70          * @param[in] canvas      The graphic canvas of the list control
71          * @param[in] rect        The position and size of the element
72          * @param[in] status      The status of the element
73          */
74         virtual bool OnDraw(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& rect, Tizen::Ui::Controls::ListItemDrawingStatus status) = 0;
75
76 protected:
77         //
78         // The following methods are reserved and may change its name at any time without prior notice.
79         //
80         virtual void ICustomElementF_Reserved1(void) {}
81         virtual void ICustomElementF_Reserved2(void) {}
82         virtual void ICustomElementF_Reserved3(void) {}
83 }; // ICustomElementF
84
85 }}} // Tizen::Ui::Controls
86
87 #endif // _FUI_CTRL_ICUSTOM_ELEMENT_F_H_
88