2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
18 * @file FUiCtrl_KeypadImpl.h
19 * @brief This is the header file for the _KeypadImpl class.
21 * This header file contains the declarations of the _KeypadImpl class.
24 #ifndef _FUI_CTRL_INTERNAL_KEYPAD_IMPL_H_
25 #define _FUI_CTRL_INTERNAL_KEYPAD_IMPL_H_
27 #include <FUiCtrlKeypad.h>
28 #include "FUi_WindowImpl.h"
29 #include "FUiCtrl_ITextEventListener.h"
30 #include "FUiCtrl_Keypad.h"
32 namespace Tizen { namespace Base { namespace Runtime
35 }}} // Tizen::Base::Runtime
37 namespace Tizen { namespace Ui { namespace Controls
39 class _PublicTextEvent;
42 : virtual public Tizen::Base::Runtime::IEventListener
44 , public _ITextEventListener
48 virtual ~_KeypadImpl(void);
50 static _KeypadImpl* CreateKeypadImplN(Keypad* pControl);
51 static _KeypadImpl* GetInstance(Keypad& pKeypad);
52 static const _KeypadImpl* GetInstance(const Keypad& pKeypad);
54 virtual const char* GetPublicClassName(void) const;
55 virtual const Keypad& GetPublic(void) const;
56 virtual Keypad& GetPublic(void);
57 virtual const _Keypad& GetCore(void) const;
58 virtual _Keypad& GetCore(void);
60 result Initialize(KeypadStyle keypadStyle, KeypadInputModeCategory category, int limitLength, bool enabledTextPrediction = true);
62 void SetTextPredictionEnabled(bool enable);
64 bool IsTextPredictionEnabled(void) const;
66 result SetSingleLineEnabled(bool enabled);
68 bool IsSingleLineEnabled(void) const;
70 result AddTextEventListener(Tizen::Ui::ITextEventListener& listener);
72 result RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener);
74 Tizen::Base::String GetText(void) const;
76 void SetText(const Tizen::Base::String& text);
78 virtual result OnAttachedToMainTree(void);
80 virtual void OnTextValueChanged(const Tizen::Ui::_Control& source);
82 virtual void OnTextValueChangeCanceled(const Tizen::Ui::_Control& source);
85 _KeypadImpl(Keypad* pPublic, _Keypad* pCore);
86 _KeypadImpl(const _KeypadImpl&);
87 _KeypadImpl& operator =(const _KeypadImpl&);
91 _KeypadStyleInfo __keypadStyleInfo;
93 Tizen::Base::Runtime::IEvent* __pTextEvent;
94 _PublicTextEvent* __pPublicTextEvent;
97 } } } // OSp::Ui::Controls;
99 #endif // _FUI_CTRL_INTERNAL_KEYPAD_IMPL_H_