XTPPopupPaintManager.h
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:12k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. // XTPPopupPaintManager.h: interface for the CXTPPopupPaintManager class.
  2. //
  3. // This file is a part of the XTREME CONTROLS MFC class library.
  4. // (c)1998-2008 Codejock Software, All Rights Reserved.
  5. //
  6. // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
  7. // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
  8. // CONSENT OF CODEJOCK SOFTWARE.
  9. //
  10. // THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
  11. // IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
  12. // YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
  13. // SINGLE COMPUTER.
  14. //
  15. // CONTACT INFORMATION:
  16. // support@codejock.com
  17. // http://www.codejock.com
  18. //
  19. /////////////////////////////////////////////////////////////////////////////
  20. //{{AFX_CODEJOCK_PRIVATE
  21. #if !defined(_XTPPOPUPPAINTMANAGER_H__)
  22. #define _XTPPOPUPPAINTMANAGER_H__
  23. //}}AFX_CODEJOCK_PRIVATE
  24. #if _MSC_VER > 1000
  25. #pragma once
  26. #endif // _MSC_VER > 1000
  27. #include "Common/XTPColorManager.h"
  28. class CXTPPopupItem;
  29. class CXTPPopupItemText;
  30. class CXTPPopupItemIcon;
  31. class CXTPPopupControl;
  32. //===========================================================================
  33. // Summary:
  34. //     CXTPPopupPaintManager is a class used to perform specialized
  35. //     drawing tasks.
  36. //===========================================================================
  37. class _XTP_EXT_CLASS CXTPPopupPaintManager
  38. {
  39. public:
  40. //-----------------------------------------------------------------------
  41. // Summary:
  42. //     Constructs a CXTPPopupPaintManager object.
  43. //-----------------------------------------------------------------------
  44. CXTPPopupPaintManager();
  45. //-----------------------------------------------------------------------
  46. // Summary:
  47. //     Destroys a CXTPPopupPaintManager object.
  48. //-----------------------------------------------------------------------
  49. virtual ~CXTPPopupPaintManager();
  50. public:
  51. //-----------------------------------------------------------------------
  52. // Summary:
  53. //     Call this member function will draw the background of popup window.
  54. // Parameters:
  55. //     pDC - Points to the device context.
  56. //     rcClient - Size of area to fill.
  57. //     pControl - Popup control to draw
  58. //-----------------------------------------------------------------------
  59. virtual void DrawBackground(CDC* pDC, CXTPPopupControl* pControl, CRect rcClient);
  60. //-----------------------------------------------------------------------
  61. // Summary:
  62. //     Call this member function will draw the controlled item object
  63. //     of popup window.
  64. // Parameters:
  65. //     pDC - Points to the device context.
  66. //     pItem - point to CXTPPopupItem object.
  67. //-----------------------------------------------------------------------
  68. void DrawItem(CDC* pDC, CXTPPopupItem* pItem);
  69. //-----------------------------------------------------------------------
  70. // Summary:
  71. //     Call this method to draw the rectangle of a button.
  72. // Parameters:
  73. //     pDC   - Points to the device context.
  74. //     pItem - Pointer to a CXTPPopupItem.
  75. //-----------------------------------------------------------------------
  76. void DrawButton(CDC* pDC, CXTPPopupItem* pItem);
  77. //-----------------------------------------------------------------------
  78. // Summary:
  79. //     Sets font for text used in Popup control.
  80. // Parameters:
  81. //     hFont - Font handle to use.
  82. //-----------------------------------------------------------------------
  83. void SetFont(HFONT hFont);
  84. //-----------------------------------------------------------------------
  85. // Summary:
  86. //     Call this member function to refresh draw metrics.
  87. //-----------------------------------------------------------------------
  88. virtual void RefreshMetrics();
  89. public:
  90. CXTPPaintManagerColorGradient m_clrBackground;      //gradient background color
  91. CXTPPaintManagerColorGradient m_clrFrame;           //3d frame color
  92. CFont m_fntText;                        //default font of text
  93. COLORREF m_clrText;                     //default color of text
  94. COLORREF m_clrButtonSelected;           //color of selected button
  95. COLORREF m_clrButtonPressed;            //color of pressed button
  96. CXTPPaintManagerColorGradient m_clrButtonSelectedBorder;    //3d border color of selected button
  97. CXTPPaintManagerColorGradient m_clrButtonPressedBorder; //3d border color of pressed button
  98. };
  99. //===========================================================================
  100. // Summary:
  101. //     CXTPPopupThemeOffice2000 is a class used to perform Office2000
  102. //     drawing tasks.
  103. //===========================================================================
  104. class _XTP_EXT_CLASS CXTPPopupThemeOffice2000 : public CXTPPopupPaintManager
  105. {
  106. public:
  107. //-----------------------------------------------------------------------
  108. // Summary:
  109. //     Constructs a CXTPPopupThemeOffice2000 object.
  110. //-----------------------------------------------------------------------
  111. CXTPPopupThemeOffice2000();
  112. //-----------------------------------------------------------------------
  113. // Summary:
  114. //     Destroys a CXTPPopupThemeOffice2000 object.
  115. //-----------------------------------------------------------------------
  116. virtual ~CXTPPopupThemeOffice2000();
  117. public:
  118. //-----------------------------------------------------------------------
  119. // Summary:
  120. //     Call this member function to refresh draw metrics.
  121. //-----------------------------------------------------------------------
  122. void RefreshMetrics();
  123. //-----------------------------------------------------------------------
  124. // Summary:
  125. //     Call this member function will draw the background of popup window.
  126. // Parameters:
  127. //     pDC - Points to the device context.
  128. //     rcClient - Size of area to fill.
  129. //     pControl - Popup control to draw
  130. //-----------------------------------------------------------------------
  131. virtual void DrawBackground(CDC* pDC, CXTPPopupControl* pControl, CRect rcClient);
  132. };
  133. //===========================================================================
  134. // Summary:
  135. //     CXTPPopupThemeOfficeXP is a class used to perform OfficeXP
  136. //     drawing tasks.
  137. //===========================================================================
  138. class _XTP_EXT_CLASS CXTPPopupThemeOfficeXP : public CXTPPopupThemeOffice2000
  139. {
  140. public:
  141. //-----------------------------------------------------------------------
  142. // Summary:
  143. //     Constructs a CXTPPopupThemeOfficeXP object.
  144. //-----------------------------------------------------------------------
  145. CXTPPopupThemeOfficeXP();
  146. //-----------------------------------------------------------------------
  147. // Summary:
  148. //     Destroys a CXTPPopupThemeOfficeXP object.
  149. //-----------------------------------------------------------------------
  150. virtual ~CXTPPopupThemeOfficeXP();
  151. public:
  152. //-----------------------------------------------------------------------
  153. // Summary:
  154. //     Call this member function to refresh draw metrics.
  155. //-----------------------------------------------------------------------
  156. void RefreshMetrics();
  157. //-----------------------------------------------------------------------
  158. // Summary:
  159. //     Call this member function will draw the background of popup window.
  160. // Parameters:
  161. //     pDC - Points to the device context.
  162. //     rcClient - Size of area to fill.
  163. //     pControl - Popup control to draw
  164. //-----------------------------------------------------------------------
  165. virtual void DrawBackground(CDC* pDC, CXTPPopupControl* pControl, CRect rcClient);
  166. };
  167. //===========================================================================
  168. // Summary:
  169. //     CXTPPopupThemeOffice2003 is a class used to perform Office2003
  170. //     drawing tasks.
  171. //===========================================================================
  172. class _XTP_EXT_CLASS CXTPPopupThemeOffice2003 : public CXTPPopupThemeOfficeXP
  173. {
  174. public:
  175. //-----------------------------------------------------------------------
  176. // Summary:
  177. //     Constructs a CXTPPopupThemeOffice2003 object.
  178. //-----------------------------------------------------------------------
  179. CXTPPopupThemeOffice2003();
  180. //-----------------------------------------------------------------------
  181. // Summary:
  182. //     Destroys a CXTPPopupThemeOffice2003 object.
  183. //-----------------------------------------------------------------------
  184. virtual ~CXTPPopupThemeOffice2003();
  185. public:
  186. //-----------------------------------------------------------------------
  187. // Summary:
  188. //     Call this member function to refresh draw metrics.
  189. //-----------------------------------------------------------------------
  190. void RefreshMetrics();
  191. //-----------------------------------------------------------------------
  192. // Summary:
  193. //     Call this member function will draw the background of popup window.
  194. // Parameters:
  195. //     pDC - Points to the device context.
  196. //     rcClient - Size of area to fill.
  197. //     pControl - Popup control to draw
  198. //-----------------------------------------------------------------------
  199. virtual void DrawBackground(CDC* pDC, CXTPPopupControl* pControl, CRect rcClient);
  200. public:
  201. CXTPPaintManagerColorGradient m_clrGripper; // Color of the popup gripper for the xtpPopupThemeOffice2003 paint theme.
  202. };
  203. //===========================================================================
  204. // Summary:
  205. //     CXTPPopupThemeMSN is a class used to perform MSN Messenger
  206. //     drawing tasks.
  207. //===========================================================================
  208. class _XTP_EXT_CLASS CXTPPopupThemeMSN : public CXTPPopupThemeOffice2000
  209. {
  210. public:
  211. //-----------------------------------------------------------------------
  212. // Summary:
  213. //     Constructs a CXTPPopupThemeMSN object.
  214. //-----------------------------------------------------------------------
  215. CXTPPopupThemeMSN();
  216. //-----------------------------------------------------------------------
  217. // Summary:
  218. //     Destroys a CXTPPopupThemeMSN object.
  219. //-----------------------------------------------------------------------
  220. virtual ~CXTPPopupThemeMSN();
  221. public:
  222. //-----------------------------------------------------------------------
  223. // Summary:
  224. //     Call this member function to refresh draw metrics.
  225. //-----------------------------------------------------------------------
  226. void RefreshMetrics();
  227. //-----------------------------------------------------------------------
  228. // Summary:
  229. //     Call this member function will draw the background of popup window.
  230. // Parameters:
  231. //     pDC - Points to the device context.
  232. //     rcClient - Size of area to fill.
  233. //     pControl - Popup control to draw
  234. //-----------------------------------------------------------------------
  235. virtual void DrawBackground(CDC* pDC, CXTPPopupControl* pControl, CRect rcClient);
  236. };
  237. //===========================================================================
  238. // Summary:
  239. //     CXTPPopupThemeOffice2007 is a class used to perform Office2007
  240. //     drawing tasks.
  241. //===========================================================================
  242. class _XTP_EXT_CLASS CXTPPopupThemeOffice2007 : public CXTPPopupThemeOffice2003
  243. {
  244. public:
  245. //-----------------------------------------------------------------------
  246. // Summary:
  247. //     Constructs a CXTPPopupThemeOffice2003 object.
  248. //-----------------------------------------------------------------------
  249. CXTPPopupThemeOffice2007();
  250. public:
  251. //-----------------------------------------------------------------------
  252. // Summary:
  253. //     Call this member function to refresh draw metrics.
  254. //-----------------------------------------------------------------------
  255. void RefreshMetrics();
  256. };
  257. #endif // !defined(_XTPPOPUPPAINTMANAGER_H__)