Tizen 2.1 base
[framework/osp/uifw.git] / inc / FUiCtrlTableViewSimpleGroupItem.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 FUiCtrlTableViewSimpleGroupItem.h
20  * @brief This is the header file for the %TableViewSimpleGroupItem class.
21  *
22  * This header file contains the declarations of the %TableViewSimpleGroupItem class and its helper classes.
23  */
24
25 #ifndef _FUI_CTRL_TABLE_VIEW_SIMPLE_GROUP_ITEM_H_
26 #define _FUI_CTRL_TABLE_VIEW_SIMPLE_GROUP_ITEM_H_
27
28 #include <FUiCtrlTableViewGroupItem.h>
29
30 namespace Tizen { namespace Ui { namespace Controls
31 {
32 /**
33  * @class       TableViewSimpleGroupItem
34  * @brief    This class defines common behavior of %TableViewSimpleGroupItem.
35  *
36  * @since 2.0
37  *
38  * The %TableViewSimpleGroupItem class displays a table view group item. 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.
39  */
40
41 class _OSP_EXPORT_ TableViewSimpleGroupItem
42         : public TableViewGroupItem
43 {
44 public:
45         /**
46          * This is the default constructor for this class.
47          *
48          * @since 2.0
49          */
50         TableViewSimpleGroupItem(void);
51
52         /**
53          * This destructor overrides Tizen::Base::Object::~Object().
54          *
55          * @since 2.0
56          */
57         virtual ~TableViewSimpleGroupItem(void);
58
59         /**
60          * Initializes this instance of %TableViewSimpleGroupItem with the specified parameter.
61          *
62          * @since 2.0
63          *
64          * @return              An error code
65          * @param[in]   itemSize            The size of the item
66          * @exception   E_SUCCESS           The method is successful.
67          * @exception   E_INVALID_ARG           A specified input parameter is invalid.
68          */
69         result Construct(const Tizen::Graphics::Dimension& itemSize);
70
71         /**
72          * Initializes this instance of %TableViewSimpleGroupItem with the specified parameter.
73          *
74          * @since 2.0
75          *
76          * @return              An error code
77          * @param[in]   layout              The layout for both of the portrait and landscape modes
78          * @param[in]   itemSize            The size of the item
79          * @exception   E_SUCCESS           The method is successful.
80          * @exception   E_INVALID_ARG           A specified input parameter is invalid.
81          */
82         result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize);
83
84         /**
85          * Sets the text string and bitmap image for %TableViewSimpleGroupItem.
86          *
87          * @since 2.0
88          *
89          * @return              An error code
90          * @param[in]   text                            The text string to be added
91          * @param[in]   pBitmap                         The bitmap image to be displayed
92          * @exception   E_SUCCESS                       The method is successful.
93          * @exception   E_INVALID_ARG           A specified input parameter is invalid.
94          */
95         result SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null);
96
97         /**
98          * Sets the color of the text.
99          *
100          * @since 2.0
101          *
102          * @return              An error code
103          * @param[in]   color                           The text color
104          * @param[in]   status                          The item drawing state
105          * @exception    E_SUCCESS                      The method is successful.
106          * @exception   E_INVALID_ARG           A specified input parameter is invalid.
107          * @see                 GetTextColor()
108          */
109         result SetTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
110
111         /**
112          * Gets the color of the text.
113          *
114          * @since 2.0
115          *
116          * @return              The text color
117          * @param[in]   status                          The item drawing state
118          * @see                 SetTextColor()
119          */
120         Tizen::Graphics::Color GetTextColor(TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) const;
121
122         /**
123          * Sets the size of the text.
124          *
125          * @since 2.0
126          *
127          * @return              An error code
128          * @param[in]   size                The size of the text
129          * @exception   E_SUCCESS           The method is successful.
130          * @exception   E_INVALID_ARG       The specified input parameter is invalid.
131          * @see     GetTextSize()
132          */
133         result SetTextSize(int size);
134
135         /**
136          * Gets the size of the text.
137          *
138          * @since 2.0
139          *
140          * @return  The size of the text
141          * @see     SetTextSize()
142          */
143         int GetTextSize(void) const;
144
145 private:
146         friend class _TableViewItemImpl;
147
148         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
149         TableViewSimpleGroupItem(const TableViewSimpleGroupItem& rhs);
150
151         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
152         TableViewSimpleGroupItem& operator =(const TableViewSimpleGroupItem& rhs);
153 }; // TableViewSimpleGroupItem
154
155 }}} // Tizen::Ui::Controls
156
157 #endif // _FUI_CTRL_TABLE_VIEW_SIMPLE_GROUP_ITEM_H_