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 FUiCtrlTableViewItem.h
20 * @brief This is the header file for the %TableViewItem class.
22 * This header file contains the declarations of the %TableViewItem class and its helper classes.
25 #ifndef _FUI_CTRL_TABLE_VIEW_ITEM_H_
26 #define _FUI_CTRL_TABLE_VIEW_ITEM_H_
28 #include <FUiCtrlTableViewItemBase.h>
30 namespace Tizen { namespace Ui { namespace Controls
32 class TableViewContextItem;
35 * @class TableViewItem
36 * @brief This class defines common behavior for a %TableViewItem.
40 * The %TableViewItem class is a base class which represents a table view item which is the unit of handling of TableView.
44 class _OSP_EXPORT_ TableViewItem
45 : public TableViewItemBase
49 * The object is not fully constructed after this constructor is called. Hence, the Construct() method must be called after calling this constructor.
56 * This destructor overrides Tizen::Base::Object::~Object().
60 virtual ~TableViewItem(void);
63 * Initializes this instance of %TableViewItem with the specified parameter.
67 * @return An error code
68 * @param[in] itemSize The size of the item
69 * @param[in] style The style of Annex
70 * @exception E_SUCCESS The method is successful.
71 * @exception E_INVALID_ARG A specified input parameter is invalid.
73 result Construct(const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
76 * Initializes this instance of %TableViewItem with the specified parameter.
80 * @return An error code
81 * @param[in] layout The layout for both of the portrait and landscape modes
82 * @param[in] itemSize The size of the item
83 * @param[in] style The style of Annex
84 * @exception E_SUCCESS The method is successful.
85 * @exception E_INVALID_ARG A specified input parameter is invalid.
87 result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
90 * Initializes this instance of %TableViewItem with the specified parameter.
94 * @return An error code
95 * @param[in] portraitLayout The layout for portrait mode
96 * @param[in] landscapeLayout The layout for landscape mode
97 * @param[in] itemSize The size of the item
98 * @param[in] style The style of Annex
99 * @exception E_SUCCESS The method is successful.
100 * @exception E_INVALID_ARG A specified input parameter is invalid.
102 result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
105 * Sets context item that is displayed when an item is swept.
109 * @return An error code
110 * @param[in] pItem The object of TableViewContextItem
111 * @remarks If context item is not set, TableView() does not display context item and an item sweep event is generated when an item is swept.
112 * pItem must be deleted by applications when it is no longer used.
114 void SetContextItem(const TableViewContextItem* pItem);
117 * Get the width of the annex area.
121 * @return The width of the annex
122 * @param[in] style The style of the annex
123 * @remarks The width of the annex area is different among annex styles.
125 static int GetAnnexWidth(TableViewAnnexStyle style);
128 friend class _TableViewItemImpl;
130 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
131 TableViewItem(const TableViewItem& rhs);
133 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
134 TableViewItem& operator =(const TableViewItem& rhs);
137 }}} // Tizen::Ui::Controls
139 #endif // _FUI_CTRL_TABLE_VIEW_ITEM_H_