Tizen 2.1 base
[framework/osp/uifw.git] / inc / FUiIUiLinkEventListener.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 /**
19  * @file                FUiIUiLinkEventListener.h
20  * @brief               This is the header file for the %IUiLinkEventListener interface.
21  *
22  * This header file contains the declarations of the %IUiLinkEventListener interface.
23  */
24 #ifndef _FUI_IUI_LINK_EVENT_LISTENER_H_
25 #define _FUI_IUI_LINK_EVENT_LISTENER_H_
26
27 // Includes
28 #include <FBaseUtilTypes.h>
29 #include <FBaseRtIEventListener.h>
30
31 namespace Tizen { namespace Base
32 {
33 class String;
34 }} // Tizen::Base
35
36 // Namespace declaration
37 namespace Tizen { namespace Ui
38 {
39
40 class Control;
41
42 /**
43  * @interface    IUiLinkEventListener
44  * @brief        This interface implements the listener for link events.
45  *
46  * @since        2.0
47  *
48  * The %IUiLinkEventListener interface is the listener interface for receiving link click events, for example, from EditFields.
49  * The class that processes a link click event implements this interface, and the instance created with that class is registered
50  * with a UI control, using the control's AddUiLinkEventListener() method. When the link click event occurs, the OnLinkClicked()
51  * method of that instance is invoked.
52  * @n
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_textbox.htm">TextBox</a>, and <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
54
55  */
56 class _OSP_EXPORT_ IUiLinkEventListener
57         : public Tizen::Base::Runtime::IEventListener
58 {
59 // Lifecycle
60 public:
61         /**
62          * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
63          *
64          * @since       2.0
65          */
66         virtual ~IUiLinkEventListener(void) {}
67
68         // Operation
69 public:
70         /**
71          * Called when a link is clicked.
72          *
73          * @since                 2.0
74          *
75          * @param[in]     source        The source of the event
76          * @param[in]     text          The text
77          * @param[in]     linkType      The link type
78          * @param[in]     link          The optional link text
79          * @remarks       If the clicked link does not contain an optional link text, then the value of @c text and @c link will be the same.
80          */
81         virtual void OnLinkClicked(Tizen::Ui::Control& source, const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link) = 0;
82
83 // Reserves
84 protected:
85         //
86         // This method is for internal use only. Using this method can cause behavioral,
87         // security-related, and consistency-related issues in the application.
88         //
89         // This method is reserved and may change its name at any time without prior notice.
90         //
91         virtual void IUiLinkEventListener_Reserved1(void) {}
92
93         //
94         // This method is for internal use only. Using this method can cause behavioral,
95         // security-related, and consistency-related issues in the application.
96         //
97         // This method is reserved and may change its name at any time without prior notice.
98         //
99         virtual void IUiLinkEventListener_Reserved2(void) {}
100
101         //
102         // This method is for internal use only. Using this method can cause behavioral,
103         // security-related, and consistency-related issues in the application.
104         //
105         // This method is reserved and may change its name at any time without prior notice.
106         //
107         virtual void IUiLinkEventListener_Reserved3(void) {}
108 }; // IUiLinkEventListener
109
110 } } // Tizen::Ui
111
112 #endif  // _FUI_IUI_LINK_EVENT_LISTENER_H_