|
1 /* |
|
2 * Copyright (c) 2010 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: Status pane's combined subpane component. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_AKNCOMBINEDPANE_H |
|
19 #define C_AKNCOMBINEDPANE_H |
|
20 |
|
21 #include <aknbutton.h> |
|
22 |
|
23 class CEikStatusPaneBase; |
|
24 |
|
25 /** |
|
26 * Combined status pane subpane for binding multiple subpanes under single |
|
27 * window. This enables e.g. common pointer event handling between associated |
|
28 * subpanes. |
|
29 * |
|
30 * Combined pane is currently used for combining the universal indicator pane |
|
31 * and small digital clock pane as one subpane in the landscape status pane |
|
32 * layout with bottom softkeys. |
|
33 * |
|
34 * @lib avkon |
|
35 * @since S60 v5.2 |
|
36 */ |
|
37 NONSHARABLE_CLASS( CAknCombinedPane ) : public CAknButton |
|
38 { |
|
39 public: // Constructors |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 */ |
|
44 static CAknCombinedPane* NewL(); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 ~CAknCombinedPane(); |
|
50 |
|
51 protected: // From base class CCoeControl |
|
52 |
|
53 /** |
|
54 * Returns number of controls inside this control. |
|
55 * |
|
56 * The container controls (@c CEikStatusPaneContainer) of the combined |
|
57 * subpanes are component controls of combined pane. |
|
58 * |
|
59 * @return Number of component controls. |
|
60 */ |
|
61 TInt CountComponentControls() const; |
|
62 |
|
63 /** |
|
64 * Returns a control determined by control index. |
|
65 * |
|
66 * @param aIndex Index of a control to be returned. |
|
67 * |
|
68 * @return Pointer to control. |
|
69 */ |
|
70 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
71 |
|
72 /** |
|
73 * Handles a change to the control's resources. |
|
74 * |
|
75 * @param aType Resource change type. |
|
76 */ |
|
77 void HandleResourceChange( TInt aType ); |
|
78 |
|
79 protected: // From base class CAknButton |
|
80 |
|
81 /** |
|
82 * Constructs the control from a resource file. |
|
83 * |
|
84 * @param aReader Resource reader. |
|
85 */ |
|
86 void ConstructFromResourceL( TResourceReader& aReader ); |
|
87 |
|
88 /** |
|
89 * Handles pointer events inside the control. |
|
90 * |
|
91 * @param aPointerEvent The pointer event to be handled. |
|
92 */ |
|
93 void HandlePointerEventL( const TPointerEvent& aPointerEvent ); |
|
94 |
|
95 private: // Private constructors |
|
96 |
|
97 /** |
|
98 * Default C++ constructor. |
|
99 */ |
|
100 CAknCombinedPane(); |
|
101 |
|
102 /** |
|
103 * Symbian 2nd phase constructor. |
|
104 */ |
|
105 void ConstructL(); |
|
106 |
|
107 private: // New methods |
|
108 |
|
109 /** |
|
110 * Sets the pressed down state of the subpanes. |
|
111 * |
|
112 * @param aPressedDown @c ETrue to set the subpane pressed down, |
|
113 * @c EFalse otherwise. |
|
114 */ |
|
115 void SetSubPanesPressedDown( TBool aPressedDown ); |
|
116 |
|
117 private: // data |
|
118 |
|
119 /** |
|
120 * Subpane information. |
|
121 */ |
|
122 struct TSubPaneData |
|
123 { |
|
124 TUint iUid; ///< UID of the subpane (defined in @c avkon.hrh). |
|
125 TBool iPressedDown; ///< Whether or not currently pressed down. |
|
126 }; |
|
127 |
|
128 /** |
|
129 * Holds information about embedded subpanes. |
|
130 */ |
|
131 RArray<TSubPaneData> iSubPanes; |
|
132 |
|
133 /** |
|
134 * Pointer to the status pane. |
|
135 * Not own. |
|
136 */ |
|
137 CEikStatusPaneBase* iStatusPane; |
|
138 |
|
139 /** |
|
140 * Whether or not the pointer down event has been received in the |
|
141 * combined pane area. |
|
142 */ |
|
143 TBool iPointerDownInCombinedArea; |
|
144 |
|
145 /** |
|
146 * Amount of pixels that a subpane control is shifted right and bottom |
|
147 * for the pressed down effect. |
|
148 */ |
|
149 TInt iPressedDownDelta; |
|
150 }; |
|
151 |
|
152 #endif // C_AKNCOMBINEDPANE_H |