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 FUiCtrl_ScrollEventArg.h
20 * @brief This is the header file for _ScrollEventArg class.
22 * This header file contains declaration of _ScrollEventArg class.
26 #ifndef _FUI_INTERNAL_SCROLL_EVENT_ARG_H_
27 #define _FUI_INTERNAL_SCROLL_EVENT_ARG_H_
29 #include <FUiCtrlIScrollEventListener.h>
30 #include <FUiCtrlScrollEventTypes.h>
31 #include <FOspConfig.h>
32 #include <FBaseObject.h>
33 #include <FBaseRtIEventArg.h>
34 #include "FUiCtrl_ScrollEventTypes.h"
36 namespace Tizen { namespace Ui
41 namespace Tizen { namespace Ui { namespace Controls
45 * @class _ScrollEventArg
46 * @brief This class is used as the argument to item event listener.
48 * From this class, one can find out, the (event) source object, index and Scroll event type.
51 : public Tizen::Base::Runtime::IEventArg
52 , public Tizen::Base::Object
57 * This is the class destructor.
60 virtual ~_ScrollEventArg(void);
63 * General getter for %_ScrollEventArg class object when fire OnScrollStopped event
65 * @param[in] source A pointer to the Object instance which contains this instance
67 static _ScrollEventArg* GetScrollEventArgN(const Control& source);
70 * General getter for %_ScrollEventArg class object when fire OnScrollPositionChanged event
72 * @param[in] source A pointer to the Object instance which contains this instance
73 * @param[in] scrollPosition A scroll position of the scroll
75 static _ScrollEventArg* GetScrollEventArgN(const Control& source, int scrollPosition);
78 * General getter for %_ScrollEventArg class object when fire OnScrollEndReached event
80 * @param[in] source A pointer to the Object instance which contains this instance
81 * @param[in] scrollType A direction of the scroll
83 static _ScrollEventArg* GetScrollEventArgN(const Control& source, ScrollEndEvent scrollType);
88 * This method returns the type of firing event
90 * @return See the comment above.
92 _ScrollEventType GetEventType(void) const;
95 * This method returns the object which the event initially occurred.
97 * @return The object which the event initially occurred.
99 Tizen::Ui::Control* GetSource(void) const;
102 * This method returns the scroll position
104 * @return See the comment above.
106 int GetScrollPosition(void) const;
109 * This method returns the ItemStatus
111 * @return See the comment above.
113 ScrollEndEvent GetScrollType(void) const;
118 * This is the default class constructor.
120 * @param[in] source A pointer to the Object instance which contains this instance
121 * @param[in] eventType A type of firing event
122 * @param[in] scrollPosition A scroll position of the scroll
123 * @param[in] scrollType A direction of the scroll
125 _ScrollEventArg(_ScrollEventType eventType, const Control& source, int scrollPosition = -1, ScrollEndEvent scrollType = SCROLL_END_EVENT_END_TOP);
130 _ScrollEventType __eventType;
132 int __scrollPosition;
133 ScrollEndEvent __scrollType;
134 }; // _ScrollEventArg
137 }}} //Tizen::Ui::Controls
139 #endif // _FUI_SCROLL_EVENT_ARG_H_