1 /*
2  *  tracker/GlobalColorConfig.h
3  *
4  *  Copyright 2009 Peter Barth
5  *
6  *  This file is part of Milkytracker.
7  *
8  *  Milkytracker is free software: you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation, either version 3 of the License, or
11  *  (at your option) any later version.
12  *
13  *  Milkytracker is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with Milkytracker.  If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 /*
24  *  GlobalColorConfig.h
25  *  MilkyTracker
26  *
27  *  Created by Peter Barth on 21.11.05.
28  *
29  */
30 
31 #ifndef GLOBALCOLORCONFIG__H
32 #define GLOBALCOLORCONFIG__H
33 
34 #include "BasicTypes.h"
35 #include "Singleton.h"
36 
37 class GlobalColorConfig : public PPSingleton<GlobalColorConfig>
38 {
39 private:
40 	PPColor dummy;
41 
42 public:
43 	enum GlobalColors
44 	{
45 		// Pattern color identfiers
46 		ColorPatternNote = 0,
47 		ColorPatternInstrument,
48 		ColorPatternVolume,
49 		ColorPatternEffect,
50 		ColorPatternOperand,
51 		// Pattern cursor
52 		ColorCursor,
53 		// Cursor line
54 		ColorCursorLine,
55 		// Cursor line in record mode
56 		ColorCursorLineHighlighted,
57 
58 		// Theme color (= desktop in FT2)
59 		ColorTheme,
60 		// Main text (= white?)
61 		ColorForegroundText,
62 		// PPButton colors
63 		ColorButtons,
64 		// PPButton foreground text
65 		ColorButtonText,
66 
67 		// Various
68 		ColorSelection,
69 		ColorListBoxBackground,
70 		ColorPatternSelection,
71 		ColorTextHighlited, // usually yellow
72 		ColorScopes, // usually white
73 		ColorTextHighlitedSecond, // usually darker yellow
74 		ColorRowHighlitedFirst, // First color to highlight the row background
75 		ColorRowHighlitedSecond, // Second color to highlight the row background
76 
77 		ColorScrollBarBackground,
78 		ColorRecordModeButtonText, // usually red
79 		ColorScopesRecordIndicator, // usually red
80 		ColorPeakClipIndicator, // usually red
81 
82 		ColorSampleEditorWaveform,
83 
84 		// Unused, endmarker
85 		ColorLast = 40
86 	};
87 
88 public:
89 	const PPColor& getColor(GlobalColors whichColor) const;
90 	const char* getColorReadableDescription(GlobalColors whichColor) const;
91 
92 	void setColor(GlobalColors whichColor, const PPColor& color);
93 
94 	friend class PPSingleton<GlobalColorConfig>;
95 };
96 
97 #endif
98 
99