Adjust the position of the partial Frame
[platform/framework/native/uifw.git] / inc / FUiCtrlTableViewSimpleItem.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17
18 /**
19 * @file FUiCtrlTableViewSimpleItem.h
20 * @brief This is the header file for the %TableViewSimpleItem class.
21 *
22 * This header file contains the declarations of the %TableViewSimpleItem class and its helper classes.
23 */
24
25 #ifndef _FUI_CTRL_TABLE_VIEW_SIMPLE_ITEM_H_
26 #define _FUI_CTRL_TABLE_VIEW_SIMPLE_ITEM_H_
27
28 #include <FUiCtrlTableViewItem.h>
29
30 namespace Tizen { namespace Ui { namespace Controls
31 {
32 /**
33  * @class   TableViewSimpleItem
34  * @brief   This class defines common behavior for a %TableViewSimpleItem.
35  *
36  * @since 2.0
37  *
38  * The %TableViewSimpleItem class is a class which represents a table view item which has one label and one bitmap.
39  *
40  */
41
42 class _OSP_EXPORT_ TableViewSimpleItem
43         : public TableViewItem
44 {
45 public:
46         /**
47          * The object is not fully constructed after this constructor is called. Hence, the Construct() method must be called after calling this constructor.
48          *
49          * @since 2.0
50          */
51         TableViewSimpleItem(void);
52
53         /**
54          * This destructor overrides Tizen::Base::Object::~Object().
55          *
56          * @since 2.0
57          */
58         virtual ~TableViewSimpleItem(void);
59
60         /**
61          * Initializes this instance of %TableViewSimpleItem with the specified parameter.
62          *
63          * @since 2.0
64          *
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.
70          */
71         result Construct(const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
72
73         /**
74          * Initializes this instance of TableViewItem with the specified parameter.
75          *
76          * @since 2.0
77          *
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.
84          */
85         result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
86
87         /**
88          * Initializes this instance of %TableViewSimpleItem with the specified parameter.
89          *
90          * @since 2.1
91          *
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.
97          */
98         result Construct(const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
99
100         /**
101          * Initializes this instance of TableViewItem with the specified parameter.
102          *
103          * @since 2.1
104          *
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.
111          */
112         result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL);
113
114         /**
115          * Sets the text string and bitmap image for %TableViewSimpleItem.
116          *
117          * @since 2.0
118          *
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.
124          */
125         result SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null);
126
127         /**
128          * Sets the color of the text.
129          *
130          * @since 2.0
131          *
132          * @return  An error code
133          * @param[in]   color               The text color
134          * @param[in]    status              The item drawing state
135          * @see     GetTextColor()
136          */
137         void SetTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
138
139         /**
140          * Gets the color of the text.
141          *
142          * @since 2.0
143          *
144          * @return        The text color,
145          * @param[in]    status                                   The item drawing state
146          * @see           SetTextColor()
147          */
148         Tizen::Graphics::Color GetTextColor(TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) const;
149
150         /**
151          * Sets the size of the text.
152          *
153          * @since 2.0
154          *
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.
159          * @see     GetTextSize()
160          */
161         result SetTextSize(int size);
162
163         /**
164          * Gets the size of the text.
165          *
166          * @since 2.0
167          *
168          * @return  The size of the text,
169          * @see     SetTextSize()
170          */
171         int GetTextSize(void) const;
172
173 private:
174         friend class _TableViewItemImpl;
175
176         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
177         TableViewSimpleItem(const TableViewSimpleItem& rhs);
178
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
182
183 }}} // Tizen::Ui::Controls
184
185 #endif // _FUI_CTRL_TABLE_VIEW_SIMPLE_ITEM_H_