Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.0 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. scale.h
  5. Abstract:
  6. <abstract>
  7. --*/
  8. #ifndef _GRAPHSCALE_H_
  9. #define _GRAPHSCALE_H_
  10. #define MAX_SCALE_TICS 25
  11. class CGraphScale
  12. {
  13. RECT m_Rect; // Scale boundary rect
  14. INT m_iMaxValue; // Upper scale limit
  15. INT m_iMinValue; // Lower scale limit
  16. INT m_iTextHeight; // Height of font
  17. INT m_nTics; // Number of tic marks
  18. INT m_aiTicPos[MAX_SCALE_TICS + 1]; // Tic positions
  19. void SetTicPositions( void );
  20. enum eScaleFormat {
  21. eMinimumWidth = 1,
  22. eFloatPrecision = 1,
  23. eIntegerPrecision = 0
  24. };
  25. public:
  26. CGraphScale( void );
  27. virtual ~CGraphScale( void );
  28. void SetMaxValue( INT iMaxValue );
  29. void SetMinValue( INT iMinValue );
  30. void SetRect( PRECT pRect );
  31. void Draw( HDC hDC );
  32. INT GetWidth( HDC hDC );
  33. INT GetTicPositions( INT **piTicPos );
  34. };
  35. #endif