Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_ITextEventListener.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_ITextEventListener.h
19  * @brief               This is the header file for the _ITextEventListener class.
20  *
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.
24  *
25  */
26 #ifndef _FUI_CTRL_INTERNAL_ITEXT_EVENT_LISTENER_H_
27 #define _FUI_CTRL_INTERNAL_ITEXT_EVENT_LISTENER_H_
28
29 // Includes
30 #include <FBaseRtIEventListener.h>
31 #include <FOspConfig.h>
32
33 namespace Tizen { namespace Ui
34 {
35 class _Control;
36 }} //Tizen::Ui
37
38 namespace Tizen { namespace Ui { namespace Controls
39 {
40 /**
41  * @interface   _ITextEventListener
42  * @brief               This interface implements the listener for _kmjaction event.
43  * @since               1.0
44  *
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.
48  */
49 class _ITextEventListener
50         : virtual public Tizen::Base::Runtime::IEventListener
51 {
52 // Operation
53 public:
54         /**
55          * This is the destructor for this class.
56          *
57          * @since               1.0
58          */
59         virtual ~_ITextEventListener(void) {}
60
61         /**
62          * Notifies when a text is changed.
63          *
64          * @if OSPCOMPAT
65          * @brief <i> [Compatibility] </i>
66          * @endif
67          * @since                                       1.0
68          * @if OSPCOMPAT
69          * @compatibility This method has compatibility issues with OSP compatible applications. @n
70          *                          For more information, see @ref CompIEventListenerOnTextValueChanged "here".
71          * @endif
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.
77          */
78         virtual void OnTextValueChanged(const Tizen::Ui::_Control& source) = 0;
79
80         /**
81          * @if OSPCOMPAT
82          * @page   CompIEventListenerOnTextValueChanged Compatibility for OnTextValueChanged()
83          * @section CompIEventListenerOnTextValueChangedIssues Issues
84          *               Implementing this method in OSP compatible applications has the following issues: @n
85          *
86          * -# When texts are inserted by prediction feature in the predictive input mode of EditArea or EditField, OnTextValueChanged callback is not invoked.
87          *
88          * @section CompIEventListenerOnTextValueChanged Resolutions Resolutions
89          * This issue has been resolved in Tizen.  @n
90          * @endif
91          */
92
93         /**
94          * Notifies when a change made to the text is cancelled.
95          *
96          * @since                               1.0
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.
100          */
101         virtual void OnTextValueChangeCanceled(const Tizen::Ui::_Control& source) = 0;
102
103 }; // _ITextEventListener
104
105 }}} // Tizen::Ui::Controls
106
107 #endif // _FUI_CTRL_INTERNAL_ITEXT_EVENT_LISTENER_H_