|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Provisioning context list container |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CWPCXCONTAINER_H |
|
21 #define CWPCXCONTAINER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <aknview.h> |
|
25 #include <bamdesca.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CAknSingleStyleListBox; |
|
29 class CWPEngine; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * CWPCxDocument container control class. |
|
35 * |
|
36 */ |
|
37 class CWPCxContainer : public CCoeControl, |
|
38 private MCoeControlObserver |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * C++ constructor |
|
44 */ |
|
45 CWPCxContainer( CWPEngine& aEngine, CAknView& aAppView ); |
|
46 |
|
47 /** |
|
48 * Symbian default constructor. |
|
49 * @param aRect Frame rectangle for container. |
|
50 */ |
|
51 void ConstructL(const TRect& aRect); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 ~CWPCxContainer(); |
|
57 |
|
58 public: // from CCoeControl |
|
59 |
|
60 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
61 void HandleResourceChange( TInt aType ); |
|
62 |
|
63 public: // new methods |
|
64 |
|
65 /** |
|
66 * Returns the UID of the currently selected context. |
|
67 * @return Context UID |
|
68 */ |
|
69 TUint32 CurrentContext() const; |
|
70 |
|
71 /** |
|
72 * Returns the UID of the currently selected context. |
|
73 * @return Context UID |
|
74 */ |
|
75 TPtrC CurrentContextName() const; |
|
76 |
|
77 /** |
|
78 * Returns number of contexts in list. |
|
79 * @return Number of contexts |
|
80 */ |
|
81 TInt ContextCount() const; |
|
82 |
|
83 /** |
|
84 * Updates the list of contexts. |
|
85 */ |
|
86 void UpdateContextsL(); |
|
87 |
|
88 private: // from CCoeControl |
|
89 |
|
90 void SizeChanged(); |
|
91 TInt CountComponentControls() const; |
|
92 CCoeControl* ComponentControl(TInt aIndex) const; |
|
93 void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
94 |
|
95 private: // from MCoeControlObserver |
|
96 |
|
97 void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); |
|
98 |
|
99 private: //data |
|
100 |
|
101 /// The list box. Owns. |
|
102 CAknSingleStyleListBox* iListBox; |
|
103 |
|
104 /// Provisioning engine. Refs. |
|
105 CWPEngine& iEngine; |
|
106 |
|
107 /// List of context uids. Owns. |
|
108 CArrayFix<TUint32>* iCxUids; |
|
109 |
|
110 /// List of visible lines. Owns. |
|
111 CDesCArray* iLines; |
|
112 |
|
113 /// The application view |
|
114 CAknView& iAppView; |
|
115 }; |
|
116 |
|
117 #endif |
|
118 |
|
119 // End of File |