Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_GroupItemImpl.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        FUiCtrl_GroupItemImpl.h
20  * @brief       This is the header file for the GroupItemImpl class.
21  *
22  * This header file contains the declarations of the GroupItemImpl class.
23  */
24
25 #ifndef _FUI_CTRL_GROUP_ITEM_IMPL_H_
26 #define _FUI_CTRL_GROUP_ITEM_IMPL_H_
27
28 #include "FUiCtrl_ListItemBaseImpl.h"
29
30 namespace Tizen { namespace Ui { namespace Controls
31 {
32
33 class ICustomElement;
34 class GroupItem;
35
36 class _GroupItemImpl
37         : public _ListItemBaseImpl
38 {
39 // Lifecycle
40 public:
41         static _GroupItemImpl* CreateGroupItemImpN(GroupItem* pPublic, const Tizen::Graphics::Dimension& itemSize);
42
43         virtual ~_GroupItemImpl(void);
44
45 // Operation
46 public:
47         virtual const char* GetPublicClassName(void) const;
48
49         result Construct(const Tizen::Graphics::Dimension& itemSize);
50
51         result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap);
52
53         result SetBackgroundColor(const Tizen::Graphics::Color& color);
54
55         Tizen::Graphics::Color GetBackgroundColor(void) const;
56
57         result SetTextColor(const Tizen::Graphics::Color& color);
58
59         Tizen::Graphics::Color GetTextColor(void) const;
60
61         result SetTextSize(int size);
62
63         int GetTextSize(void) const;
64
65         result SetElement(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null);
66
67 public:
68         static _GroupItemImpl* GetInstance(GroupItem& groupItem);
69
70         static const _GroupItemImpl* GetInstance(const GroupItem& groupItem);
71
72 // Constructor
73 private:
74         _GroupItemImpl(GroupItem* pPublic);
75
76         _GroupItemImpl(const _GroupItemImpl& rhs);
77
78         _GroupItemImpl& operator =(const _GroupItemImpl& rhs);
79
80 // Attribute
81 private:
82         static const float GROUP_ITEM_ELEMENT_BITMAP_SIZE_RATIO = 0.6f;
83         int __textSize;
84         Tizen::Graphics::Color __textColor;
85 }; // _GroupItemImpl
86
87 }}} // Tizen::Ui::Controls
88
89 #endif // _FUI_CTRL_GROUP_ITEM_IMPL_H_