|
1 /* |
|
2 * Copyright (c) 2007-2007 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: Native ui controller main view |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAINATIVEUIVIEW_H |
|
20 #define CAINATIVEUIVIEW_H |
|
21 |
|
22 #include <coecntrl.h> |
|
23 #include <coeview.h> |
|
24 namespace AiNativeUiController |
|
25 { |
|
26 |
|
27 /** |
|
28 * It is the main view of the Idle. It consists of a single component |
|
29 * control. |
|
30 * |
|
31 * @sinces S60 3.2 |
|
32 */ |
|
33 class CAiNativeUiView |
|
34 : public CCoeControl, |
|
35 public MCoeView |
|
36 { |
|
37 |
|
38 public: // Constructors and destructor |
|
39 |
|
40 static CAiNativeUiView* NewL( |
|
41 const TRect& aRect, |
|
42 CAppUi* aAppUi ); |
|
43 |
|
44 ~CAiNativeUiView(); |
|
45 |
|
46 // From base class |
|
47 |
|
48 void SizeChanged(); |
|
49 |
|
50 TInt CountComponentControls() const; |
|
51 |
|
52 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
53 |
|
54 TKeyResponse OfferKeyEventL( |
|
55 const TKeyEvent& aKeyEvent, |
|
56 TEventCode aType ); |
|
57 |
|
58 void SetControl( CCoeControl* aControl ); |
|
59 |
|
60 protected: |
|
61 |
|
62 // from base classes |
|
63 |
|
64 void Draw( const TRect& aRect ) const; |
|
65 |
|
66 // from MCoeView |
|
67 |
|
68 TVwsViewId ViewId() const; |
|
69 |
|
70 void ViewActivatedL( const TVwsViewId& aPrevViewId, |
|
71 TUid aCustomMessageId, |
|
72 const TDesC8& aCustomMessage ); |
|
73 |
|
74 void ViewDeactivated(); |
|
75 |
|
76 private: |
|
77 |
|
78 |
|
79 // Construction |
|
80 |
|
81 CAiNativeUiView( CAppUi* aAppUi ); |
|
82 |
|
83 void ConstructL( const TRect& aRect ); |
|
84 |
|
85 private: // Data |
|
86 |
|
87 /** |
|
88 * Pointer to our app ui. |
|
89 * Not owned. |
|
90 */ |
|
91 CAppUi* iAppUi; |
|
92 |
|
93 /** |
|
94 * View control. Not own. |
|
95 */ |
|
96 CCoeControl* iControl; |
|
97 |
|
98 }; |
|
99 |
|
100 } // AiNativeUiController |
|
101 |
|
102 #endif // CAINATIVEUIVIEW_H |
|
103 |
|
104 // End of File |