dbSelectGrip.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //
  2. //////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Copyright 2015 Autodesk, Inc. All rights reserved.
  5. //
  6. // Use of this software is subject to the terms of the Autodesk license
  7. // agreement provided at the time of installation or download, or which
  8. // otherwise accompanies this software in either electronic or hard copy form.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. //
  12. //
  13. // dbSelectVPGrip.h - public header file for AcDbSelectVPGrip api
  14. //
  15. #ifndef _DBSELECTGRIP_H
  16. #define _DBSELECTGRIP_H
  17. #include "acdb.h"
  18. #include "dbmain.h"
  19. #pragma pack (push, 8)
  20. ////////////////////////////////////////////////////////////////////////
  21. // class AcDbSelectGrip
  22. ////////////////////////////////////////////////////////////////////////
  23. /// <summary>
  24. /// This class allows applications to determine whether a grip on a
  25. /// custom entity is selectable.
  26. /// </summary>
  27. ///
  28. /// <remarks>
  29. /// Currently only called from the AutoCAD grip mechanism before
  30. /// snapping to, hovering, or heating a grip.
  31. /// </remarks>
  32. ///
  33. class ADESK_NO_VTABLE AcDbSelectGrip : public AcRxObject {
  34. public:
  35. ACRX_DECLARE_MEMBERS(AcDbSelectGrip);
  36. /// <summary>
  37. /// Determine whether a grip on a custom entity is selectable.
  38. /// </summary>
  39. ///
  40. /// <param name="pEnt">
  41. /// [Input] Pointer to the entity that this grip belongs to.
  42. /// </param>
  43. ///
  44. /// <param name="pVd">
  45. /// [Input] Pointer to a current viewport context AcGiViewportDraw object.
  46. /// </param>
  47. ///
  48. /// <param name="pAppData">
  49. /// [Input] The private AcDbGripData appdata assigned to the custom grip.
  50. /// Use this private appdata along with pVd to determine whether the grip
  51. /// is selectable in the current (viewport) context.
  52. /// </param>
  53. ///
  54. /// <returns>
  55. /// Returns true if the grip is selectable and false if not.
  56. /// </returns>
  57. ///
  58. virtual bool SelectGrip(const AcDbEntity * pEnt,
  59. const AcGiViewportDraw* pVd,
  60. const void * pAppData) = 0;
  61. };
  62. #pragma pack (pop)
  63. #endif // _DBSELECTGRIP_H