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 FUiCtrlTableViewSimpleItem.h
20 * @brief This is the header file for the %TableViewSimpleItem class.
22 * This header file contains the declarations of the %TableViewSimpleItem class and its helper classes.
25 #ifndef _FUI_CTRL_TABLE_VIEW_SIMPLE_ITEM_H_
26 #define _FUI_CTRL_TABLE_VIEW_SIMPLE_ITEM_H_
28 #include <FUiCtrlTableViewItem.h>
30 namespace Tizen { namespace Ui { namespace Controls
33 * @class TableViewSimpleItem
34 * @brief This class defines common behavior for a %TableViewSimpleItem.
38 * The %TableViewSimpleItem class is a class which represents a table view item which has one label and one bitmap.
42 class _OSP_EXPORT_ TableViewSimpleItem
43 : public TableViewItem
47 * The object is not fully constructed after this constructor is called. @n
48 * For full construction, the %Construct() method must be called right after calling this constructor.
52 TableViewSimpleItem(void);
55 * This destructor overrides Tizen::Base::Object::~Object().
59 virtual ~TableViewSimpleItem(void);
62 * Initializes this instance of %TableViewSimpleItem with the specified parameter.
66 * @return An error code
67 * @param[in] itemSize The size of the item
68 * @param[in] style The style of Annex
69 * @exception E_SUCCESS The method is successful.
70 * @exception E_INVALID_ARG A specified input parameter is invalid.
72 result Construct(const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
75 * Initializes this instance of TableViewItem with the specified parameter.
79 * @return An error code
80 * @param[in] layout The layout for both of the portrait and landscape modes
81 * @param[in] itemSize The size of the item
82 * @param[in] style The style of Annex
83 * @exception E_SUCCESS The method is successful.
84 * @exception E_INVALID_ARG A specified input parameter is invalid.
86 result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
89 * Initializes this instance of %TableViewSimpleItem with the specified parameter.
93 * @return An error code
94 * @param[in] itemSize The size of the item
95 * @param[in] style The style of Annex
96 * @exception E_SUCCESS The method is successful.
97 * @exception E_INVALID_ARG A specified input parameter is invalid.
99 result Construct(const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
102 * Initializes this instance of TableViewItem with the specified parameter.
106 * @return An error code
107 * @param[in] layout The layout for both of the portrait and landscape modes
108 * @param[in] itemSize The size of the item
109 * @param[in] style The style of Annex
110 * @exception E_SUCCESS The method is successful.
111 * @exception E_INVALID_ARG A specified input parameter is invalid.
113 result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
116 * Sets the text string and bitmap image for %TableViewSimpleItem.
120 * @return An error code
121 * @param[in] text The text string to add
122 * @param[in] pBitmap The bitmap image to display
123 * @exception E_SUCCESS The method is successful.
124 * @exception E_OUT_OF_MEMORY The memory is insufficient.
126 result SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null);
129 * Sets the color of the text.
133 * @return An error code
134 * @param[in] color The text color
135 * @param[in] status The item drawing state
136 * @see GetTextColor()
138 void SetTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
141 * Gets the color of the text.
145 * @return The text color,
146 * @param[in] status The item drawing state
147 * @see SetTextColor()
149 Tizen::Graphics::Color GetTextColor(TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) const;
152 * Sets the size of the text.
156 * @return An error code
157 * @param[in] size The size of the text
158 * @exception E_SUCCESS The method is successful.
159 * @exception E_INVALID_ARG The given text size is less than 1.
162 result SetTextSize(int size);
165 * Gets the size of the text.
169 * @return The size of the text,
172 int GetTextSize(void) const;
175 friend class _TableViewItemImpl;
177 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
178 TableViewSimpleItem(const TableViewSimpleItem& rhs);
180 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
181 TableViewSimpleItem& operator =(const TableViewSimpleItem& rhs);
182 }; // TableViewSimpleItem
184 }}} // Tizen::Ui::Controls
186 #endif // _FUI_CTRL_TABLE_VIEW_SIMPLE_ITEM_H_