Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_SliderOverlay.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_SliderOverlay.h
19  * @brief       This is the header file for the _SliderOverlay class.
20  *
21  * This header file contains the declarations of the %_SliderOverlay class.
22  */
23 #ifndef _FUI_CTRL_INTERNAL_SLIDEROVERLAY_H_
24 #define _FUI_CTRL_INTERNAL_SLIDEROVERLAY_H_
25
26 #include "FUi_Window.h"
27
28 namespace Tizen { namespace Ui { namespace Controls
29 {
30 class _SliderPresenter;
31
32
33 class _SliderOverlay
34         : public Tizen::Ui::_Window
35         , virtual public Tizen::Base::Runtime::IEventListener
36         , virtual public Tizen::Ui::_IUiEventListener
37         , virtual public Tizen::Ui::_IUiEventPreviewer
38 {
39 public:
40         _SliderOverlay(void);
41         virtual ~_SliderOverlay(void);
42
43         result Construct(void);
44         result SetSliderRect(Tizen::Graphics::Rectangle& sliderRect, Tizen::Graphics::Rectangle& sliderTouchRect);
45         void SetFont(Tizen::Graphics::Font* pFont);
46         result DrawSliderOverlay(int positionX,int handleWidth, int value);
47
48         virtual bool IsActivatedOnOpen(void) const;
49
50 private:
51         result LoadBitmaps(Tizen::Graphics::Dimension& dim);
52
53         _SliderOverlay(const _SliderOverlay&);
54         _SliderOverlay& operator =(const _SliderOverlay&);
55
56 private:
57
58         static const int SLIDER_OVERLAY_THREE_DIGIT = 3;
59         static const int SLIDER_OVERLAY_TWO_DIGIT = 2;
60
61         Tizen::Graphics::Rectangle __sliderRect;
62         Tizen::Graphics::Rectangle __sliderTouchRect;
63         Tizen::Graphics::Rectangle __sliderOverlayRect;
64         Tizen::Graphics::Bitmap* __pOverlayBgBitmap;
65         Tizen::Graphics::Bitmap* __pOverlayBgEffectBitmap;
66         Tizen::Graphics::Bitmap* __pOverlayBottomBgBitmap;
67         Tizen::Graphics::Bitmap* __pOverlayBottomBgEffectBitmap;
68         Tizen::Graphics::Color __overlayBgColor;
69         Tizen::Graphics::Color __overlayTextColor;
70
71         Tizen::Graphics::Font* __pFont;
72
73 };      // _SliderOverlay
74
75 }}} // Tizen::Ui::Controls
76
77 #endif  // _FUI_CTRL_INTERNAL_SLIDEROVERLAY_H_