OSDN Git Service

Webpage Compare: Add support for generating report files (#1941)
[winmerge-jp/winmerge-jp.git] / Src / PropSyntaxColors.h
1 /** 
2  * @file  PropSyntaxColors.h
3  *
4  * @brief Declaration file for PropSyntaxColors propertyheet
5  *
6  */
7 #pragma once
8
9 #include "ColorButton.h"
10 #include "OptionsPanel.h"
11 #include "SyntaxColors.h"
12 #include <array>
13
14 class PropSyntaxColors : public OptionsPanel
15 {
16         DECLARE_DYNAMIC(PropSyntaxColors)
17
18 // Construction & Destruction
19 public:
20         PropSyntaxColors(COptionsMgr *optionsMgr, SyntaxColors *pColors);
21
22 // Implement IOptionsPanel
23         virtual void ReadOptions() override;
24         virtual void WriteOptions() override;
25
26 // Dialog Data
27 public:
28
29 private:
30         enum { IDD = IDD_PROPPAGE_COLORS_SYNTAX };
31
32 protected:
33         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
34         template<unsigned colorIndex>
35         afx_msg void OnBnClickedEcolor();
36         afx_msg void OnBnClickedBoldButton(unsigned ctlId, unsigned colorIndex);
37         template<unsigned ctlId, unsigned colorIndex>
38         afx_msg void OnBnClickedBoldButton() { OnBnClickedBoldButton(ctlId, colorIndex); }
39         void BrowseColorAndSave(unsigned colorIndex);
40         int GetCheckVal(UINT nColorIndex);
41
42         DECLARE_MESSAGE_MAP()
43         
44 private:
45         std::array<CColorButton, COLORINDEX_LAST + 1> m_colorButtons;
46         std::array<int, COLORINDEX_LAST + 1> m_nBolds;
47
48         SyntaxColors *m_pTempColors;
49         std::array<COLORREF, 16> m_cCustColors;
50 };