|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Widget extension adapter |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __XNWIDGETEXTENSIONADAPTER_H__ |
|
19 #define __XNWIDGETEXTENSIONADAPTER_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include "xncontroladapter.h" |
|
23 #include <e32base.h> |
|
24 |
|
25 #include "xncontroladapter.h" |
|
26 |
|
27 // Forward declarations |
|
28 class CXnAppUiAdapter; |
|
29 class CXnNode; |
|
30 class CXnUiEngine; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * @ingroup group_xnlayoutengine |
|
36 * Popup Control adapter interface class |
|
37 * @lib xnlayoutengine.lib |
|
38 * @since Series 60 5.0 |
|
39 */ |
|
40 NONSHARABLE_CLASS( CXnWidgetExtensionAdapter ) : public CXnControlAdapter/*, |
|
41 public MCoeMessageMonitorObserver*/ |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 |
|
45 enum TPositionHint |
|
46 { |
|
47 ENone, |
|
48 EAboveLeft, |
|
49 EAboveRight, |
|
50 EBelowLeft, |
|
51 EBelowRight, |
|
52 ELeft, |
|
53 ERight |
|
54 }; |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 */ |
|
58 static CXnWidgetExtensionAdapter* NewL( CXnNodePluginIf& aNode ); |
|
59 |
|
60 /** |
|
61 * Destructor. |
|
62 */ |
|
63 ~CXnWidgetExtensionAdapter(); |
|
64 |
|
65 private: // Functions from base classes |
|
66 /** |
|
67 * @see CCoeControl documentation |
|
68 */ |
|
69 void MakeVisible( TBool aVisible ); |
|
70 |
|
71 /** |
|
72 * see CCoeControl |
|
73 */ |
|
74 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
75 |
|
76 /** |
|
77 * see CCoeControl |
|
78 */ |
|
79 void Draw(const TRect& aRect) const; |
|
80 |
|
81 private: // Constructors |
|
82 /** |
|
83 * C++ default constructor. |
|
84 */ |
|
85 CXnWidgetExtensionAdapter( CXnNodePluginIf& aNode ); |
|
86 |
|
87 /** |
|
88 * Two-phased constructor. |
|
89 */ |
|
90 void ConstructL(); |
|
91 |
|
92 private: // New functions |
|
93 /** |
|
94 * Hides this control |
|
95 */ |
|
96 void HidePopupL(); |
|
97 |
|
98 void CalculatePosition(); |
|
99 |
|
100 private: |
|
101 |
|
102 // Data |
|
103 // UiEngine, not owned |
|
104 CXnUiEngine* iUiEngine; |
|
105 |
|
106 // Node |
|
107 CXnNodePluginIf& iNode; |
|
108 |
|
109 // position hint |
|
110 TPositionHint iPositionHint; |
|
111 |
|
112 CXnAppUiAdapter* iAppUiAdapter; |
|
113 |
|
114 |
|
115 }; |
|
116 |
|
117 #endif // __XNWIDGETEXTENSIONADAPTER_H__ |
|
118 |
|
119 // End of File |