HeapLister (code 2)
Volume Number: 6
Issue Number: 10
Column Tag: C Forum
Related Info: Memory Manager
HeapLister (code 2)
By Denis Molony, Sultanate of Oman
Listing: CHeapListerPane.h
#define _H_CHeapListerPane
#include
#include “CHeapInfo.h”
struct CHeapListerPane : CPanorama
{
Cursor itsCursor;
void IHeapListerPane (CView *anEnclosure,
CBureaucrat *aSupervisor,
short aWidth, short aHeight,
short aHEncl, short aVEncl,
SizingOption aHSizing, SizingOption
aVSizing);
void Draw (Rect *area);
void DrawLine (long lineNo);
void DoClick (Point hitPt, short modifierKeys,
long when);
void SetPaneSize (void);
void ScrollToSelection (void);
};
Listing: CHeapListerPane.c
#include “CHeapListerPane.h”
#include “CHeapInfo.h”
#include “CHeapListerDoc.h”
#include “HeapConstants.h”
#include “DPMUtilities.h”
extern CHeapInfo *gHeap;
extern short gClicks;
void CHeapListerPane::IHeapListerPane
(CView *anEnclosure,
CBureaucrat *aSupervisor,
short aWidth, short aHeight,
short aHEncl, short aVEncl,
SizingOption aHSizing,
SizingOption aVSizing)
{
CPanorama::IPanorama(anEnclosure, aSupervisor,
aWidth, aHeight, aHEncl, aVEncl, aHSizing, aVSizing);
wantsClicks = TRUE;
}
void CHeapListerPane::Draw (Rect *area)
{
Str255 text;
THz zonePtr;
blkHdr *hdrPtr;
int h1 = 5;
int h2 = 180;
int h3 = 310;