AcPlPlotProgress.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. // DESCRIPTION: Header for AcPlPlotProgress.
  12. //
  13. #ifndef ACPLPLOTPROGRESS_H
  14. #define ACPLPLOTPROGRESS_H
  15. #include "AdAChar.h"
  16. #include "AcPl.h"
  17. class AcPlPlotProgressDialog;
  18. class ADESK_NO_VTABLE AcPlPlotProgress
  19. {
  20. public:
  21. enum SheetCancelStatus {
  22. kSheetContinue,
  23. kSheetCanceledByCancelButton,
  24. kSheetCanceledByCancelAllButton,
  25. kSheetCanceledByCaller,
  26. kSheetCancelStatusCount
  27. };
  28. enum PlotCancelStatus {
  29. kPlotContinue,
  30. kPlotCanceledByCaller,
  31. kPlotCanceledByCancelAllButton,
  32. kPlotCancelStatusCount
  33. };
  34. virtual bool isPlotCancelled() const = 0;
  35. virtual void setPlotCancelStatus(PlotCancelStatus Cancel) = 0;
  36. virtual PlotCancelStatus plotCancelStatus() const = 0;
  37. virtual void setPlotProgressRange(int nLower, int nUpper) = 0;
  38. virtual void getPlotProgressRange(int &nLower, int &nUpper) const = 0;
  39. virtual void setPlotProgressPos(int nPos) = 0;
  40. virtual int plotProgressPos() const = 0;
  41. virtual bool isSheetCancelled() const = 0;
  42. virtual void setSheetCancelStatus(SheetCancelStatus Cancel) = 0;
  43. virtual SheetCancelStatus sheetCancelStatus() const = 0;
  44. virtual void setSheetProgressRange(int nLower, int nUpper) = 0;
  45. virtual void getSheetProgressRange(int &nLower, int &nUpper) const = 0;
  46. virtual void setSheetProgressPos(int nPos) = 0;
  47. virtual int sheetProgressPos() const = 0;
  48. virtual bool setIsVisible(bool bVisible) = 0;
  49. virtual bool isVisible() const = 0;
  50. virtual bool setStatusMsgString(const ACHAR *pMsg) = 0;
  51. virtual bool getStatusMsgString(ACHAR *& pMsg) const = 0;
  52. virtual void heartbeat(void) = 0;
  53. };
  54. typedef void (*ACPLPLTPRGHELPPROC)(AcPlPlotProgressDialog *pAcPlPlotProgressDialog);
  55. class AcPlPlotProgressDialog : public AcPlPlotProgress
  56. {
  57. public:
  58. enum PlotMSGIndex {
  59. kDialogTitle,
  60. kSheetName,
  61. kSheetNameToolTip,
  62. kStatus,
  63. kSheetProgressCaption,
  64. kSheetSetProgressCaption,
  65. kMsgCancelling,
  66. kMsgCancellingCurrent,
  67. kCancelSheetBtnMsg,
  68. kCancelJobBtnMsg,
  69. kMsgCount
  70. };
  71. virtual bool onBeginPlot() = 0;
  72. virtual bool onEndPlot() = 0;
  73. virtual bool onBeginSheet() = 0;
  74. virtual bool onEndSheet() = 0;
  75. virtual bool setPlotMsgString(PlotMSGIndex index, const ACHAR *pMsg) = 0;
  76. virtual bool getPlotMsgString(PlotMSGIndex index, ACHAR *& pMsg) const = 0;
  77. virtual bool isSingleSheetPlot() const = 0;
  78. virtual void destroy() = 0;
  79. };
  80. ACPL_PORT AcPlPlotProgressDialog* __stdcall
  81. acplCreatePlotProgressDialog( HWND hParent,
  82. bool bPreview = false,
  83. int nSheets = 1,
  84. ACPLPLTPRGHELPPROC hlpProc = NULL,
  85. bool bShowCancelSheetButton = true);
  86. #endif // ACPLPLOTPROGRESS_H