mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-27 23:19:32 +00:00
First cut of new Colour class (to replace TextColour)
This commit is contained in:
parent
5c7d3d75cc
commit
a3703faa0a
6 changed files with 275 additions and 10 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue