OSDN Git Service

merge original branch.
[tortoisegit/TortoiseGitJp.git] / src / TortoiseMerge / DiffColors.h
1 // TortoiseMerge - a Diff/Patch program\r
2 \r
3 // Copyright (C) 2007-2008 - TortoiseSVN\r
4 \r
5 // This program is free software; you can redistribute it and/or\r
6 // modify it under the terms of the GNU General Public License\r
7 // as published by the Free Software Foundation; either version 2\r
8 // of the License, or (at your option) any later version.\r
9 \r
10 // This program is distributed in the hope that it will be useful,\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13 // GNU General Public License for more details.\r
14 \r
15 // You should have received a copy of the GNU General Public License\r
16 // along with this program; if not, write to the Free Software Foundation,\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
18 //\r
19 #pragma once\r
20 #include "DiffStates.h"\r
21 #include "registry.h"\r
22 \r
23 \r
24 #define DIFFSTATE_UNKNOWN_DEFAULT_FG                            ::GetSysColor(COLOR_WINDOWTEXT)\r
25 #define DIFFSTATE_NORMAL_DEFAULT_FG                                     ::GetSysColor(COLOR_WINDOWTEXT)\r
26 #define DIFFSTATE_REMOVED_DEFAULT_FG                            ::GetSysColor(COLOR_WINDOWTEXT)\r
27 #define DIFFSTATE_REMOVEDWHITESPACE_DEFAULT_FG          ::GetSysColor(COLOR_WINDOWTEXT)\r
28 #define DIFFSTATE_ADDED_DEFAULT_FG                                      ::GetSysColor(COLOR_WINDOWTEXT)\r
29 #define DIFFSTATE_ADDEDWHITESPACE_DEFAULT_FG            ::GetSysColor(COLOR_WINDOWTEXT)\r
30 #define DIFFSTATE_WHITESPACE_DEFAULT_FG                         ::GetSysColor(COLOR_WINDOWTEXT)\r
31 #define DIFFSTATE_WHITESPACE_DIFF_DEFAULT_FG            ::GetSysColor(COLOR_WINDOWTEXT)\r
32 #define DIFFSTATE_EMPTY_DEFAULT_FG                                      ::GetSysColor(COLOR_WINDOWTEXT)\r
33 #define DIFFSTATE_CONFLICTED_DEFAULT_FG                         ::GetSysColor(COLOR_WINDOWTEXT)\r
34 #define DIFFSTATE_CONFLICTED_IGNORED_DEFAULT_FG         ::GetSysColor(COLOR_WINDOWTEXT)\r
35 #define DIFFSTATE_CONFLICTADDED_DEFAULT_FG                      ::GetSysColor(COLOR_WINDOWTEXT)\r
36 #define DIFFSTATE_CONFLICTEMPTY_DEFAULT_FG                      ::GetSysColor(COLOR_WINDOWTEXT)\r
37 #define DIFFSTATE_IDENTICALREMOVED_DEFAULT_FG           ::GetSysColor(COLOR_WINDOWTEXT)\r
38 #define DIFFSTATE_IDENTICALADDED_DEFAULT_FG                     ::GetSysColor(COLOR_WINDOWTEXT)\r
39 #define DIFFSTATE_THEIRSREMOVED_DEFAULT_FG                      ::GetSysColor(COLOR_WINDOWTEXT)\r
40 #define DIFFSTATE_THEIRSADDED_DEFAULT_FG                        ::GetSysColor(COLOR_WINDOWTEXT)\r
41 #define DIFFSTATE_YOURSREMOVED_DEFAULT_FG                       ::GetSysColor(COLOR_WINDOWTEXT)\r
42 #define DIFFSTATE_YOURSADDED_DEFAULT_FG                         ::GetSysColor(COLOR_WINDOWTEXT)\r
43 #define DIFFSTATE_CONFLICTRESOLVED_DEFAULT_FG           ::GetSysColor(COLOR_WINDOWTEXT)\r
44 #define DIFFSTATE_EDITED_DEFAULT_FG                                     ::GetSysColor(COLOR_WINDOWTEXT)\r
45 \r
46 #define DIFFSTATE_UNKNOWN_DEFAULT_BG                            ::GetSysColor(COLOR_WINDOW)\r
47 #define DIFFSTATE_NORMAL_DEFAULT_BG                                     ::GetSysColor(COLOR_WINDOW)\r
48 #define DIFFSTATE_REMOVED_DEFAULT_BG                            RGB(255,200,100)\r
49 #define DIFFSTATE_REMOVEDWHITESPACE_DEFAULT_BG          DIFFSTATE_NORMAL_DEFAULT_BG\r
50 #define DIFFSTATE_ADDED_DEFAULT_BG                                      RGB(255,255,0)\r
51 #define DIFFSTATE_ADDEDWHITESPACE_DEFAULT_BG            DIFFSTATE_NORMAL_DEFAULT_BG\r
52 #define DIFFSTATE_WHITESPACE_DEFAULT_BG                         DIFFSTATE_NORMAL_DEFAULT_BG\r
53 #define DIFFSTATE_WHITESPACE_DIFF_DEFAULT_BG            DIFFSTATE_NORMAL_DEFAULT_BG\r
54 #define DIFFSTATE_EMPTY_DEFAULT_BG                                      RGB(200,200,200)\r
55 #define DIFFSTATE_CONFLICTED_DEFAULT_BG                         RGB(255,100,100)\r
56 #define DIFFSTATE_CONFLICTED_IGNORED_DEFAULT_BG         DIFFSTATE_CONFLICTED_DEFAULT_BG\r
57 #define DIFFSTATE_CONFLICTADDED_DEFAULT_BG                      DIFFSTATE_CONFLICTED_DEFAULT_BG\r
58 #define DIFFSTATE_CONFLICTEMPTY_DEFAULT_BG                      DIFFSTATE_CONFLICTED_DEFAULT_BG\r
59 #define DIFFSTATE_IDENTICALREMOVED_DEFAULT_BG           DIFFSTATE_REMOVED_DEFAULT_BG\r
60 #define DIFFSTATE_IDENTICALADDED_DEFAULT_BG                     DIFFSTATE_ADDED_DEFAULT_BG\r
61 #define DIFFSTATE_THEIRSREMOVED_DEFAULT_BG                      DIFFSTATE_REMOVED_DEFAULT_BG\r
62 #define DIFFSTATE_THEIRSADDED_DEFAULT_BG                        DIFFSTATE_ADDED_DEFAULT_BG\r
63 #define DIFFSTATE_YOURSREMOVED_DEFAULT_BG                       DIFFSTATE_REMOVED_DEFAULT_BG\r
64 #define DIFFSTATE_YOURSADDED_DEFAULT_BG                         DIFFSTATE_ADDED_DEFAULT_BG\r
65 #define DIFFSTATE_CONFLICTRESOLVED_DEFAULT_BG           RGB(200,255,200)\r
66 #define DIFFSTATE_EDITED_DEFAULT_BG                                     ::GetSysColor(COLOR_WINDOW)\r
67 \r
68 /**\r
69  * \ingroup TortoiseMerge\r
70  * Singleton class which handles the colors for the different diff states\r
71  * used in TortoiseMerge.\r
72  */\r
73 class CDiffColors\r
74 {\r
75 public:\r
76         static CDiffColors&                     GetInstance();\r
77 \r
78         void                                            GetColors(DiffStates state, COLORREF &crBkgnd, COLORREF &crText);\r
79         void                                            SetColors(DiffStates state, COLORREF &crBkgnd, COLORREF &crText);\r
80         void                                            LoadRegistry();\r
81 \r
82 protected:\r
83         CRegDWORD                                       m_regForegroundColors[DIFFSTATE_END];\r
84         CRegDWORD                                       m_regBackgroundColors[DIFFSTATE_END];\r
85 private:\r
86         CDiffColors(void);\r
87         ~CDiffColors(void);\r
88 };\r