Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_ISplitPanelEventListener.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_ISplitPanelEventListener.h
19  * @brief               This is the header file for the _ISplitPanelEventListener interface.
20  *
21  * This header file contains the declarations of the _ISplitPanelEventListener
22  * interface.
23  */
24 #ifndef _FUI_CTRL_INTERNAL_ISPLIT_PANEL_EVENT_LISTENER_H_
25 #define _FUI_CTRL_INTERNAL_ISPLIT_PANEL_EVENT_LISTENER_H_
26
27 #include <FBaseRtIEventListener.h>
28 #include <FBaseObject.h>
29 #include <FUiCtrlSplitPanelTypes.h>
30
31 namespace Tizen { namespace Ui { namespace Controls
32 {
33 class _SplitPanel;
34
35 /**
36  * @interface   _ISplitPanelEventListener
37  * @brief               This interface implements the listener for all splitpanel events.
38  * @since 2.0
39  *
40  * The %_ISplitPanelEventListener interface is the listener interface for receiving SplitPanel events, which are fired when the divider moves or is double pressed.
41  * The class that processes a SplitPanel event implements this interface, and the instance created with that class is registered with
42  *  a UI control, using the control's AddSplitPanelEventListener() method. When the splitpanle divider is moved, the OnDividerPositionChanged()
43  *  method of that instance is invoked.
44  *
45  * For more information on the class features, see <a href="../com.osp.cppappprogramming.help/html/dev_guide/ui/implementing_splitpanel.htm">SplitPanel</a>.
46  */
47 class _ISplitPanelEventListener
48         : public Tizen::Base::Runtime::IEventListener
49 {
50 public:
51         /**
52          * This is the destructor for this class.
53          *
54          * @since 2.0
55          */
56         virtual ~_ISplitPanelEventListener(void) {}
57
58 public:
59         /**
60          *
61          * Called when the divider moves.
62          *
63          * @since 2.0
64          * @param[in]   source         The source of the event
65          * @param[in]   position                The position of the divider
66          */
67         virtual void OnDividerPositionChanged(Tizen::Ui::Controls::_SplitPanel& source, int position) = 0;
68
69         /**
70          * Called when the divider is double pressed.
71          *
72          * @since 2.0
73          *
74          * @param[in] source            The source of the event
75          * @remark                              This method is invoked when an divider is double pressed.
76          */
77         virtual void OnDividerDoublePressed(Tizen::Ui::Controls::_SplitPanel& source) = 0;
78
79 };      // _ISplitPanelEventListener
80
81 }}} // Tizen::Ui::Controls
82
83 #endif // _FUI_CTRL_INTERNAL_ISPLIT_PANEL_EVENT_LISTENER_H_