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 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. Hence, the Construct() method must be called after calling this constructor.
51 TableViewSimpleItem(void);
54 * This destructor overrides Tizen::Base::Object::~Object().
58 virtual ~TableViewSimpleItem(void);
61 * Initializes this instance of %TableViewSimpleItem with the specified parameter.
65 * @return An error code
66 * @param[in] itemSize The size of the item
67 * @param[in] style The style of Annex
68 * @exception E_SUCCESS The method is successful.
69 * @exception E_INVALID_ARG A specified input parameter is invalid.
71 result Construct(const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
74 * Initializes this instance of TableViewItem with the specified parameter.
78 * @return An error code
79 * @param[in] layout The layout for both of the portrait and landscape modes
80 * @param[in] itemSize The size of the item
81 * @param[in] style The style of Annex
82 * @exception E_SUCCESS The method is successful.
83 * @exception E_INVALID_ARG A specified input parameter is invalid.
85 result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
88 * Initializes this instance of %TableViewSimpleItem with the specified parameter.
92 * @return An error code
93 * @param[in] itemSize The size of the item
94 * @param[in] style The style of Annex
95 * @exception E_SUCCESS The method is successful.
96 * @exception E_INVALID_ARG A specified input parameter is invalid.
98 result Construct(const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
101 * Initializes this instance of TableViewItem with the specified parameter.
105 * @return An error code
106 * @param[in] layout The layout for both of the portrait and landscape modes
107 * @param[in] itemSize The size of the item
108 * @param[in] style The style of Annex
109 * @exception E_SUCCESS The method is successful.
110 * @exception E_INVALID_ARG A specified input parameter is invalid.
112 result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
115 * Sets the text string and bitmap image for %TableViewSimpleItem.
119 * @return An error code
120 * @param[in] text The text string to add
121 * @param[in] pBitmap The bitmap image to display
122 * @exception E_SUCCESS The method is successful.
123 * @exception E_OUT_OF_MEMORY The memory is insufficient.
125 result SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null);
128 * Sets the color of the text.
132 * @return An error code
133 * @param[in] color The text color
134 * @param[in] status The item drawing state
135 * @see GetTextColor()
137 void SetTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
140 * Gets the color of the text.
144 * @return The text color,
145 * @param[in] status The item drawing state
146 * @see SetTextColor()
148 Tizen::Graphics::Color GetTextColor(TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) const;
151 * Sets the size of the text.
155 * @return An error code
156 * @param[in] size The size of the text
157 * @exception E_SUCCESS The method is successful.
158 * @exception E_INVALID_ARG The given text size is less than 1.
161 result SetTextSize(int size);
164 * Gets the size of the text.
168 * @return The size of the text,
171 int GetTextSize(void) const;
174 friend class _TableViewItemImpl;
176 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
177 TableViewSimpleItem(const TableViewSimpleItem& rhs);
179 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
180 TableViewSimpleItem& operator =(const TableViewSimpleItem& rhs);
181 }; // TableViewSimpleItem
183 }}} // Tizen::Ui::Controls
185 #endif // _FUI_CTRL_TABLE_VIEW_SIMPLE_ITEM_H_