Fixed issue #507: Help Spell error and push wrongly link to sync
[TortoiseGit.git] / src / TortoiseProc / Colors.h
blob55f060715078800c6891ea4551f99ed4ecf43f65
1 // TortoiseSVN - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2007 - TortoiseSVN
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #pragma once
20 #include "registry.h"
22 /**
23 * \ingroup TortoiseProc
24 * Handles the UI colors used in TortoiseSVN
26 class CColors
28 public:
29 CColors(void);
30 ~CColors(void);
32 enum Colors
34 Cmd,
35 Conflict,
36 Modified,
37 Merged,
38 Deleted,
39 Added,
40 LastCommit,
41 DeletedNode,
42 AddedNode,
43 ReplacedNode,
44 RenamedNode,
45 LastCommitNode,
46 PropertyChanged,
47 CurrentBranch,
48 LocalBranch,
49 RemoteBranch,
50 Tag,
51 Stash,
52 BranchLine1,
53 BranchLine2,
54 BranchLine3,
55 BranchLine4,
56 BranchLine5,
57 BranchLine6,
58 BranchLine7,
59 BranchLine8,
60 COLOR_END=-1
63 COLORREF GetColor(Colors col, bool bDefault = false);
64 void SetColor(Colors col, COLORREF cr);
66 //mixFactor: 0 -> baseColor, 255 -> newColor
67 static COLORREF MixColors(COLORREF baseColor, COLORREF newColor, unsigned char mixFactor);
69 static COLORREF Lighten(COLORREF baseColor, unsigned char amount = 100);
70 static COLORREF Darken(COLORREF baseColor, unsigned char amount = 100);
72 struct COLOR_DATA
74 Colors Color;
75 TCHAR * RegKey;
76 COLORREF Default;
79 private:
81 static COLOR_DATA m_ColorArray[];
84 CRegDWORD m_regCmd;
85 CRegDWORD m_regConflict;
86 CRegDWORD m_regModified;
87 CRegDWORD m_regMerged;
88 CRegDWORD m_regDeleted;
89 CRegDWORD m_regAdded;
90 CRegDWORD m_regLastCommit;
91 CRegDWORD m_regDeletedNode;
92 CRegDWORD m_regAddedNode;
93 CRegDWORD m_regReplacedNode;
94 CRegDWORD m_regRenamedNode;
95 CRegDWORD m_regLastCommitNode;
96 CRegDWORD m_regPropertyChanged;
97 CRegDWORD m_regCurrentBranch;
98 CRegDWORD m_regLocalBranch;
99 CRegDWORD m_regRemoteBranch;
100 CRegDWORD m_regTag;
101 CRegDWORD m_regBranchLine1;
102 CRegDWORD m_regBranchLine2;
103 CRegDWORD m_regBranchLine3;
104 CRegDWORD m_regBranchLine4;
105 CRegDWORD m_regBranchLine5;
106 CRegDWORD m_regBranchLine6;
107 CRegDWORD m_regBranchLine7;
108 CRegDWORD m_regBranchLine8;