Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_InputPad.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_InputPad.h
20  * @brief               This is the header file for the _InputPad class.
21  *
22  * This header file contains the declarations of the %_InputPad class.
23  */
24
25 #ifndef _FUI_CTRL_INTERNAL_INPUTPAD_H_
26 #define _FUI_CTRL_INTERNAL_INPUTPAD_H_
27
28 #include <FBaseColLinkedListT.h>
29
30 #include "FUi_Control.h"
31 #include "FUi_UiTouchEvent.h"
32 #include "FUiCtrl_IInputPadEventListener.h"
33 #include "FUiCtrl_DateTimeDefine.h"
34
35 namespace Tizen { namespace Ui {
36 class _AccessibilityElement;
37 }} // Tizen::Ui
38
39 namespace Tizen { namespace Ui { namespace Controls
40 {
41 class _InputPadPresenter;
42
43 class _InputPad
44         : public Tizen::Ui::_Control
45         , virtual public Tizen::Base::Runtime::IEventListener
46         , virtual public _IUiEventListener
47         , virtual public _IUiEventPreviewer
48 {
49 public:
50         _InputPad(void);
51         virtual ~_InputPad(void);
52
53         result Construct(const Tizen::Graphics::Rectangle& bounds);
54         result SetInputPadEventListener(const _IInputPadEventListener& listener);
55         void SetInputPadStyle(const _InputPadStyle style);
56         Tizen::Base::String& GetAccessebilityElementMonthName(int number);
57         void SetFont(Tizen::Graphics::Font* pFont);
58
59         virtual void OnBoundsChanged(void);
60         virtual void OnDraw(void);
61         virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
62         virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
63         virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
64         virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
65
66 private:
67         _InputPad(const _InputPad&);
68         _InputPad& operator =(const _InputPad&);
69
70         bool HasAccessibilityElement(void);
71         void SetAllAccessibilityElement(void);
72         void SetBoundsAllAccessibilityElement(void);
73         void RemoveAllAccessibilityElement(void);
74         void InitializeAccessebilityElementMonthNames(void);
75
76 private:
77         _InputPadPresenter* __pInputPadPresenter;
78         Tizen::Base::String __pMonthNames[DATETIME_MONTH_MAX];
79         Tizen::Base::Collection::LinkedListT<Tizen::Ui::_AccessibilityElement*> __accessibilityElements;
80 }; // _InputPad
81
82 }}} // Tizen::Ui::Controls
83
84 #endif  // _FUI_CTRL_INTERNAL_INPUTPAD_H_