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

对话框与窗口

开发平台:

Visual C++

  1. // XTPSyntaxEditColorSampleText.h : header file
  2. //
  3. // This file is a part of the XTREME TOOLKIT PRO 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 SYNTAX EDIT 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(__XTPSYNTAXEDITPROPERTIESSAMPLETEXT_H__)
  22. #define __XTPSYNTAXEDITPROPERTIESSAMPLETEXT_H__
  23. //}}AFX_CODEJOCK_PRIVATE
  24. #if _MSC_VER > 1000
  25. #pragma once
  26. #endif // _MSC_VER > 1000
  27. #include "Common/XTPColorManager.h"
  28. //===========================================================================
  29. // Summary:
  30. //     This class, derived from CStatic, used to display sample of colored text.
  31. //===========================================================================
  32. class _XTP_EXT_CLASS CXTPSyntaxEditColorSampleText : public CStatic
  33. {
  34. public:
  35. // -------------------------------------------------------------------
  36. // Summary:
  37. //      Default object constructor.
  38. // -------------------------------------------------------------------
  39. CXTPSyntaxEditColorSampleText();
  40. // -------------------------------------------------------------------
  41. // Summary:
  42. //      Default object destructor.
  43. // -------------------------------------------------------------------
  44. virtual ~CXTPSyntaxEditColorSampleText();
  45. public:
  46. // -------------------------------------------------------------------
  47. // Summary:
  48. //     Set text color.
  49. // Parameters:
  50. //     crText - A color value.
  51. // -------------------------------------------------------------------
  52. void SetTextColor(COLORREF crText);
  53. // -------------------------------------------------------------------
  54. // Summary:
  55. //     Get text color.
  56. // Returns:
  57. //     A color value.
  58. // -------------------------------------------------------------------
  59. COLORREF GetTextColor() const;
  60. // -------------------------------------------------------------------
  61. // Summary:
  62. //     Set background color
  63. // Parameters:
  64. //     crBack - A color value.
  65. // -------------------------------------------------------------------
  66. void SetBackColor(COLORREF crBack);
  67. // -------------------------------------------------------------------
  68. // Summary:
  69. //     Get background color.
  70. // Returns:
  71. //     A color value.
  72. // -------------------------------------------------------------------
  73. COLORREF GetBackColor() const;
  74. // -------------------------------------------------------------------
  75. // Summary:
  76. //     Set border color.
  77. // Parameters:
  78. //     crBorder - A color value.
  79. // -------------------------------------------------------------------
  80. void SetBorderColor(COLORREF crBorder);
  81. // -------------------------------------------------------------------
  82. // Summary:
  83. //     Get border color.
  84. // Returns:
  85. //     A color value.
  86. // -------------------------------------------------------------------
  87. COLORREF GetBorderColor() const;
  88. // -------------------------------------------------------------------
  89. // Summary:
  90. //     Redraw control.
  91. // -------------------------------------------------------------------
  92. void Refresh();
  93. //{{AFX_VIRTUAL(CXTPSyntaxEditColorSampleText)
  94. //}}AFX_VIRTUAL
  95. //{{AFX_MSG(CXTPSyntaxEditColorSampleText)
  96. //{{AFX_CODEJOCK_PRIVATE
  97. afx_msg void OnNcPaint();
  98. afx_msg void OnPaint();
  99. afx_msg void OnSysColorChange();
  100. afx_msg void OnEnable(BOOL bEnable);
  101. //}}AFX_CODEJOCK_PRIVATE
  102. //}}AFX_MSG
  103. DECLARE_MESSAGE_MAP()
  104. private:
  105. CXTPPaintManagerColor m_crBack;
  106. CXTPPaintManagerColor m_crText;
  107. CXTPPaintManagerColor m_crBorder;
  108. };
  109. #endif // !defined(__XTPSYNTAXEDITPROPERTIESSAMPLETEXT_H__)