First cut of new Colour class (to replace TextColour)

This commit is contained in:
Phil Nash 2013-04-05 07:47:36 +01:00
parent 5c7d3d75cc
commit a3703faa0a
6 changed files with 275 additions and 10 deletions

View file

@ -12,6 +12,52 @@
namespace Catch {
namespace Detail {
struct IColourImpl;
}
struct Colour {
enum Code {
None = 0,
White,
Red,
Green,
Blue,
Cyan,
Yellow,
Grey,
Bright = 0x10,
BrightRed = Bright | Red,
BrightGreen = Bright | Green,
LightGrey = Bright | Grey,
BrightWhite = Bright | White,
// By intention
FileName = Grey,
ResultError = BrightRed,
ResultSuccess = BrightGreen,
Error = BrightRed,
Success = Green,
OriginalExpression = Cyan,
ReconstructedExpression = Yellow,
SecondaryText = Grey,
Headers = White
};
Colour( Code _colourCode );
~Colour();
static void use( Code _colourCode );
private:
static Detail::IColourImpl* impl;
};
struct IConsoleColourCodes : NonCopyable {
enum Colours {
None,