Annotation of mstools/samples/sdktools/capview/timer.h, revision 1.1

1.1     ! root        1: /*
        !             2:  *
        !             3:  */
        !             4: 
        !             5: class TIMER : public DISPOBJ
        !             6: {
        !             7:     int                NumCalls;
        !             8:     TIMETYPE   TotalTime;
        !             9:     TIMETYPE   TimeThisFunction;
        !            10:     CString     strDllName;
        !            11:     CString     strFunctName;
        !            12:     CString    strDisplay;
        !            13:     CRect      rtDisplay;
        !            14: 
        !            15:     int                perCent[4];
        !            16:     int         iBrush[4];
        !            17: 
        !            18: public:
        !            19:    TIMER(char * pchDll, char * pchFunction, int cCalls, TIMETYPE timeTotal,
        !            20:           TIMETYPE timeThisFunc);
        !            21:     TIMER * Parent()
        !            22:     {
        !            23:         return (TIMER *) DISPOBJ::Parent();
        !            24:     }
        !            25: 
        !            26:     TIMER * Child()
        !            27:     {
        !            28:         return (TIMER *) DISPOBJ::Child();
        !            29:     }
        !            30:     
        !            31:     TIMER * Sib()
        !            32:     {
        !            33:         return (TIMER *) DISPOBJ::Sib();
        !            34:     }
        !            35: 
        !            36:     TIMETYPE& timeTotal() { return TotalTime; };
        !            37: 
        !            38:     void AddTime(TIMETYPE timeAdd) { TimeThisFunction += timeAdd; TotalTime += timeAdd; return; };
        !            39:     
        !            40:     void DoForeground(CDC * cdc, BOOL fZoom, RANGESTRUCT * prs);
        !            41:     int  Height(BOOL fZoom) { return fZoom ? 13 : (rtDisplay.Height() + 8);}
        !            42:     int  Width(BOOL fZoom) { return fZoom ? 28 : (rtDisplay.Width() + 8);}
        !            43: 
        !            44:     void DoSetPercents(TIMETYPE t);
        !            45:     void DoSetColors(RANGESTRUCT * prs);
        !            46:     void DoSetString(void);
        !            47:     void DoAssignSize(CDC * pcdc);
        !            48: };
        !            49: 
        !            50: class TIMERROOT
        !            51: {
        !            52:     TIMER *     pRoot;
        !            53:     int         level;
        !            54:     TIMER *     pTimerCur;
        !            55: 
        !            56: public:
        !            57:     TIMERROOT() { pTimerCur = pRoot = NULL; level = 0; };
        !            58:     
        !            59:    void AddTiming(int iDepth, char * szModule, char * szName, int cCalls, TIMETYPE totalTime, TIMETYPE functionTime);
        !            60: 
        !            61:     void PaintTree(CDC * cdc, BOOL fZoom, RANGESTRUCT * prs, RECT rt)
        !            62:     {
        !            63:         pRoot->PaintTree(cdc, fZoom, prs, rt);
        !            64:         return;
        !            65:     };
        !            66: 
        !            67:     void SetProperties(int flags, BOOL fZoom = FALSE, RANGESTRUCT * prs = 0, CDC * pcdc = 0);
        !            68: 
        !            69:     BOOL DblClick( CPoint pt) { return pRoot->DblClick(pt); };
        !            70: 
        !            71:     void ExpandAll(void) { pRoot->ExpandAll(); return; };
        !            72: 
        !            73:     CRect& RectTotal(void) { return pRoot->rtTotal; };
        !            74: };

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.