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.
19 * @file FUiITextEventListener.h
20 * @brief This is the header file for the %ITextEventListener interface.
22 * This header file contains the declarations of the %ITextEventListener interface. @n
23 * If a change event is generated, a method of this interface is called. @n
24 * So, if the applications perform tasks related to change events, use the methods of this interface.
27 #ifndef _FUI_ITEXT_EVENT_LISTENER_H_
28 #define _FUI_ITEXT_EVENT_LISTENER_H_
31 #include <FBaseRtIEventListener.h>
32 #include <FBaseObject.h>
34 namespace Tizen { namespace Ui
39 namespace Tizen {namespace Ui
43 * @interface ITextEventListener
44 * @brief This interface implements the listener for text events.
48 * The %ITextEventListener interface is the listener interface for receiving text events, for example, from EditFields.
49 * The class that processes a text event implements this interface, and the instance created with that class is registered with a
50 * UI control, using the control's AddTextEventListener() method. When the text event occurs, the OnTextValueChanged() method of
51 * that instance is invoked.
53 * 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>.
56 class ITextEventListener
57 : public Tizen::Base::Runtime::IEventListener
62 * This is the destructor for this class.
66 virtual ~ITextEventListener(void) {}
69 * Called when a text is changed.
73 * @param[in] source The source of the event
74 * @remarks For EditField or EditArea with INPUT_STYLE_FULLSCREEN input style, this listener method is invoked when the user presses "Done"
75 * soft-key. Whereas, for %EditField or %EditArea with INPUT_STYLE_OVERLAY input style, this method is called whenever the user presses a
77 * @remarks Note that when a non-character key is pressed, OnTextValueChanged() callback is invoked.
79 virtual void OnTextValueChanged(const Tizen::Ui::Control& source) = 0;
82 * Called when a change made to the text is canceled.
86 * @param[in] source The source of the event
87 * @remarks This listener method is called when the user presses "Cancel" soft-key for EditField or EditArea with INPUT_STYLE_FULLSCREEN input
90 virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source) = 0;
95 // This method is for internal use only. Using this method can cause behavioral,
96 // security-related, and consistency-related issues in the application.
98 // This method is reserved and may change its name at any time without prior notice.
100 virtual void ITextEventListener_Reserved1(void) {}
103 // This method is for internal use only. Using this method can cause behavioral,
104 // security-related, and consistency-related issues in the application.
106 // This method is reserved and may change its name at any time without prior notice.
108 virtual void ITextEventListener_Reserved2(void) {}
111 // This method is for internal use only. Using this method can cause behavioral,
112 // security-related, and consistency-related issues in the application.
114 // This method is reserved and may change its name at any time without prior notice.
116 virtual void ITextEventListener_Reserved3(void) {}
117 }; // ITextEventListener
121 #endif // _FUI_ITEXT_EVENT_LISTENER_H_