AcTcUiToolPaletteSet.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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: CAcTcUiToolPaletteSet.h
  12. //
  13. // Description: Header for CAcTcUiToolPaletteSet class. This class
  14. // implements the tool palette window and derives from
  15. // CAdUiPalette. The tool palette window is embedded in
  16. // CAdUiToolPaletteSet window and embeds a tool tray
  17. // window CAcUiCatalogView.
  18. //
  19. //////////////////////////////////////////////////////////////////////////////
  20. #ifndef __ACTCUITOOLPALETTESET_H__
  21. #define __ACTCUITOOLPALETTESET_H__
  22. #if _MSC_VER > 1000
  23. #pragma once
  24. #endif // _MSC_VER > 1000
  25. #include "AcTcUi.h"
  26. #include "aduiPaletteSet.h"
  27. #include "AcTcUiToolPalette.h"
  28. #include "AcTcUiToolPaletteGroup.h"
  29. class CAcTcUiImpToolPaletteSet;
  30. class CAcTcUiScheme;
  31. #ifndef _ADESK_MAC_
  32. class ACTCUI_PORT CAcTcUiToolPaletteSet : public CAdUiPaletteSet
  33. {
  34. friend CAcTcUiImpToolPaletteSet;
  35. DECLARE_DYNCREATE(CAcTcUiToolPaletteSet);
  36. public:
  37. virtual ~CAcTcUiToolPaletteSet();
  38. virtual BOOL Load (IUnknown* pUnk);
  39. virtual BOOL Save (IUnknown* pUnk);
  40. virtual BOOL Import (IUnknown* pUnk, LPCTSTR pszRefPath);
  41. virtual BOOL Export (IUnknown* pUnk, LPCTSTR pszRefPath);
  42. virtual BOOL HitTest (CPoint pt, UINT& nFlag,
  43. DWORD& dwData);
  44. int AddPalette (CAdUiPalette* pPalette);
  45. int InsertPalette (int iIndex, CAdUiPalette* pPalette);
  46. BOOL RemovePalette (CAdUiPalette* pPalette);
  47. BOOL RemovePalette (int iIndex);
  48. #ifndef NEW_PALETTE
  49. virtual void TitleBarLocationUpdated(AdUiTitleBarLocation newLoc);
  50. #endif // NEW_PALETTE
  51. CAcTcUiToolPaletteGroup* GetToolPaletteGroup(BOOL bCreate = FALSE);
  52. CAcTcUiToolPaletteGroup* GetAllPalettesGroup(void);
  53. CAcTcUiToolPaletteGroup* GetActivePaletteGroup(void);
  54. BOOL GetActivePaletteGroup(LPTSTR pszGroup,
  55. int cbSize) const;
  56. BOOL SetActivePaletteGroup(CAcTcUiToolPaletteGroup* pGroup);
  57. BOOL SetActivePaletteGroup(LPCTSTR pszGroup);
  58. CAcTcUiScheme* GetScheme (void) const;
  59. BOOL Show (void);
  60. BOOL Show (BOOL bShow);
  61. BOOL SetActivePalette (CAdUiPalette* pPalette);
  62. BOOL SetActivePalette (int nPaletteIndex);
  63. BOOL SetActivePalette (LPCTSTR pszPalName,
  64. BOOL bSearchOnlyCurrentGroup) const;
  65. CAcTcUiToolPalette* FindPalette (LPCTSTR pszPalName,
  66. CAcTcUiToolPaletteGroup** ppGroup,
  67. BOOL bSearchOnlyCurrentGroup) const;
  68. protected:
  69. // Protected constructor
  70. CAcTcUiToolPaletteSet();
  71. protected:
  72. virtual BOOL AddContextMenuItems (CMenu *pMenu,
  73. int nHitFlag,
  74. int nRightClkTab = 0);
  75. /// <summary>
  76. /// Virtual method that receives the theme modification event.
  77. /// </summary>
  78. /// <param name="element">
  79. /// A index of the theme element that was modified.
  80. /// </param>
  81. /// <remarks>
  82. /// This method is also called when the theme uses the active theme colors
  83. /// and the active theme is changed. In that case, element = kUnknownElements
  84. /// </remarks>
  85. virtual void ThemeModified (AdUiThemeElement element);
  86. virtual void OnTabDrag (CPtrArray & arrayPalettes);
  87. virtual BOOL OnBeginDrag (COleDataSource* pDataSource,
  88. CPtrArray & arrayPalettes);
  89. virtual void OnEndDrag (DROPEFFECT dropEffect);
  90. virtual BOOL OnBeginMove (COleDataSource* pDataSource,
  91. CPtrArray & arrayPalettes);
  92. virtual void OnEndMove (DROPEFFECT dropEffect);
  93. virtual BOOL OnRenderData (LPFORMATETC lpFormatEtc,
  94. LPSTGMEDIUM lpStgMedium);
  95. virtual void OnTearOff (CAdUiPaletteSet* pSet);
  96. virtual void DestroyStackedPaletteSet(void);
  97. protected:
  98. //{{AFX_VIRTUAL(CAcTcUiToolPaletteSet)
  99. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  100. afx_msg void OnDestroy();
  101. afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
  102. afx_msg void OnWindowPosChanged(WINDOWPOS* lpwndpos);
  103. afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
  104. afx_msg void OnRemovePaletteSet();
  105. afx_msg void OnRemoveActivePalette();
  106. afx_msg void OnRemovePalette();
  107. afx_msg void OnViewOptions();
  108. afx_msg void OnSelectPaletteGroup( UINT nID );
  109. afx_msg void OnShowCustomizeDialog();
  110. afx_msg void OnShowCustomizeDialogCUI();
  111. afx_msg void OnNewPalette();
  112. afx_msg void OnPaste();
  113. afx_msg void OnPaletteProperties();
  114. afx_msg void OnRefreshPaletteSet();
  115. afx_msg void OnRefreshActivePalette();
  116. afx_msg void OnClose();
  117. afx_msg void OnMoveUp();
  118. afx_msg void OnMoveDown();
  119. afx_msg void OnInvokeCommand(UINT nID);
  120. afx_msg void OnTimer(UINT_PTR nIDEvent);
  121. //}}AFX_VIRTUAL
  122. protected:
  123. //{{AFX_MSG(CAcTcUiToolPaletteSet)
  124. //}}AFX_MSG
  125. afx_msg LRESULT OnDragEnter(WPARAM wParam, LPARAM lParam);
  126. afx_msg LRESULT OnDragOver(WPARAM wParam, LPARAM lParam);
  127. afx_msg LRESULT OnDrop(WPARAM wParam, LPARAM lParam);
  128. afx_msg LRESULT OnDropEx(WPARAM wParam, LPARAM lParam);
  129. afx_msg LRESULT OnDragLeave(WPARAM wParam, LPARAM lParam);
  130. afx_msg LRESULT OnUpdate(WPARAM wParam, LPARAM lParam);
  131. afx_msg LRESULT OnRenderData(WPARAM wParam, LPARAM lParam);
  132. DECLARE_MESSAGE_MAP()
  133. protected:
  134. void * mpImpObj; // Imp object CAcTcUiImpToolPaletteSet
  135. private:
  136. friend class AcTcUiSystemInternals;
  137. };
  138. #endif // Nodef _ADESK_MAC_
  139. #endif //__ACTCUITOOLPALETTESET_H__