Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_ColorPickerImpl.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_ColorPickerImpl.h
19 * @brief                This is the header file for the _ColorPickerImpl class.
20 *
21 * This header file contains the declarations of the _ColorPickerImpl class.
22 */
23 #ifndef _FUI_CTRL_INTERNAL_COLOR_PICKER_IMPL_H_
24 #define _FUI_CTRL_INTERNAL_COLOR_PICKER_IMPL_H_
25
26 #include <FUiCtrlColorPicker.h>
27 #include <FUiITouchEventListener.h>
28 #include "FUi_ControlImpl.h"
29 #include "FUiCtrl_ColorPicker.h"
30 #include "FUiCtrl_IColorChangeEventListener.h"
31
32 namespace Tizen { namespace Ui { namespace Controls
33 {
34 class _PublicColorChangeEvent;
35
36 class _ColorPickerImpl
37         : public Tizen::Ui::_ControlImpl
38         , public _IColorChangeEventListener
39         , virtual public Tizen::Base::Runtime::IEventListener
40 {
41 public:
42         class ColorPickerSizeInfo : public _ControlImpl::SizeInfo
43         {
44                 virtual Tizen::Graphics::Dimension GetDefaultMaximumSize(_ControlOrientation orientation) const;
45
46                 virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const;
47         };
48
49 public:
50         const Tizen::Graphics::Color GetColor(void) const;
51
52         const int GetHue(void) const;
53
54         const int GetSaturation(void) const;
55
56         const int GetLuminance(void) const;
57
58         result SetColor(const Tizen::Graphics::Color& color);
59
60         result SetHue(int hue);
61
62         result SetSaturation(int saturation);
63
64         result SetLuminance(int luminance);
65
66         result AddColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener);
67
68         result RemoveColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener);
69
70         virtual void OnColorChanged(const Tizen::Ui::_Control& source, const Tizen::Graphics::Color& color);
71
72         virtual const char* GetPublicClassName(void) const;
73
74         virtual ColorPicker& GetPublic(void);
75
76         virtual const ColorPicker& GetPublic(void) const;
77
78         virtual const _ColorPicker& GetCore(void) const;
79
80         virtual _ColorPicker& GetCore(void);
81
82         virtual ~_ColorPickerImpl(void);
83
84         static _ColorPickerImpl* CreateColorPickerImplN(ColorPicker& control);
85
86         static _ColorPickerImpl* GetInstance(ColorPicker& colorPicker);
87
88         static const _ColorPickerImpl* GetInstance(const ColorPicker& colorPicker);
89
90 private:
91         _ColorPickerImpl(ColorPicker& pPublic, _ColorPicker& pCore);
92
93         _ColorPickerImpl(const _ColorPickerImpl&);
94
95         _ColorPickerImpl& operator =(const _ColorPickerImpl&);
96
97 private:
98         _PublicColorChangeEvent* __pPublicColorChangeEvent;
99 };      // _ColorPickerImpl
100
101 }}}     // Tizen::Ui::Controls
102
103 #endif //_FUI_CTRL_INTERNAL_COLOR_PICKER_IMPL_H_