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 FUiCtrlIconListViewItem.h
20 * @brief This is the header file for the %IconListViewItem class.
22 * This header file contains the declarations of the %IconListViewItem class and its helper classes.
25 #ifndef _FUI_CTRL_ICON_LIST_VIEW_ITEM_H_
26 #define _FUI_CTRL_ICON_LIST_VIEW_ITEM_H_
29 #include <FBaseObject.h>
30 #include <FBaseString.h>
31 #include <FGrpBitmap.h>
32 #include <FUiCtrlControlsTypes.h>
34 namespace Tizen { namespace Ui { namespace Controls
38 class _IconListItemProviderAdaptor;
39 class _IconListViewItemImpl;
42 * @class IconListViewItem
43 * @brief This class defines the common behavior of a %IconListViewItem control.
47 * The %IconListViewItem class displays an IconListView item. It comprises of bitmap images and text. The value is set using the IconListView control.
49 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
51 class _OSP_EXPORT_ IconListViewItem
52 : public Tizen::Base::Object
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.
60 IconListViewItem(void);
63 * This destructor overrides Tizen::Base::Object::~Object().
67 virtual ~IconListViewItem(void);
71 * Initializes this instance of %IconListViewItem with the specified parameters.
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.
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);
87 * Sets the overlay bitmap image as an element to the item.
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.
101 result SetOverlayBitmap(int overlayBitmapId, const Tizen::Graphics::Bitmap* pOverlayBitmap, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment);
104 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
105 IconListViewItem(const IconListViewItem& rhs);
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);
111 friend class IconListView;
112 friend class _IconListItemProviderAdaptor;
113 friend class _IconListViewItemImpl;
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
120 }}} // Tizen::Ui::Controls
122 #endif // _FUI_CTRL_ICON_LIST_VIEW_ITEM_H_