Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_SplitPanelImpl.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_SplitPanelImpl.h
19  * @brief               This is the header file for the _SplitPanelImpl class.
20  *
21  * This header file contains the declarations of the %_SplitPanelImpl class.
22  */
23 #ifndef _FUI_CTRL_INTERNAL_SPLIT_PANEL_IMPL_H_
24 #define _FUI_CTRL_INTERNAL_SPLIT_PANEL_IMPL_H_
25
26 #include <FUiCtrlSplitPanel.h>
27 #include <FUiCtrlSplitPanelTypes.h>
28 #include "FUi_ControlImpl.h"
29 #include "FUiCtrl_SplitPanel.h"
30 #include "FUiCtrl_ISplitPanelEventListener.h"
31 #include "FUiCtrl_PublicSplitPanelEvent.h"
32
33 namespace Tizen { namespace Graphics
34 {
35         class Dimension;
36 }} //Tizen::Graphics
37
38 namespace Tizen { namespace Ui { namespace Controls
39 {
40
41 class _SplitPanelImpl
42         : public _ControlImpl
43         , public _ISplitPanelEventListener
44 {
45
46 // Lifecycle
47 public:
48         virtual ~_SplitPanelImpl(void);
49         static _SplitPanelImpl* CreateSplitPanelImplN(SplitPanel* pControl, const Tizen::Graphics::Rectangle& rect, SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection);
50
51         result Initialize(const Tizen::Graphics::Rectangle& rect);
52
53         virtual const char* GetPublicClassName(void) const;
54         virtual const SplitPanel& GetPublic(void) const;
55         virtual SplitPanel& GetPublic(void);
56         virtual const _SplitPanel& GetCore(void) const;
57         virtual _SplitPanel& GetCore(void);
58
59 public:
60
61         virtual void OnDividerPositionChanged(_SplitPanel& source, int position);
62         virtual void OnDividerDoublePressed(_SplitPanel& source);
63
64         result AddSplitPanelEventListener(ISplitPanelEventListener& listener);
65         result RemoveSplitPanelEventListener(ISplitPanelEventListener& listener);
66
67         result SetPane(_ControlImpl* pControl, SplitPanelPaneOrder paneOrder);
68         _ControlImpl* GetPane(SplitPanelPaneOrder paneOrder) const;
69
70         result SetDividerPosition(int position);
71         int GetDividerPosition(void) const;
72
73         result SetMaximumDividerPosition(int position);
74         int GetMaximumDividerPosition(void) const;
75
76         result SetMinimumDividerPosition(int position);
77         int GetMinimumDividerPosition(void) const;
78
79         result MaximizePane(SplitPanelPaneOrder paneOrder);
80         bool IsPaneMaximized(SplitPanelPaneOrder paneOrder) const;
81         result RestorePane(void);
82
83 //Constants
84 public:
85         static _SplitPanelImpl* GetInstance(SplitPanel& pSplitPanel);
86         static const _SplitPanelImpl* GetInstance(const SplitPanel& pSplitPanel);
87
88 private:
89         _SplitPanelImpl(SplitPanel* pPublic, _SplitPanel* pCore);
90
91         _SplitPanelImpl(const _SplitPanelImpl& rhs);
92         _SplitPanelImpl& operator =(const _SplitPanelImpl& rhs);
93
94 private:
95         _SplitPanel* __pSplitPanel;
96         _PublicSplitPanelEvent* __pPublicSplitPanelEvent;
97
98 }; // _SplitPanelImpl
99
100 }}} // Tizen::Ui::Controls
101
102 #endif //_FUI_CTRL_INTERNAL_SPLIT_PANEL_IMPL_H_
103
104