AcEdSteeringWheel.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // Name: AcEdSteeringWheel.h
  12. //
  13. // Description:
  14. //
  15. ///////////////////////////////////////////////////////////////////////////////
  16. #pragma once
  17. #include "acgs.h"
  18. #include "dbNavSettings.h"
  19. class AcEdSteeringWheelReactor;
  20. class AcEdSteeringWheel;
  21. AcEdSteeringWheel* acedCreateSteeringWheel ();
  22. void acedDestroySteeringWheel(AcEdSteeringWheel* pWheel);
  23. ///////////////////////////////////////////////////////////////////////////////
  24. //
  25. // Interface AcEdSteeringWheel
  26. //
  27. class AcEdSteeringWheel
  28. {
  29. public:
  30. enum WheelType
  31. {
  32. kExterior = 0, ///< View Object Wheel.
  33. kInterior, ///< Tour Buiding Wheel.
  34. kFull, ///< Full Navigation Wheel.
  35. k2D, ///< 2D Steering Wheel.
  36. kMini, ///< Mini View Object Wheel.
  37. kMiniOther, ///< Mini Tour Building Wheel.
  38. kMiniEight, ///< Mini Full Navigation Wheel.
  39. kTotalCount, ///< Total number of SteeringWheel types.
  40. kWheelNone ///< Marks a disabled SteeringWheel.
  41. };
  42. enum MenuType
  43. {
  44. // Steering Wheel Menus
  45. kMenuNone = 0,
  46. kMenuInterior,
  47. kMenuExterior,
  48. kMenuFull,
  49. kMenu2D
  50. };
  51. // Message handlers
  52. virtual void onKeyDown (UINT nChar, UINT nRepCount, UINT nFlags) = 0;
  53. virtual void onKeyUp (UINT nChar, UINT nRepCount, UINT nFlags) = 0;
  54. virtual bool onMouseWheel (UINT nFlags, short zDelta, POINT pt) = 0;
  55. virtual void onMouseMove (UINT nFlags, POINT pt) = 0;
  56. virtual void onLButtonUp (UINT nFlags, POINT pt) = 0;
  57. virtual void onLButtonDown (UINT nFlags, POINT pt) = 0;
  58. virtual void onRButtonUp (UINT nFlags, POINT pt) = 0;
  59. virtual void onRButtonDown (UINT nFlags, POINT pt) = 0;
  60. virtual void onMButtonDown (UINT nFlags, POINT pt) = 0;
  61. virtual void onMButtonUp (UINT nFlags, POINT pt) = 0;
  62. virtual void setHomeCamera (const AcDbHomeView& home) = 0;
  63. virtual bool setLargeWheelOpacity (int nOpacity) = 0;
  64. virtual int getLargeWheelOpacity () = 0;
  65. virtual bool setMiniWheelOpacity (int nOpacity) = 0;
  66. virtual int getMiniWheelOpacity () = 0;
  67. virtual bool setWalkSpeed(double speed) = 0;
  68. virtual double getWalkSpeed() = 0;
  69. virtual bool setActiveWheel(WheelType type) = 0;
  70. virtual WheelType getActiveWheel() = 0;
  71. virtual void enableWheel (bool enable) = 0;
  72. virtual bool isWheelEnabled() = 0;
  73. virtual AcGsModel * getModel() = 0;
  74. virtual AcGsView * getView() = 0;
  75. virtual HWND getDeviceHandle() = 0;
  76. virtual bool attachView (HWND hDevice, AcGsView* pGsView) = 0;
  77. virtual void detachView () = 0;
  78. virtual void addReactor (AcEdSteeringWheelReactor* pReactor) = 0;
  79. virtual void removeReactor(AcEdSteeringWheelReactor* pReactor) = 0;
  80. };
  81. ///////////////////////////////////////////////////////////////////////////////
  82. //
  83. // Interface AcEdSteeringWheelReactor
  84. //
  85. class AcEdSteeringWheelReactor
  86. {
  87. public:
  88. virtual void modifyContextMenu(HMENU hMenu) = 0;
  89. virtual void onSetCursor(HCURSOR hCursor) = 0;
  90. virtual void onBeginOperation() = 0;
  91. virtual void onEndOperation() = 0;
  92. virtual void onBeginShot() = 0;
  93. virtual void onEndShot() = 0;
  94. virtual void onClose() = 0;
  95. };