Source code of Windows XP (NT5)
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.

52 lines
1.5 KiB

  1. #ifndef __TRACKER_H__
  2. #define __TRACKER_H__
  3. #include "sprite.h"
  4. extern HCURSOR HCursorFromTrackerState( int m );
  5. class CTracker : public CSprite
  6. {
  7. public:
  8. enum STATE
  9. { // WARNING - mapTrackerStateToPHCursor
  10. nil, // (in tracker.cpp) is
  11. predrag, // dependant on the
  12. moving, // ordering of this enum!
  13. resizingTop,
  14. resizingLeft,
  15. resizingRight,
  16. resizingBottom,
  17. resizingTopLeft,
  18. resizingTopRight,
  19. resizingBottomLeft,
  20. resizingBottomRight,
  21. };
  22. enum { HANDLE_SIZE = 3 }; // size of tracker resize handles
  23. enum EDGES
  24. {
  25. none = 0,
  26. left = 1,
  27. top = 2,
  28. right = 4,
  29. bottom = 8,
  30. all = 15
  31. };
  32. static void DrawBorder ( CDC* pDC, const CRect& rect, EDGES edges = all );
  33. static void DrawHandles( CDC* pDC, const CRect& rect, EDGES edges );
  34. static STATE HitTest(const CRect& rect, CPoint pt, STATE defaultState );
  35. static void DrawBorderRgn ( CDC* pdc, const CRect& trackerRect, CRgn *pcRgnPoly );
  36. static void DrawHandlesRgn( CDC* pDC, const CRect& rect, EDGES edges, CRgn *pcRgnPoly );
  37. static STATE HitTestRgn(const CRect& rect, CPoint pt, STATE defaultState, CRgn *pcRgnPoly );
  38. static void CleanUpTracker();
  39. };
  40. #endif // __TRACKER_H__