Tizen 2.1 base
[platform/framework/native/uifw.git] / inc / FUiCtrlSimpleItem.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        FUiCtrlSimpleItem.h
20  * @brief       This is the header file for the %SimpleItem class.
21  *
22  * This header file contains the declarations of the %SimpleItem class and its helper classes.
23  */
24
25 #ifndef _FUI_CTRL_SIMPLE_ITEM_H_
26 #define _FUI_CTRL_SIMPLE_ITEM_H_
27
28 #include <FBaseObject.h>
29 #include <FBaseTypes.h>
30 #include <FGrpBitmap.h>
31 #include <FGrpRectangle.h>
32 #include <FUiCtrlListItemBase.h>
33
34 namespace Tizen { namespace Ui { namespace Controls
35 {
36
37 class _SimpleItemImpl;
38
39 /**
40  * @class       SimpleItem
41  * @brief    This class defines the common behavior of a %SimpleItem.
42  *
43  * @since       2.0
44  *
45  * The %SimpleItem class displays a list item, which is the unit of handling a ListView or GroupedListView. It provides the default
46  * formatting of the list items.
47  * @n
48  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
49  *
50  */
51
52 class _OSP_EXPORT_ SimpleItem
53         : public ListItemBase
54 {
55 public:
56         /**
57          * The object is not fully constructed after this constructor is
58          * called. For full construction, the Construct() method must be
59          * called right after calling this constructor.
60          *
61          * @since       2.0
62          */
63         SimpleItem(void);
64
65         /**
66          * This destructor overrides Tizen::Base::Object::~Object().
67          *
68          * @since       2.0
69          */
70         virtual ~SimpleItem(void);
71
72         /**
73          * Initializes this instance of %SimpleItem with the specified parameters.
74          *
75          * @since       2.0
76          *
77          * @return    An error code
78          * @param[in] itemSize          The size of the item
79          * @param[in] style             The style of Annex
80          * @exception E_SUCCESS         The method is successful.
81          * @exception E_SYSTEM          A system error has occurred.
82          */
83         result Construct(const Tizen::Graphics::Dimension& itemSize, ListAnnexStyle style);
84
85         /**
86          * Sets the text string and bitmap image for %SimpleItem.
87          *
88          * @since       2.0
89          *
90          * @return  An error code
91          * @param[in] text              The text string to add
92          * @param[in] pBitmap           The bitmap image to display
93          * @exception E_SUCCESS         The method is successful.
94          * @exception E_SYSTEM          A system error has occurred.
95          */
96         result SetElement(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null);
97
98 private:
99         //
100         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
101         //
102         SimpleItem(const SimpleItem& rhs);
103
104         //
105         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
106         //
107         SimpleItem& operator =(const SimpleItem& rhs);
108 }; // SimpleItem
109
110 }}} // Tizen::Ui::Controls
111
112 #endif  // _FUI_CTRL_SIMPLE_ITEM_H_