SyncDlg: Make check if local branch fast-fowards to remote branch work again
[TortoiseGit.git] / src / TortoiseProc / Colors.h
blobb5d0481cc6bf7da534a5981447bd6ceb65abf395
1 // TortoiseGit - 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 BisectGood,
61 BisectBad,
62 COLOR_END=-1
65 COLORREF GetColor(Colors col, bool bDefault = false);
66 void SetColor(Colors col, COLORREF cr);
68 //mixFactor: 0 -> baseColor, 255 -> newColor
69 static COLORREF MixColors(COLORREF baseColor, COLORREF newColor, unsigned char mixFactor);
71 static COLORREF Lighten(COLORREF baseColor, unsigned char amount = 100);
72 static COLORREF Darken(COLORREF baseColor, unsigned char amount = 100);
74 struct COLOR_DATA
76 Colors Color;
77 TCHAR * RegKey;
78 COLORREF Default;
81 private:
83 static COLOR_DATA m_ColorArray[];
86 CRegDWORD m_regCmd;
87 CRegDWORD m_regConflict;
88 CRegDWORD m_regModified;
89 CRegDWORD m_regMerged;
90 CRegDWORD m_regDeleted;
91 CRegDWORD m_regAdded;
92 CRegDWORD m_regLastCommit;
93 CRegDWORD m_regDeletedNode;
94 CRegDWORD m_regAddedNode;
95 CRegDWORD m_regReplacedNode;
96 CRegDWORD m_regRenamedNode;
97 CRegDWORD m_regLastCommitNode;
98 CRegDWORD m_regPropertyChanged;
99 CRegDWORD m_regCurrentBranch;
100 CRegDWORD m_regLocalBranch;
101 CRegDWORD m_regRemoteBranch;
102 CRegDWORD m_regTag;
103 CRegDWORD m_regBranchLine1;
104 CRegDWORD m_regBranchLine2;
105 CRegDWORD m_regBranchLine3;
106 CRegDWORD m_regBranchLine4;
107 CRegDWORD m_regBranchLine5;
108 CRegDWORD m_regBranchLine6;
109 CRegDWORD m_regBranchLine7;
110 CRegDWORD m_regBranchLine8;