Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_PublicScrollPanelEvent.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_PublicScrollPanelEvent.h
19 * @brief                This is the header file for _PublicScrollPanelEvent class.
20 *
21 * This header file contains declaration of _PublicScrollPanelEvent class.
22 *
23 */
24
25 #ifndef _FUI_CTRL_INTERNAL_PUBLIC_SCROLLPANEL_EVENT_H_
26 #define _FUI_CTRL_INTERNAL_PUBLIC_SCROLLPANEL_EVENT_H_
27
28 #include <FBaseResult.h>
29 #include <FBaseRt_Event.h>
30 #include <FOspConfig.h>
31 #include <FUiControl.h>
32
33 namespace Tizen { namespace Ui { namespace Controls
34 {
35
36 /**
37 * @enum ScrollPanelStatus
38 * Defines constants used to identify ScrollPanel's Overlay status. @n
39 * This is used for overlay keypad support.
40 *
41 * @since                        1.0
42 */
43 enum ScrollPanelStatus
44 {
45         OVERLAY_CONTROL_CREATED,    /**< An overlay keypad created on top of ScrollPanel        */
46         OVERLAY_CONTROL_OPENED, /**< An overlay keypad opened on top of ScrollPanel     */
47         OVERLAY_CONTROL_CLOSED, /**< An overlay keypad closed */
48         OTHER_CONTROL_SELECTED /**< Another control in the ScrollPanel is selected */
49 };
50
51 /**
52 * @class        _PublicScrollPanelEvent
53 * @brief        This class handles a text Block event event. It is inherited from Event class.
54 *
55 */
56 class _PublicScrollPanelEvent
57         : public Tizen::Base::Runtime::_Event
58 {
59 // Lifecycle
60 public:
61         /**
62         * This is the default class destructor.
63         *
64         */
65         virtual ~_PublicScrollPanelEvent(void);
66
67         static _PublicScrollPanelEvent* CreateInstanceN(const Tizen::Ui::Control& source);
68
69 // Accessors
70 public:
71         /**
72         * This method returns the owner of this event.
73         *
74         * @return               See the comment above.
75         */
76         const Tizen::Ui::Control* GetSource(void) const;
77
78         // Operations
79 protected:
80         /**
81         * This is the default class constructor.
82         *
83         * @remarks              After creating an instance of this class, you must explicitly call one of
84         *                               construction methods to initialize the instance.
85         *
86         */
87         _PublicScrollPanelEvent(const Tizen::Ui::Control& source);
88
89         /**
90         * This method checks the arg and finds out the type of event. After that this method calls appopriate
91         * pListener's method.
92         *
93         * @param[in]    listener        It is a event listener related to this item event.
94         * @param[in]    arg                     It is an argument-like instance of item event retransmitted to the listener's method
95         *                                                       as an argument.
96         * @exception    E_SUCCESS               - The method is successful.
97         * @exception    E_ARG_NULL              - The listener is null.
98         * @exception    E_INVALID_ARG   - The argument passed to a method contains an invalid value.@n
99         *                                                                 &nbsp;&nbsp;The pListener is not the instance of IItemEventListener class or
100         *                                                                 the pItemEventArg is not the instance of _CustomItemEventArg class.
101         *
102         */
103         virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg);
104
105 public:
106         static Tizen::Base::Runtime::IEventArg* CreateScrollPanelEventArgN(ScrollPanelStatus status);
107
108         //Attributess
109 private:
110         const Tizen::Ui::Control* __pSource;
111 }; // _PublicScrollPanelEvent
112
113 }}} // Tizen::Ui::Controls
114
115 #endif  //_FUI_CTRL_INTERNAL_PUBLIC_SCROLLPANEL_EVENT_H_