2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0/
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 FUiCtrlTableViewSimpleGroupItem.h
20 * @brief This is the header file for the %TableViewSimpleGroupItem class.
22 * This header file contains the declarations of the %TableViewSimpleGroupItem class and its helper classes.
25 #ifndef _FUI_CTRL_TABLE_VIEW_SIMPLE_GROUP_ITEM_H_
26 #define _FUI_CTRL_TABLE_VIEW_SIMPLE_GROUP_ITEM_H_
28 #include <FUiCtrlTableViewGroupItem.h>
30 namespace Tizen { namespace Ui { namespace Controls
33 * @class TableViewSimpleGroupItem
34 * @brief This class defines common behavior of %TableViewSimpleGroupItem.
38 * The %TableViewSimpleGroupItem class displays a table view group item.
39 * The basic layout of the %TableViewSimpleGroupItem instance is text and a bitmap arranged horizontally in one line. The bitmap can be omitted while text must be given.
42 class _OSP_EXPORT_ TableViewSimpleGroupItem
43 : public TableViewGroupItem
47 * This is the default constructor for this class.
51 TableViewSimpleGroupItem(void);
54 * This destructor overrides Tizen::Base::Object::~Object().
58 virtual ~TableViewSimpleGroupItem(void);
61 * Initializes this instance of %TableViewSimpleGroupItem with the specified parameter.
65 * @return An error code
66 * @param[in] itemSize The size of the item
67 * @exception E_SUCCESS The method is successful.
68 * @exception E_INVALID_ARG A specified input parameter is invalid.
70 result Construct(const Tizen::Graphics::Dimension& itemSize);
73 * Initializes this instance of %TableViewSimpleGroupItem with the specified parameter.
77 * @return An error code
78 * @param[in] layout The layout for both of the portrait and landscape modes
79 * @param[in] itemSize The size of the item
80 * @exception E_SUCCESS The method is successful.
81 * @exception E_INVALID_ARG A specified input parameter is invalid.
83 result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize);
86 * Initializes this instance of %TableViewSimpleGroupItem with the specified parameter.
90 * @return An error code
91 * @param[in] itemSize The size of the item
92 * @exception E_SUCCESS The method is successful.
93 * @exception E_INVALID_ARG A specified input parameter is invalid.
95 result Construct(const Tizen::Graphics::FloatDimension& itemSize);
98 * Initializes this instance of %TableViewSimpleGroupItem with the specified parameter.
102 * @return An error code
103 * @param[in] layout The layout for both of the portrait and landscape modes
104 * @param[in] itemSize The size of the item
105 * @exception E_SUCCESS The method is successful.
106 * @exception E_INVALID_ARG A specified input parameter is invalid.
108 result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize);
111 * Sets the text string and bitmap image for %TableViewSimpleGroupItem.
115 * @return An error code
116 * @param[in] text The text string to add
117 * @param[in] pBitmap The bitmap image to display
118 * @exception E_SUCCESS The method is successful.
119 * @exception E_INVALID_ARG A specified input parameter is invalid.
121 result SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null);
124 * Sets the color of the text.
128 * @return An error code
129 * @param[in] color The text color
130 * @param[in] status The item drawing state
131 * @exception E_SUCCESS The method is successful.
132 * @exception E_INVALID_ARG A specified input parameter is invalid.
133 * @see GetTextColor()
135 result SetTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
138 * Gets the color of the text.
142 * @return The text color
143 * @param[in] status The item drawing state
144 * @see SetTextColor()
146 Tizen::Graphics::Color GetTextColor(TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) const;
149 * Sets the size of the text.
153 * @return An error code
154 * @param[in] size The size of the text
155 * @exception E_SUCCESS The method is successful.
156 * @exception E_INVALID_ARG The specified input parameter is invalid.
159 result SetTextSize(int size);
162 * Gets the size of the text.
166 * @return The size of the text
169 int GetTextSize(void) const;
172 friend class _TableViewItemImpl;
174 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
175 TableViewSimpleGroupItem(const TableViewSimpleGroupItem& rhs);
177 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
178 TableViewSimpleGroupItem& operator =(const TableViewSimpleGroupItem& rhs);
179 }; // TableViewSimpleGroupItem
181 }}} // Tizen::Ui::Controls
183 #endif // _FUI_CTRL_TABLE_VIEW_SIMPLE_GROUP_ITEM_H_