|
1 /* |
|
2 * Copyright (c) 2002-2004 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 * Defines CSatUiViewContainer class |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef CSATUIVIEWCONTAINER_H |
|
22 #define CSATUIVIEWCONTAINER_H |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class CCoeControl; |
|
26 class CAknView; |
|
27 class MSatUiAdapter; |
|
28 class CEikTextListBox; |
|
29 class MEikListBoxObserver; |
|
30 class CSatUiView; |
|
31 |
|
32 class CSatUiTest; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * Container for SatUi View. |
|
38 */ |
|
39 class CSatUiViewContainer : public CCoeControl |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 * @param aIconOn If item icons available |
|
46 * @param aView Pointer to view |
|
47 */ |
|
48 static CSatUiViewContainer* NewL( TBool aIconOn, |
|
49 CSatUiView* aView ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CSatUiViewContainer(); |
|
55 |
|
56 public: // New functions |
|
57 |
|
58 /** |
|
59 * Returns a pointer to the listbox object. |
|
60 * @return The listbox object pointer. |
|
61 */ |
|
62 CAknColumnListBox* ListBox(); |
|
63 |
|
64 public: // Functions from base classes |
|
65 |
|
66 /** |
|
67 * From CCoeControl Counts controls. |
|
68 * @return A number of controls. |
|
69 */ |
|
70 TInt CountComponentControls() const; |
|
71 |
|
72 /** |
|
73 * From CCoeControl Provides a pointer to a control. |
|
74 * @param aIndex Index of the control. |
|
75 * @return A pointer to a control. |
|
76 */ |
|
77 CCoeControl* ComponentControl(TInt aIndex) const; |
|
78 |
|
79 /** |
|
80 * From CCoeControl Sets the size of the main pane. |
|
81 */ |
|
82 void SizeChanged(); |
|
83 |
|
84 /** |
|
85 * From CCoeControl Handles list box key events. |
|
86 * @param aKeyEvent The key event. |
|
87 * @param aType The type of key event. |
|
88 * @return Was a key consumed or not. |
|
89 */ |
|
90 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, |
|
91 TEventCode aType); |
|
92 |
|
93 /** |
|
94 * From CCoeControl Returns SatUi help context. |
|
95 * @param aContext Help context. |
|
96 */ |
|
97 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
98 |
|
99 /** |
|
100 * From CCoeControl Handles a change to the control's resources. |
|
101 * @param aType The messages type id |
|
102 */ |
|
103 void HandleResourceChange( TInt aType ); |
|
104 |
|
105 /** |
|
106 * From CCoeControl Indicate the requirements for control redrawing. |
|
107 * @param aDrawNow Control redraw flags. |
|
108 */ |
|
109 void FocusChanged( TDrawNow aDrawNow ); |
|
110 |
|
111 private: |
|
112 |
|
113 /** |
|
114 * C++ default constructor. |
|
115 */ |
|
116 CSatUiViewContainer( CSatUiView* aView ); |
|
117 |
|
118 /** |
|
119 * Symbian OS constructor. |
|
120 */ |
|
121 void ConstructL( TBool aIconOn ); |
|
122 |
|
123 private: //Data |
|
124 |
|
125 //Own: listbox for SetUpMenu and SelectItem view |
|
126 CAknColumnListBox* iListBox; |
|
127 |
|
128 //If item icons available |
|
129 TBool iIconOn; |
|
130 |
|
131 //Pointer to view |
|
132 CSatUiView* iView; |
|
133 |
|
134 }; |
|
135 |
|
136 #endif // CSATUIVIEWCONTAINER_H |
|
137 |
|
138 // End of File |