merge with master
[platform/framework/native/uifw.git] / inc / FUiCtrlIFastScrollListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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                FUiCtrlIFastScrollListener.h
19  * @brief       This is the header file for the %IFastScrollListener interface.
20  *
21  * This header file contains the declarations of the %IFastScrollListener interface. @n
22  * If item event is generated, a method of this class will be called. @n
23  * Applications that perform tasks related to the item event call methods of this class.
24  *
25  */
26 #ifndef _FUI_CTRL_IFAST_SCROLL_LISTENER_H_
27 #define _FUI_CTRL_IFAST_SCROLL_LISTENER_H_
28
29 #include <FBaseRtIEventListener.h>
30 #include <FBaseString.h>
31
32 namespace Tizen { namespace Ui
33 {
34 class Control;
35 } }
36
37 namespace Tizen { namespace Ui { namespace Controls
38 {
39
40 // constants
41 /**
42  * @if OSPDEPREC
43  * The string constant representing the index of the magnifying icon in a fast scroll.
44  *
45  * @brief <i> [Deprecated]  </i>
46  * @deprecated  This object is provided only for backward compatibility and will be deleted in a future release.
47  *                              Instead of using this object, it is recommended to use FAST_SCROLL_SEARCH_ICON_INDEX_STRING.
48  * @since       2.0
49  * @endif
50  */
51 _OSP_EXPORT_ extern const Tizen::Base::String FAST_SCROLL_SEARCH_ICON_INDEX;
52
53 // constants
54 /**
55  * The string constant representing the index of the magnifying icon in a fast scroll.
56  *
57  * @since 2.0
58  */
59 _OSP_EXPORT_ extern const wchar_t* const FAST_SCROLL_SEARCH_ICON_INDEX_STRING;
60
61 /**
62  * @interface   IFastScrollListener
63  * @brief               This interface implements the listener for the fast scroll event.
64  *
65  * @since               2.0
66  *
67  * The %IFastScrollListener interface is the listener interface for receiving fast scroll events.
68  * The class that processes a fast scroll event implements this interface, and the instance created with that class is registered
69  * with a UI control, using the control's AddFastScrollListener() method. When the fast scroll event occurs, the
70  * OnFastScrollIndexChanged() method of that instance is invoked.
71  *
72  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
73
74  */
75 class _OSP_EXPORT_ IFastScrollListener
76         : public Tizen::Base::Runtime::IEventListener
77 {
78 // Operation
79 public:
80         /**
81          * This is the destructor for this class.
82          *
83          * @since       2.0
84          */
85         virtual ~IFastScrollListener(void) {}
86
87         /**
88          * Called when an index is selected.
89          *
90          * @since                               2.0
91          *
92          * @param[in]   source                  The source of the event
93          * @param[in]   index                   The index
94          * @remarks     When the search icon index is enabled, you can check whether the search icon index is touched by comparing @c index with the string
95          *                              constant FAST_SCROLL_SEARCH_ICON_INDEX.
96          *
97          */
98         virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index) = 0;
99
100 protected:
101         //
102         // This method is for internal use only.
103         // Using this method can cause behavioral, 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 IFastScrollListener_Reserved1(void) {}
108
109         //
110         // This method is for internal use only.
111         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
112         //
113         // This method is reserved and may change its name at any time without prior notice.
114         //
115         //
116         virtual void IFastScrollListener_Reserved2(void) {}
117
118         //
119         // This method is for internal use only.
120         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
121         //
122         // This method is reserved and may change its name at any time without prior notice.
123         //
124         virtual void IFastScrollListener_Reserved3(void) {}
125 }; // IFastScrollListener
126
127 };
128 };
129 };
130
131 #endif