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 FUiCtrlTableViewItemBase.h
20 * @brief This is the header file for the %TableViewItemBase class.
22 * This header file contains the declarations of the %TableViewItemBase class and its helper classes.
25 #ifndef _FUI_CTRL_TABLE_VIEW_ITEM_BASE_H_
26 #define _FUI_CTRL_TABLE_VIEW_ITEM_BASE_H_
28 #include <FOspConfig.h>
29 #include <FUiContainer.h>
30 #include <FUiCtrlTableViewTypes.h>
32 namespace Tizen { namespace Ui { namespace Controls
36 * @class TableViewItemBase
37 * @brief This class defines common behavior for a %TableViewItemBase.
41 * The %TableViewItemBase class is a base class which represents a table view item which is the unit of handling of TableView.
45 class _OSP_EXPORT_ TableViewItemBase
46 : public Tizen::Ui::Container
50 * Sets the background image of the item which is displayed when the item is in specified state.
54 * @return An error code
55 * @param[in] pBitmap The background bitmap image
56 * @param[in] status The item drawing state
57 * @exception E_SUCCESS The method is successful.
58 * @exception E_OUT_OF_MEMORY The memory is insufficient.
59 * @remarks The background bitmap has priority over the background color. When both the background bitmap and the background color are specified, only the bitmap is displayed.
61 result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
64 * Sets the background color of the item which is displayed when the item is in specified state.
68 * @return An error code
69 * @param[in] color The background color
70 * @param[in] status The item drawing state
72 void SetBackgroundColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
75 * Gets the background color of the item which is displayed when the item is in the specified state.
79 * @return The background color of the item
80 * @param[in] status The item drawing state
82 * @remarks If an error occurs, this method returns RGBA(0, 0, 0, 0).
83 * @see SetBackgroundColor()
85 Tizen::Graphics::Color GetBackgroundColor(TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) const;
88 * Enables or disables the individual selection of a control.
92 * @return An error code
93 * @param[in] pControl The child control to select individually
94 * @param[in] enable Set to @c true to enable the individual selection of a control, else @c false
95 * @exception E_SUCCESS The method is successful.
96 * @exception E_INVALID_ARG A specified input parameter is invalid.
98 result SetIndividualSelectionEnabled(const Tizen::Ui::Control* pControl, bool enable);
101 * Returns whether the individual selection of a control is enabled or not.
105 * @return @c true if the individual selection of a control is enabled, else @c false
106 * @param[in] pControl The target control.
107 * @exception E_SUCCESS The method is successful.
108 * @exception E_INVALID_ARG A specified input parameter is invalid.
110 bool IsIndividualSelectionEnabled(const Tizen::Ui::Control* pControl);
114 * This class is constructible only as a subobject of a derived class.
118 TableViewItemBase(void);
121 * This class is destructible only as a subobject of a derived class.
125 virtual ~TableViewItemBase(void);
128 // This method is for internal use only. Using this method can cause behavioral, security-related,
129 // and consistency-related issues in the application.
131 // The following method is reserved, and its name can be changed at any time without prior notice.
135 virtual void TableViewItemBase_Reserved1(void) {}
138 // This method is for internal use only. Using this method can cause behavioral, security-related,
139 // and consistency-related issues in the application.
141 // The following method is reserved, and its name can be changed at any time without prior notice.
145 virtual void TableViewItemBase_Reserved2(void) {}
148 // This method is for internal use only. Using this method can cause behavioral, security-related,
149 // and consistency-related issues in the application.
151 // The following method is reserved, and its name can be changed at any time without prior notice.
155 virtual void TableViewItemBase_Reserved3(void) {}
158 friend class _TableViewItemImpl;
160 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
161 TableViewItemBase(const TableViewItemBase& rhs);
163 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
164 TableViewItemBase& operator =(const TableViewItemBase& rhs);
165 }; // TableViewItemBase
167 }}} // Tizen::Ui::Controls
169 #endif // _FUI_CTRL_TABLE_VIEW_ITEM_BASE_H_