Team Fortress 2 Source Code as on 22/4/2020
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.

57 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TOOLBLOCK_H
  8. #define TOOLBLOCK_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "Box3D.h"
  13. #include "ToolInterface.h"
  14. class CToolBlockMessageWnd;
  15. class CToolBlock : public Box3D
  16. {
  17. friend class CToolBlockMessageWnd;
  18. public:
  19. CToolBlock();
  20. ~CToolBlock();
  21. //
  22. // CBaseTool implementation.
  23. //
  24. virtual ToolID_t GetToolID(void) { return TOOL_BLOCK; }
  25. virtual bool OnContextMenu2D(CMapView2D *pView, UINT nFlags, const Vector2D &vPoint);
  26. virtual bool OnKeyDown2D(CMapView2D *pView, UINT nChar, UINT nRepCnt, UINT nFlags);
  27. virtual bool OnLMouseDown2D(CMapView2D *pView, UINT nFlags, const Vector2D &vPoint);
  28. virtual bool OnLMouseDown3D(CMapView3D *pView, UINT nFlags, const Vector2D &vPoint) ;
  29. virtual bool OnLMouseUp2D(CMapView2D *pView, UINT nFlags, const Vector2D &vPoint);
  30. virtual bool OnMouseMove2D(CMapView2D *pView, UINT nFlags, const Vector2D &vPoint);
  31. virtual bool OnMouseMove3D(CMapView3D *pView, UINT nFlags, const Vector2D &vPoint);
  32. virtual bool OnLMouseUp3D(CMapView3D *pView, UINT nFlags, const Vector2D &vPoint);
  33. virtual bool OnKeyDown3D(CMapView3D *pView, UINT nChar, UINT nRepCnt, UINT nFlags);
  34. private:
  35. void CreateMapObject(CMapView *pView);
  36. void OnEscape();
  37. void SetBlockCursor();
  38. };
  39. #endif // TOOLBLOCK_H