Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_IconListUtils.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_IconListUtils.h
20  * @brief               This is the header file for the _IconListUtils.
21  */
22
23 #ifndef _FUI_CTRL_INTERNAL_ICON_LIST_UTILS_H_
24 #define _FUI_CTRL_INTERNAL_ICON_LIST_UTILS_H_
25
26 #include <FUiCtrlIconListViewTypes.h>
27
28 #include "FUiCtrl_ListItemCommon.h"
29
30 namespace Tizen { namespace Ui { namespace Controls
31 {
32
33 namespace _IconListUtils
34 {
35
36 static const int MAGNETIC_SCROLL_EFFECT_DIVIDER = 5;
37
38 class TouchAnimation
39 {
40 public:
41         TouchAnimation(void);
42
43         virtual ~TouchAnimation(void);
44
45         bool GetTouchAnimationFrame(float& ratio);
46
47         float GetCurrentAnimationFrame(void) const;
48
49         void StartAnimation(void);
50
51 private:
52         TouchAnimation(const TouchAnimation& rhs);
53         TouchAnimation& operator =(const TouchAnimation& rhs);
54
55 private:
56         static const int FRAME_COUNT = 16;
57         static const float FRAME_RATIO[FRAME_COUNT];
58         int __frame;
59 }; // _TouchAnimation
60
61 class MagneticScrollAnimation
62 {
63 public:
64         MagneticScrollAnimation(void);
65
66         virtual ~MagneticScrollAnimation(void);
67
68         bool GetMagneticScrollAnimationFrame(int& dif);
69
70         void StartAnimation(int scroll);
71
72 private:
73         MagneticScrollAnimation(const MagneticScrollAnimation& rhs);
74         MagneticScrollAnimation& operator =(const MagneticScrollAnimation& rhs);
75
76 private:
77         int __scroll;
78 }; // _MagneticScrollAnimation
79
80 class CheckAnimation
81 {
82 public:
83         CheckAnimation(void);
84
85         virtual ~CheckAnimation(void);
86
87         bool GetCheckAnimationFrame(float& ratio);
88
89         float GetCurrentAnimationFrame(void) const;
90
91         void StartAnimation(void);
92
93 private:
94         CheckAnimation(const CheckAnimation& rhs);
95         CheckAnimation& operator =(const CheckAnimation& rhs);
96
97 private:
98         static const int FRAME_COUNT = 5;
99         int __frame;
100 }; // _CheckAnimation
101
102 class EnumConverter
103 {
104 public:
105         static ListItemState ConvertIconListViewItemDrawingStatusToListItemState(IconListViewItemDrawingStatus status);
106
107         static IconListViewItemDrawingStatus ConvertListItemStateToIconListViewItemDrawingStatus(ListItemState state);
108 }; // _EnumConverter
109
110 } // Tizen::Ui::Controls::_IconListUtils
111
112 }}} // Tizen::Ui::Controls
113
114 #endif // _FUI_CTRL_INTERNAL_ICON_LIST_UTILS_H_