|
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 MEMSPYVIEWPROCESSES_H |
|
19 #define MEMSPYVIEWPROCESSES_H |
|
20 |
|
21 // System includes |
|
22 #include <coecntrl.h> |
|
23 #include <aknlists.h> |
|
24 |
|
25 // User includes |
|
26 #include "MemSpyViewBase.h" |
|
27 |
|
28 // Classes referenced |
|
29 class CMemSpyProcess; |
|
30 class CAknSearchField; |
|
31 |
|
32 |
|
33 class CMemSpyViewProcesses : public CMemSpyViewBase |
|
34 { |
|
35 public: |
|
36 CMemSpyViewProcesses( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver ); |
|
37 CMemSpyViewProcesses( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyProcess& aProcess ); |
|
38 ~CMemSpyViewProcesses(); |
|
39 void ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune = NULL ); |
|
40 |
|
41 public: // API |
|
42 CMemSpyProcess& CurrentProcess() const; |
|
43 |
|
44 public: // From CMemSpyViewBase |
|
45 void RefreshL(); |
|
46 TMemSpyViewType ViewType() const; |
|
47 CMemSpyViewBase* PrepareParentViewL(); |
|
48 CMemSpyViewBase* PrepareChildViewL(); |
|
49 TBool HandleCommandL( TInt aCommand ); |
|
50 |
|
51 public: // Menu framework |
|
52 TUint MenuCascadeResourceId() const { return R_MEMSPY_MENUPANE_PROCESS; } |
|
53 TInt MenuCascadeCommandId() const { return EMemSpyCmdProcess; } |
|
54 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
55 |
|
56 private: // Command handlers |
|
57 |
|
58 // Sorting |
|
59 void OnCmdSortByIdL(); |
|
60 void OnCmdSortByNameL(); |
|
61 void OnCmdSortByThreadCountL(); |
|
62 void OnCmdSortByCodeSegsL(); |
|
63 void OnCmdSortByHeapUsageL(); |
|
64 void OnCmdSortByStackUsageL(); |
|
65 |
|
66 // Info |
|
67 void OnCmdInfoSummaryL(); |
|
68 void OnCmdInfoHandlesL(); |
|
69 |
|
70 // Ending |
|
71 void OnCmdEndTerminateL(); |
|
72 void OnCmdEndPanicL(); |
|
73 void OnCmdEndKillL(); |
|
74 |
|
75 private: // From CMemSpyViewBase |
|
76 void SetListBoxModelL(); |
|
77 void HandleListBoxItemActionedL( TInt aIndex ); |
|
78 void HandleListBoxItemSelectedL( TInt aIndex ); |
|
79 |
|
80 private: // From CCoeControl |
|
81 void SizeChanged(); |
|
82 TInt CountComponentControls() const; |
|
83 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
84 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
85 void FocusChanged( TDrawNow /*aDrawNow*/ ); |
|
86 |
|
87 private: // From MCoeControlObserver |
|
88 void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType ); |
|
89 |
|
90 private: // Internal methods |
|
91 void SelectListBoxItemByFindTextL(); |
|
92 |
|
93 private: // Data members |
|
94 CMemSpyProcess* iCurrentProcess; |
|
95 CAknSearchField* iSearchField; |
|
96 HBufC* iMatcherBuffer; |
|
97 }; |
|
98 |
|
99 |
|
100 #endif |