home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 1.ddi / GDIDEMO.ZIP / ARTYPRIV.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.6 KB  |  65 lines

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