home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / MTHREAD.PAK / ARTYPRIV.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  2KB  |  68 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1991, 1993 by Borland International
  3. //   classes used internally by the multi-thread TArtyWindow
  4. //----------------------------------------------------------------------------
  5. #ifndef __ARTYINTERNAL_H
  6. #define __ARTYINTERNAL_H
  7.  
  8. #ifndef __OWL_COLOR_H
  9.   #include <owl\color.h>
  10. #endif
  11. class _EXPCLASS TDC;
  12. class _EXPCLASS TPen;
  13.  
  14. // Arty demo constants 
  15. const int   MaxLineCount      =  100;
  16. const int   MaxIconicLineCount=  5;
  17. const int   MaxColorDuration  =  10;
  18.  
  19.  
  20. struct TLineRec {
  21.   int    LX1,LY1, LX2,LY2;
  22.   TColor Color;
  23. };
  24.  
  25. class TList {
  26.   public:
  27.     TList(int _max);
  28.     void Redraw(TDC&);
  29.     void ResetLines();
  30.     void ScaleTo(int, int);
  31.     void LineTick(TDC&);
  32.  
  33.   protected:
  34.     TLineRec  Line[MaxLineCount];
  35.     int       Xmax, Ymax;
  36.  
  37.     void AdjustX(int&, int&);
  38.     void AdjustY(int&, int&);
  39.  
  40.     virtual void DrawLine(TDC&, int);
  41.     virtual void EraseLine(TDC&, int);
  42.  
  43.     void SelectNewColor();
  44.     void SelectNewDeltaValues();
  45.  
  46.   private:
  47.     int  MaxLines;
  48.     int  X1, Y1, X2, Y2;
  49.     int  MaxDelta;
  50.     int  ColorDuration;
  51.     int  IncrementCount;
  52.     int  DeltaX1, DeltaY1, DeltaX2, DeltaY2;
  53.     int  CurrentLine;
  54.     long PenColor;
  55. };
  56.  
  57. // Quads draw 4 reflections of each line
  58. //
  59. class TQuadList : public TList {
  60.   public:
  61.     TQuadList(int _max) : TList(_max) {}
  62.  
  63.     void DrawLine(TDC&, int);
  64.     void EraseLine(TDC&, int);
  65. };
  66.  
  67. #endif
  68.