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.

52 lines
1.7 KiB

  1. #ifndef __T_POLY_H__
  2. #define __T_POLY_H__
  3. #include "imgtools.h"
  4. class CPolygonTool : public CClosedFormTool
  5. {
  6. DECLARE_DYNAMIC( CPolygonTool )
  7. protected:
  8. CObArray m_cObArrayPoints;
  9. CRect m_cRectBounding;
  10. CImgWnd* m_pImgWnd;
  11. MTI m_MTI;
  12. void DeleteArrayContents ( void );
  13. void AdjustBoundingRect ( void );
  14. BOOL CopyPointsToMemArray( CPoint **pcPoint, int *piNumElements );
  15. void AddPoint ( POINT ptNewPoint );
  16. void SetCurrentPoint ( POINT ptNewPoint );
  17. virtual void RenderInProgress ( CDC* pDC );
  18. virtual void RenderFinal ( CDC* pDC );
  19. virtual BOOL SetupPenBrush ( HDC hDC, BOOL bLeftButton, BOOL bSetup, BOOL bCtrlDown );
  20. virtual void AdjustPointsForConstraint( MTI *pmti );
  21. virtual void PreProcessPoints ( MTI *pmti );
  22. public:
  23. CPolygonTool();
  24. ~CPolygonTool();
  25. virtual void Render ( CDC* pDC, CRect& rect, BOOL bDraw, BOOL bCommit, BOOL bCtrlDown );
  26. virtual void OnEnter ( CImgWnd* pImgWnd, MTI* pmti );
  27. virtual void OnLeave ( CImgWnd* pImgWnd, MTI* pmti );
  28. virtual void OnActivate ( BOOL bActivate );
  29. virtual void OnStartDrag ( CImgWnd* pImgWnd, MTI* pmti );
  30. virtual void OnEndDrag ( CImgWnd* pImgWnd, MTI* pmti );
  31. virtual void OnDrag ( CImgWnd* pImgWnd, MTI* pmti );
  32. virtual void OnCancel ( CImgWnd* pImgWnd );
  33. virtual void OnUpdateColors( CImgWnd* pImgWnd );
  34. virtual void EndMultiptOperation ( BOOL bAbort = FALSE );
  35. virtual BOOL CanEndMultiptOperation( MTI* pmti );
  36. friend class CImgWnd;
  37. };
  38. #endif // __T_POLY_H__