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_ITextEventListener.h
19 * @brief This is the header file for the _ITextEventListener class.
21 * This header file contains the declarations of the _ITextEventListener class. @n
22 * If a change event is generated, a method of this class is called. @n
23 * So, if the applications perform tasks related to change events, use the methods of this class.
26 #ifndef _FUI_CTRL_INTERNAL_ITEXT_EVENT_LISTENER_H_
27 #define _FUI_CTRL_INTERNAL_ITEXT_EVENT_LISTENER_H_
30 #include <FBaseRtIEventListener.h>
31 #include <FOspConfig.h>
33 namespace Tizen { namespace Ui
38 namespace Tizen { namespace Ui { namespace Controls
41 * @interface _ITextEventListener
42 * @brief This interface implements the listener for _kmjaction event.
45 * The listener interface for receiving the action events. The class that processes an action event
46 * implements this interface, and the object created with that class is registered with a _control, using the _control's
47 * AddTextEventListener() method. When the action event occurs, the OnTextValueChanged() method of that object is invoked.
49 class _ITextEventListener
50 : virtual public Tizen::Base::Runtime::IEventListener
55 * This is the destructor for this class.
59 virtual ~_ITextEventListener(void) {}
62 * Notifies when a text is changed.
65 * @brief <i> [Compatibility] </i>
69 * @compatibility This method has compatibility issues with OSP compatible applications. @n
70 * For more information, see @ref CompIEventListenerOnTextValueChanged "here".
72 * @param[in] source The source of the event
73 * @remarks For EditField or EditArea with INPUT_STYLE_FULLSCREEN input style, this listener method is invoked when
74 * the user presses "Done" soft-key. Whereas, EditField or EditArea with INPUT_STYLE_OVERLAY input style,
75 * this method is called whenever the presses a key.
76 * @remarks Note that when a non-character key is pressed, OnTextValueChanged callback is invoked.
78 virtual void OnTextValueChanged(const Tizen::Ui::_Control& source) = 0;
82 * @page CompIEventListenerOnTextValueChanged Compatibility for OnTextValueChanged()
83 * @section CompIEventListenerOnTextValueChangedIssues Issues
84 * Implementing this method in OSP compatible applications has the following issues: @n
86 * -# When texts are inserted by prediction feature in the predictive input mode of EditArea or EditField, OnTextValueChanged callback is not invoked.
88 * @section CompIEventListenerOnTextValueChanged Resolutions Resolutions
89 * This issue has been resolved in Tizen. @n
94 * Notifies when a change made to the text is cancelled.
97 * @param[in] source The source of the event
98 * @remarks This listener method is called when the user presses "Cancel" soft-key for EditField or
99 * EditArea with INPUT_STYLE_FULLSCREEN input style.
101 virtual void OnTextValueChangeCanceled(const Tizen::Ui::_Control& source) = 0;
103 }; // _ITextEventListener
105 }}} // Tizen::Ui::Controls
107 #endif // _FUI_CTRL_INTERNAL_ITEXT_EVENT_LISTENER_H_