Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_IFastScrollListener.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_IFastScrollListener.h
19  * @brief               This is the header file for _IUiFastScrollListener class.
20  *
21  * This header file contains declarations of IFastScrollListener class.
22  * If item event is generated, a method of this class will be called.
23  * Applications that do some jobs related to item event, they call methods of this class.
24  *
25  */
26 #ifndef _FUICTRL_INTERNAL_IFASTSCROLL_LISTENER_H_
27 #define _FUICTRL_INTERNAL_IFASTSCROLL_LISTENER_H_
28
29 // Includes
30 #include <FOspConfig.h>
31 #include <FBaseRtIEventListener.h>
32 #include "FUiCtrl_FastScrollIndex.h"
33
34 namespace Tizen { namespace Ui
35 {
36 class _Control;
37 } }
38
39 namespace Tizen { namespace Ui { namespace Controls
40 {
41
42 /**
43  * @interface   IFastScrollListener
44  * @brief               This interface implements the listener for fast scroll event.
45  * @since               2.0
46  *
47  * IFastScrollListerer is an interface which implements a listener for receiving fast scroll events.
48  * The class that is interested in processing a fast scroll implements this interface,
49  * and the object created with that class is registered with a UI control, using the control's
50  * AddFastScrollListener method. When the item event occurs, that object's OnFastScrollIndexChanged method is invoked.
51  */
52 class _IUiFastScrollListener
53         : virtual public Tizen::Base::Runtime::IEventListener
54 {
55 // Operation
56 public:
57         /**
58          * This is the destructor for this class.
59          * @since       2.0
60          */
61         virtual ~_IUiFastScrollListener(void) {}
62
63         /**
64          * Notifies when an index is selected.
65          * @since                               2.0
66          *
67          * @param[in]   source                  The source of the event
68          * @param[in]   index                   The index
69          * @remark      When the search icon index is enabled, you can check whether the search icon index is touched by comparing @c index @n
70          *              with the string constant FAST_SCROLL_SEARCH_ICON_INDEX_STRING.
71          *
72          */
73         virtual void OnUiFastScrollIndexSelected(Tizen::Ui::_Control& source, Tizen::Ui::Controls::_FastScrollIndex& index) = 0;
74
75 protected:
76         // reserved virtual methods for later extension
77         /*
78                 Following methods are reserved and may change its name at any time without prior notice.
79         */
80         virtual void _IUiFastScrollListener_Reserved1(void) {}
81         virtual void _IUiFastScrollListener_Reserved2(void) {}
82         virtual void _IUiFastScrollListener_Reserved3(void) {}
83 };
84
85 };
86 };
87 };
88
89 #endif