|
1 /* |
|
2 =============================================================================== |
|
3 Name : NPRBrowserConatiner.h |
|
4 Author : Symsource |
|
5 |
|
6 Copyright (c) 2009 Symbian Foundation Ltd |
|
7 This component and the accompanying materials are made available |
|
8 under the terms of the License "Eclipse Public License v1.0" |
|
9 which accompanies this distribution, and is available |
|
10 at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
11 |
|
12 Initial Contributors: |
|
13 - Symsource |
|
14 |
|
15 Contributors: |
|
16 - Symsource |
|
17 |
|
18 Description : Container for Nokia browser control to show NPR's Story |
|
19 ================================================================================ |
|
20 */ |
|
21 |
|
22 #ifndef __NPR_BROWSER_H__ |
|
23 #define __NPR_BROWSER_H__ |
|
24 |
|
25 #include <coecntrl.h> |
|
26 #include "BrCtlInterface.h" |
|
27 |
|
28 class CBrowserContainer : public CCoeControl, |
|
29 public MCoeControlObserver, |
|
30 public MBrCtlLoadEventObserver, |
|
31 public MEikCommandObserver |
|
32 { |
|
33 public: |
|
34 void ConstructL(const TRect& aRect); |
|
35 ~CBrowserContainer(); |
|
36 |
|
37 public: |
|
38 inline CBrCtlInterface* Browser() const {return iBrowser;} |
|
39 void ProcessCommandL(TInt aCommandId); |
|
40 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
41 TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
42 |
|
43 //From MBrCtlLoadEventObserver |
|
44 void HandleBrowserLoadEventL(TBrCtlDefs::TBrCtlLoadEvent aLoadEvent, TUint aSize, TUint16 aTransactionId); |
|
45 void Listen(); |
|
46 |
|
47 private: |
|
48 void SizeChanged(); |
|
49 TInt CountComponentControls() const; |
|
50 CCoeControl* ComponentControl(TInt aIndex) const; |
|
51 void Draw(const TRect& aRect) const; |
|
52 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
53 void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); |
|
54 void HandleResourceChange(TInt aType); |
|
55 |
|
56 private: |
|
57 CBrCtlInterface* iBrowser; |
|
58 TUint iBrowserCaps; |
|
59 TInt iCommandBase; |
|
60 }; |
|
61 |
|
62 #endif // __NPR_BROWSER_H__ |
|
63 |
|
64 |
|
65 |