dbosnap2.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. // dbosnap2.h - header file for custom osnap api
  13. //
  14. #ifndef _DBOSNAP2_H
  15. #define _DBOSNAP2_H
  16. #include "dbosnap.h"
  17. class AcDbCustomOsnapMode2 : public AcDbCustomOsnapMode{
  18. public:
  19. /// <summary>
  20. /// This method is called to get an icon that will be displayed on osnap
  21. /// right-clicking menu.
  22. /// AutoCAD will not close this handle, you can cache it and destroy
  23. /// the icon resource in destructor.
  24. /// </summary>
  25. ///
  26. /// <returns>
  27. /// Returns a handle to an icon. The icon you supply should be in size of 16*16.
  28. /// </returns>
  29. virtual HICON menuIcon()
  30. {
  31. return NULL;
  32. }
  33. /// <summary>
  34. /// This method is called to get an icon that will be displayed on osnap
  35. /// right-clicking menu for dark theme.
  36. /// AutoCAD will not close this handle, you can cache it and destroy
  37. /// the icon resource in destructor.
  38. /// </summary>
  39. ///
  40. /// <returns>
  41. /// Returns a handle to an icon. The icon you supply should be in size of 16*16.
  42. /// </returns>
  43. virtual HICON menuIconForDarkTheme()
  44. {
  45. return NULL;
  46. }
  47. /// <summary>
  48. /// This method is called to get a string used for displaying on osnap
  49. /// right-clicking menu.
  50. /// </summary>
  51. /// <returns>
  52. /// Returns Custom OSNAP mode display string.
  53. /// </returns>
  54. virtual const ACHAR * displayString()
  55. {
  56. return localModeString();
  57. }
  58. };
  59. #endif // _DBOSNAP2_H