home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / MTHREAD.PAK / LINE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  1.1 KB  |  50 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1991, 1995 by Borland International, All Rights Reserved
  4. //
  5. // Multi-thread MoveToLineTo demo window header
  6. //----------------------------------------------------------------------------
  7. #if !defined(LINE_H)
  8. #define LINE_H
  9.  
  10. #include "demobase.h"
  11.  
  12. //
  13. // MoveToLineTo demo constants
  14. //
  15. const int  MaxPoints    = 15;  // Number of points to be drawn
  16. const int  IconicPoints = 6;   // Number of points to draw when iconized
  17.  
  18. struct TRPoint {
  19.   float X, Y;
  20. };
  21.  
  22. class TMoveToLineToWindow : public TBaseDemoWindow {
  23.   public:
  24.     TMoveToLineToWindow();
  25.    ~TMoveToLineToWindow();
  26.  
  27.     void Paint(TDC& dc, bool, TRect&);
  28.  
  29.   protected:
  30.     void EvSize(uint, TSize& Size);
  31.  
  32.   private:
  33.     TRPoint     Points[MaxPoints];
  34.     float       Rotation;     // in radians
  35.     int         PointCount;
  36.     bool        Iconized;
  37.  
  38.     TMemoryDC*  MemDC;
  39.     TBitmap*    Bitmap;
  40.  
  41.     void        RotatePoints();
  42.  
  43.     void        ClockTick();
  44.  
  45.   DECLARE_CASTABLE;
  46.   DECLARE_RESPONSE_TABLE(TMoveToLineToWindow);
  47. };
  48.  
  49. #endif  // LINE_H
  50.