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 FUiITextEventListener.h
19 * @brief This is the header file for the %ITextEventListener interface.
21 * This header file contains the declarations of the %ITextEventListener interface. @n
22 * If a change event is generated, a method of this interface is called. @n
23 * So, if the applications perform tasks related to change events, use the methods of this interface.
26 #ifndef _FUI_ITEXT_EVENT_LISTENER_H_
27 #define _FUI_ITEXT_EVENT_LISTENER_H_
30 #include <FBaseRtIEventListener.h>
31 #include <FBaseObject.h>
33 namespace Tizen { namespace Ui
38 namespace Tizen {namespace Ui
42 * @interface ITextEventListener
43 * @brief This interface implements the listener for text events.
47 * The %ITextEventListener interface is the listener interface for receiving text events, for example, from EditFields.
48 * The class that processes a text event implements this interface, and the instance created with that class is registered with a
49 * UI control, using the control's AddTextEventListener() method. When the text event occurs, the OnTextValueChanged() method of
50 * that instance is invoked.
52 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_editfield_editarea.htm">EditArea and EditField</a>, <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_exp_editarea.htm">ExpandableEditArea</a>, <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_textbox.htm">TextBox</a>, and <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_searchbar.htm">SearchBar</a>.
55 class ITextEventListener
56 : public Tizen::Base::Runtime::IEventListener
61 * This is the destructor for this class.
65 virtual ~ITextEventListener(void) {}
68 * Called when a text is changed.
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 the user presses "Done"
74 * soft-key. Whereas, for %EditField or %EditArea with INPUT_STYLE_OVERLAY input style, this method is called whenever the user presses a
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;
81 * Called when a change made to the text is canceled.
85 * @param[in] source The source of the event
86 * @remarks This listener method is called when the user presses "Cancel" soft-key for EditField or EditArea with INPUT_STYLE_FULLSCREEN input
89 virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source) = 0;
94 // This method is for internal use only. Using this method can cause behavioral,
95 // security-related, and consistency-related issues in the application.
97 // This method is reserved and may change its name at any time without prior notice.
99 virtual void ITextEventListener_Reserved1(void) {}
102 // This method is for internal use only. Using this method can cause behavioral,
103 // security-related, and consistency-related issues in the application.
105 // This method is reserved and may change its name at any time without prior notice.
107 virtual void ITextEventListener_Reserved2(void) {}
110 // This method is for internal use only. Using this method can cause behavioral,
111 // security-related, and consistency-related issues in the application.
113 // This method is reserved and may change its name at any time without prior notice.
115 virtual void ITextEventListener_Reserved3(void) {}
116 }; // ITextEventListener
120 #endif // _FUI_ITEXT_EVENT_LISTENER_H_