Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_FooterItemImpl.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  * @file        FUiCtrl_FooterItemImpl.h
19  * @brief       This is the header file for the %_FooterItemImpl class.
20  *
21  * This header file contains the declarations of the %_FooterItemImpl class.
22  */
23
24 #ifndef _FUI_CTRL_INTERNAL_FOOTER_ITEM_IMPL_H_
25 #define _FUI_CTRL_INTERNAL_FOOTER_ITEM_IMPL_H_
26
27 #include <climits>
28 #include <FUiCtrlFooterItem.h>
29
30
31 namespace Tizen { namespace Ui { namespace Controls
32 {
33
34 static const int FOOTER_ITEM_ACTION_ID_MIN = 0;
35 static const int FOOTER_ITEM_ACTION_ID_MAX = INT_MAX;
36 static const int FOOTER_ITEM_MAX_STATE_COUNT = 5;
37
38 class _FooterItemImpl
39         : public Tizen::Base::Object
40 {
41
42 public:
43         _FooterItemImpl(FooterItem* pPublic);
44
45         virtual ~_FooterItemImpl(void);
46
47         static const _FooterItemImpl* GetInstance(const FooterItem& footerItem);
48
49         static _FooterItemImpl* GetInstance(FooterItem& footerItem);
50
51         result Construct(int actionId);
52
53         int GetActionId(void) const;
54
55         const Tizen::Graphics::Bitmap* GetBackgroundBitmap(FooterItemStatus status) const;
56
57         const Tizen::Graphics::Bitmap* GetIcon(FooterItemStatus status) const;
58
59         Tizen::Base::String GetText(void) const;
60
61         result SetActionId(int actionId);
62
63         result SetBackgroundBitmap(FooterItemStatus status, const Tizen::Graphics::Bitmap* pBitmap);
64
65         result SetIcon(FooterItemStatus status, const Tizen::Graphics::Bitmap* pIcon);
66
67         result SetText(const Tizen::Base::String& text);
68
69
70 private:
71         _FooterItemImpl(const _FooterItemImpl& footerItem);
72
73         _FooterItemImpl& operator =(const _FooterItemImpl& footerItem);
74
75
76 private:
77         int __actionId;
78         Tizen::Base::String __itemText;
79         const Tizen::Graphics::Bitmap* __pIconBitmap[FOOTER_ITEM_MAX_STATE_COUNT];
80         const Tizen::Graphics::Bitmap* __pFooterItemBackgroundBitmap[FOOTER_ITEM_MAX_STATE_COUNT];
81
82         friend class _FooterImpl;
83
84 };
85
86 }}} // Tizen::Ui::Controls
87
88 #endif // _FUI_CTRL_INTERNAL_FOOTER_ITEM_IMPL_H_