|
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: Background appearance drawer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _XNBGCONTROL_H |
|
20 #define _XNBGCONTROL_H |
|
21 |
|
22 // System includes |
|
23 #include <e32base.h> |
|
24 #include <coecntrl.h> |
|
25 |
|
26 // User includes |
|
27 |
|
28 // Forward declarations |
|
29 class CAknsLayeredBackgroundControlContext; |
|
30 |
|
31 /** |
|
32 * Background appearance drawer |
|
33 * |
|
34 * @ingroup group_xnlayoutengine |
|
35 * @lib xn3layoutengine.lib |
|
36 * @since S60 5.0 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CXnBgControl ) : public CCoeControl |
|
39 { |
|
40 public: |
|
41 // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 */ |
|
46 static CXnBgControl* NewL(); |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. Leaving on stack |
|
50 */ |
|
51 static CXnBgControl* NewLC(); |
|
52 |
|
53 /** |
|
54 * Destructor |
|
55 */ |
|
56 ~CXnBgControl(); |
|
57 |
|
58 private: |
|
59 // private constructors |
|
60 |
|
61 /** |
|
62 * Leaving constructor |
|
63 */ |
|
64 void ConstructL(); |
|
65 |
|
66 /** |
|
67 * C++ default constructor |
|
68 */ |
|
69 CXnBgControl(); |
|
70 |
|
71 public: |
|
72 // from CCoeControl |
|
73 |
|
74 /** |
|
75 * @see CCoeControl |
|
76 */ |
|
77 TInt CountComponentControls() const; |
|
78 |
|
79 /** |
|
80 * @see CCoeControl |
|
81 */ |
|
82 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
83 |
|
84 /** |
|
85 * @see CCoeControl |
|
86 */ |
|
87 void SizeChanged(); |
|
88 |
|
89 /** |
|
90 * @see CCoeControl |
|
91 */ |
|
92 void Draw( const TRect& aRect ) const; |
|
93 |
|
94 /** |
|
95 * @see CCoeControl |
|
96 */ |
|
97 void HandlePointerEventL( const TPointerEvent& aPointerEvent ); |
|
98 |
|
99 public: |
|
100 // new functions |
|
101 void SetCompoundControl( CCoeControl* aControl ); |
|
102 |
|
103 private: |
|
104 // data |
|
105 |
|
106 /** Background control context, Owned */ |
|
107 CAknsLayeredBackgroundControlContext* iBgContext; |
|
108 /** Compound Control, Not owned */ |
|
109 CCoeControl* iControl; |
|
110 }; |
|
111 |
|
112 #endif // _XNBGCONTROL_H |