|
1 /* |
|
2 * Copyright (c) 2009 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 * |
|
16 */ |
|
17 |
|
18 #ifndef MEMSPYCONTAINER_H |
|
19 #define MEMSPYCONTAINER_H |
|
20 |
|
21 // System includes |
|
22 #include <coecntrl.h> |
|
23 #include <aknlists.h> |
|
24 |
|
25 // User includes |
|
26 #include "MemSpyViewBase.h" |
|
27 #include "MemSpyViewObserver.h" |
|
28 |
|
29 // Classes referenced |
|
30 class CMemSpyEngine; |
|
31 class CMemSpyProcess; |
|
32 class CMemSpyThread; |
|
33 class CMemSpyThreadInfoItemBase; |
|
34 class CMemSpyEngineObjectContainer; |
|
35 class MMemSpyContainerObserver; |
|
36 |
|
37 |
|
38 class CMemSpyContainer : public CCoeControl, public MMemSpyViewObserver |
|
39 { |
|
40 public: |
|
41 CMemSpyContainer( CMemSpyEngine& aEngine, MMemSpyContainerObserver& aObserver ); |
|
42 ~CMemSpyContainer(); |
|
43 void ConstructL( const TRect& aRect ); |
|
44 |
|
45 public: // API |
|
46 inline TMemSpyViewType ActiveViewType() const { return iActiveView->ViewType(); } |
|
47 inline CMemSpyViewBase& ActiveView() const { return *iActiveView; } |
|
48 |
|
49 public: // API |
|
50 void NavigateToParentViewL(); |
|
51 void NavigateToChildViewL(); |
|
52 void HandleCommandL( TInt aCommand ); |
|
53 void SetNewActiveViewL( CMemSpyViewBase* aNewView ); |
|
54 |
|
55 public: // Command handlers |
|
56 void OnCmdViewRefreshL(); |
|
57 |
|
58 private: // From CCoeControl |
|
59 void SizeChanged(); |
|
60 TInt CountComponentControls() const; |
|
61 CCoeControl* ComponentControl(TInt aIndex) const; |
|
62 void Draw(const TRect& aRect) const; |
|
63 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
64 |
|
65 private: // From MMemSpyViewObserver |
|
66 void HandleMemSpyViewEventL( TViewEventType aEvent, TMemSpyViewType aViewType, CMemSpyViewBase& aReportingView, TAny* aContext ); |
|
67 |
|
68 private: // Internal methods |
|
69 CMemSpyViewBase* PrepareTopLevelViewL(); |
|
70 |
|
71 private: // Member data |
|
72 CMemSpyEngine& iEngine; |
|
73 MMemSpyContainerObserver& iObserver; |
|
74 CMemSpyViewBase* iActiveView; |
|
75 CMemSpyViewBase* iPreviousView; |
|
76 }; |
|
77 |
|
78 |
|
79 #endif |