Merge "Fix Ime Rotation" into tizen_2.1
[platform/framework/native/uifw.git] / inc / FUiCtrlIconListViewItem.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://floralicense.org/license/
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  * @file        FUiCtrlIconListViewItem.h
20  * @brief       This is the header file for the %IconListViewItem class.
21  *
22  * This header file contains the declarations of the %IconListViewItem class and its helper classes.
23  */
24
25 #ifndef _FUI_CTRL_ICON_LIST_VIEW_ITEM_H_
26 #define _FUI_CTRL_ICON_LIST_VIEW_ITEM_H_
27
28 //includes
29 #include <FBaseObject.h>
30 #include <FBaseString.h>
31 #include <FGrpBitmap.h>
32 #include <FUiCtrlControlsTypes.h>
33
34 namespace Tizen { namespace Ui { namespace Controls
35 {
36
37 class IconListView;
38 class _IconListItemProviderAdaptor;
39 class _IconListViewItemImpl;
40
41 /**
42  * @class       IconListViewItem
43  * @brief   This class defines the common behavior of a %IconListViewItem control.
44  *
45  * @since       2.0
46  *
47  * The %IconListViewItem class displays an IconListView item. It comprises of bitmap images and text. The value is set using the IconListView control.
48  * @n
49  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
50  */
51 class _OSP_EXPORT_ IconListViewItem
52         : public Tizen::Base::Object
53 {
54 public:
55         /**
56          * 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.
57          *
58          * @since       2.0
59          */
60         IconListViewItem(void);
61
62         /**
63          * This destructor overrides Tizen::Base::Object::~Object().
64          *
65          * @since       2.0
66          */
67         virtual ~IconListViewItem(void);
68
69 public:
70         /**
71          * Initializes this instance of %IconListViewItem with the specified parameters.
72          *
73          * @since   2.0
74          *
75          * @return      An error code
76          * @param[in] bitmap                            The default bitmap image
77          * @param[in] pText                                     The item text
78          * @param[in] pSelectedBitmap           The displayed bitmap image when an item is selected
79          * @param[in] pHighlightedBitmap        The displayed bitmap image when an item is highlighted
80          * @exception E_SUCCESS                         The method is successful.
81          * @exception E_OUT_OF_MEMORY           The memory is insufficient.
82          * @remarks     If @c pSelectedBitmap or @c pHighlightedBitmap is @c null, @c bitmap plays its role.
83          */
84         result Construct(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Base::String* pText = null, const Tizen::Graphics::Bitmap* pSelectedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null);
85
86         /**
87          * Sets the overlay bitmap image as an element to the item.
88          *
89          * @since 2.0
90          *
91          * @return     An error code
92          * @param[in] overlayBitmapId           The overlay bitmap ID
93          * @param[in] pOverlayBitmap            The pointer of the overlay bitmap image
94          * @param[in] horizontalAlignment       The horizontal alignment of overlay bitmap.
95          * @param[in] verticalAlignment         The vertical alignment of overlay bitmap.
96          * @exception E_SUCCESS             The method is successful.
97          * @exception E_INVALID_ARG         A specified input parameter is invalid.
98          * @exception E_SYSTEM              A system error has occurred.
99          * @remarks     When @c pOverlayBitmap is set as @c null, The overlay bitmap of the specified location will be erased.
100          */
101         result SetOverlayBitmap(int overlayBitmapId, const Tizen::Graphics::Bitmap* pOverlayBitmap, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment);
102
103 private:
104         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
105         IconListViewItem(const IconListViewItem& rhs);
106
107         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
108         IconListViewItem& operator =(const IconListViewItem& rhs);
109
110 private:
111         friend class IconListView;
112         friend class _IconListItemProviderAdaptor;
113         friend class _IconListViewItemImpl;
114
115         // This value is for internal use only. Using this method can cause behavioral, security-related,
116         // and consistency-related issues in the application.
117         _IconListViewItemImpl* __pImpl;
118 }; //IconListViewItem
119
120 }}} // Tizen::Ui::Controls
121
122 #endif // _FUI_CTRL_ICON_LIST_VIEW_ITEM_H_