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_UiScrollEventArg.h
20 * @brief This is the header file for _UiScrollEventArg class.
22 * This header file contains declaration of _UiScrollEventArg class.
26 #ifndef _FUI_CTRL_INTERNAL_SCROLL_EVENT_ARG_H_
27 #define _FUI_CTRL_INTERNAL_SCROLL_EVENT_ARG_H_
29 #include <FUiCtrlScrollEventTypes.h>
30 #include <FOspConfig.h>
31 #include <FBaseObject.h>
32 #include <FBaseRtIEventArg.h>
33 #include "FUiCtrl_IScrollEventListener.h"
34 #include "FUiCtrl_ScrollEventTypes.h"
36 namespace Tizen { namespace Ui { namespace Controls
40 * @class _UiScrollEventArg
41 * @brief This class is used as the argument to item event listener.
43 * From this class, one can find out, the (event) source object, index and Scroll event type.
45 class _UiScrollEventArg
46 : public Tizen::Base::Runtime::IEventArg
47 , public Tizen::Base::Object
52 * This is the class destructor.
55 virtual ~_UiScrollEventArg(void);
58 * General getter for %_ScrollEventArg class object when fire OnScrollStopped event
60 * @param[in] source A pointer to the Object instance which contains this instance
62 static _UiScrollEventArg* GetScrollEventArgN(const _Control& source);
65 * General getter for %_ScrollEventArg class object when fire OnScrollPositionChanged event
67 * @param[in] source A pointer to the Object instance which contains this instance
68 * @param[in] scrollPosition A scroll position of the scroll
70 static _UiScrollEventArg* GetScrollEventArgN(const _Control& source, int scrollPosition);
73 * General getter for %_ScrollEventArg class object when fire OnScrollEndReached event
75 * @param[in] source A pointer to the Object instance which contains this instance
76 * @param[in] scrollType A direction of the scroll
78 static _UiScrollEventArg* GetScrollEventArgN(const _Control& source, ScrollEndEvent scrollType);
83 * This method returns the type of firing event
85 * @return See the comment above.
87 _ScrollEventType GetEventType(void) const;
90 * This method returns the object which the event initially occurred.
92 * @return The object which the event initially occurred.
94 _Control* GetSource(void) const;
97 * This method returns the ItemStatus
99 * @return See the comment above.
101 ScrollEndEvent GetScrollType(void) const;
104 * This method returns the scroll position
106 * @return See the comment above.
108 int GetScrollPosition(void) const;
113 * This is the default class constructor.
115 * @param[in] source A pointer to the Object instance which contains this instance
116 * @param[in] eventType A type of firing event
117 * @param[in] scrollPosition A scroll position of the scroll
118 * @param[in] scrollType A direction of the scroll
120 _UiScrollEventArg(_ScrollEventType eventType, const _Control& source, int scrollPosition = -1, ScrollEndEvent scrollType = SCROLL_END_EVENT_END_TOP);
125 _ScrollEventType __eventType;
127 int __scrollPosition;
128 ScrollEndEvent __scrollType;
131 }}} //Tizen::Ui::Controls
133 #endif // _FUI_CTRL_INTERNAL_SCROLL_EVENT_ARG_H_