4 * @brief Declaration file for SyntaxColors class
6 // ID line follows -- this is updated by SVN
14 * @brief Indexes to color table
21 COLORINDEX_WHITESPACE,
23 COLORINDEX_NORMALTEXT,
34 COLORINDEX_PREPROCESSOR,
36 COLORINDEX_HIGHLIGHTBKGND1, // standard
37 COLORINDEX_HIGHLIGHTTEXT1,
38 COLORINDEX_HIGHLIGHTBKGND2, // changed
39 COLORINDEX_HIGHLIGHTTEXT2,
40 COLORINDEX_HIGHLIGHTBKGND3, // not selected insert/delete
41 COLORINDEX_HIGHLIGHTBKGND4, // selected insert/delete
46 COLORINDEX_MARKERBKGND0,
47 COLORINDEX_MARKERBKGND1,
48 COLORINDEX_MARKERBKGND2,
49 COLORINDEX_MARKERBKGND3,
51 // Expandable: custom elements are allowed.
52 COLORINDEX_LAST, // Please keep this as last item (not counting masks or
53 // other special values)
55 COLORINDEX_INTERMEDIATECOLOR = 0x40000000,
56 COLORINDEX_APPLYFORCE = 0x80000000,
57 COLORINDEX_MASK = 0xC0000000,
60 const int COLORINDEX_COUNT = COLORINDEX_LAST - COLORINDEX_NONE;
63 * @brief Wrapper for Syntax coloring colors.
65 * This class is wrapper for syntax colors. We can use this class in editor
66 * class and everywhere we need to refer to syntax colors. Class uses our
67 * normal options-manager for loading / saving values to storage.
69 * @todo We don't really need those arrays to store color values since we now
70 * use options-manager.
75 typedef unsigned COLORREF;
77 explicit SyntaxColors(const SyntaxColors *pColors);
78 void Clone(const SyntaxColors *pColors);
79 COLORREF GetColor(unsigned index) const { return m_colors[index]; }
80 void SetColor(unsigned index, COLORREF color);
81 bool GetBold(unsigned index) const { return m_bolds[index]; }
82 void SetBold(unsigned index, bool bold);
84 bool IsThemeableColorIndex(int nColorIndex) const;
85 bool GetSystemColorIndex(int nColorIndex, int * pSysIndex) const;
87 // Implementation data
89 std::array<COLORREF, COLORINDEX_COUNT> m_colors; /**< Syntax highlight colors */
90 std::array<bool, COLORINDEX_COUNT> m_bolds; /**< Bold font enable/disable */