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 //cigasto |
|
37 class RMemSpySession; |
|
38 |
|
39 class CMemSpyContainer : public CCoeControl, public MMemSpyViewObserver |
|
40 { |
|
41 public: |
|
42 //CMemSpyContainer( CMemSpyEngine& aEngine, MMemSpyContainerObserver& aObserver ); |
|
43 CMemSpyContainer( RMemSpySession& aSession, MMemSpyContainerObserver& aObserver ); |
|
44 ~CMemSpyContainer(); |
|
45 void ConstructL( const TRect& aRect ); |
|
46 |
|
47 public: // API |
|
48 inline TMemSpyViewType ActiveViewType() const { return iActiveView->ViewType(); } |
|
49 inline CMemSpyViewBase& ActiveView() const { return *iActiveView; } |
|
50 |
|
51 public: // API |
|
52 void NavigateToParentViewL(); |
|
53 void NavigateToChildViewL(); |
|
54 void HandleCommandL( TInt aCommand ); |
|
55 void SetNewActiveViewL( CMemSpyViewBase* aNewView ); |
|
56 |
|
57 public: // Command handlers |
|
58 void OnCmdViewRefreshL(); |
|
59 |
|
60 private: // From CCoeControl |
|
61 void SizeChanged(); |
|
62 TInt CountComponentControls() const; |
|
63 CCoeControl* ComponentControl(TInt aIndex) const; |
|
64 void Draw(const TRect& aRect) const; |
|
65 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
66 |
|
67 private: // From MMemSpyViewObserver |
|
68 void HandleMemSpyViewEventL( TViewEventType aEvent, TMemSpyViewType aViewType, CMemSpyViewBase& aReportingView, TAny* aContext ); |
|
69 |
|
70 private: // Internal methods |
|
71 CMemSpyViewBase* PrepareTopLevelViewL(); |
|
72 |
|
73 private: // Member data |
|
74 //CMemSpyEngine& iEngine; |
|
75 RMemSpySession& iMemSpySession; |
|
76 MMemSpyContainerObserver& iObserver; |
|
77 CMemSpyViewBase* iActiveView; |
|
78 CMemSpyViewBase* iPreviousView; |
|
79 }; |
|
80 |
|
81 |
|
82 #endif |
|