GlsMenu
GlsPalette Namespace Reference

Enumerations

enum  Color_t {
  eCLEAR,
  eBLACK,
  eWHITE,
  eRED,
  eGREEN,
  eDARK_GREEN,
  eLIGHT_GREEN,
  eBLUE,
  eYELLOW,
  ePALE_YELLOW,
  eCYAN,
  eMAGENTA,
  eBROWN,
  eAMBER,
  eGREY,
  LAST_COLOR = eGREY
}
 

Functions

const disti::glsColor & ColorFromName (const std::string &name)
 

Variables

static const char * COLOR_NAME [LAST_COLOR+1]
 Used to convert a string into the proper color enum. More...
 
static const disti::glsColor COLOR [LAST_COLOR+1]
 Used to convert a color enum into a glsColor value. More...
 
static const disti::glsColor & CLEAR = COLOR[eCLEAR]
 
static const disti::glsColor & BLACK = COLOR[eBLACK]
 
static const disti::glsColor & WHITE = COLOR[eWHITE]
 
static const disti::glsColor & RED = COLOR[eRED]
 
static const disti::glsColor & GREEN = COLOR[eGREEN]
 
static const disti::glsColor & DARK_GREEN = COLOR[eDARK_GREEN]
 
static const disti::glsColor & LIGHT_GREEN = COLOR[eLIGHT_GREEN]
 
static const disti::glsColor & BLUE = COLOR[eBLUE]
 
static const disti::glsColor & YELLOW = COLOR[eYELLOW]
 
static const disti::glsColor & PALE_YELLOW = COLOR[ePALE_YELLOW]
 
static const disti::glsColor & CYAN = COLOR[eCYAN]
 
static const disti::glsColor & MAGENTA = COLOR[eMAGENTA]
 
static const disti::glsColor & BROWN = COLOR[eBROWN]
 
static const disti::glsColor & AMBER = COLOR[eAMBER]
 
static const disti::glsColor & GREY = COLOR[eGREY]
 

Detailed Description

Provides a palette of predefined colors.

Enumeration Type Documentation

Enumerator
eCLEAR 
eBLACK 
eWHITE 
eRED 
eGREEN 
eDARK_GREEN 
eLIGHT_GREEN 
eBLUE 
eYELLOW 
ePALE_YELLOW 
eCYAN 
eMAGENTA 
eBROWN 
eAMBER 
eGREY 
LAST_COLOR 

Definition at line 59 of file gls_palette.h.

Function Documentation

const disti::glsColor& GlsPalette::ColorFromName ( const std::string &  name)
inline

Returns a reference to the glsColor with the specified name. If the color cannot be found, BLACK is returned.

Definition at line 141 of file gls_palette.h.

References eBLACK, and LAST_COLOR.

Variable Documentation

const disti::glsColor& GlsPalette::AMBER = COLOR[eAMBER]
static

Definition at line 132 of file gls_palette.h.

const disti::glsColor& GlsPalette::BLACK = COLOR[eBLACK]
static

Definition at line 120 of file gls_palette.h.

const disti::glsColor& GlsPalette::BLUE = COLOR[eBLUE]
static

Definition at line 126 of file gls_palette.h.

const disti::glsColor& GlsPalette::BROWN = COLOR[eBROWN]
static

Definition at line 131 of file gls_palette.h.

const disti::glsColor& GlsPalette::CLEAR = COLOR[eCLEAR]
static

Definition at line 119 of file gls_palette.h.

const disti::glsColor GlsPalette::COLOR[LAST_COLOR+1]
static
Initial value:
=
{
disti::glsColor(0x00,0x00,0x00,0x00),
disti::glsColor(0x00,0x00,0x00,0xFF),
disti::glsColor(0xFF,0xFF,0xFF,0xFF),
disti::glsColor(0xDF,0x0F,0x0F,0xFF),
disti::glsColor(0x00,0xDD,0x00,0xFF),
disti::glsColor(0x00,0x77,0x00,0xFF),
disti::glsColor(0x00,0xFF,0x00,0xFF),
disti::glsColor(0x32,0x64,0xFF,0xFF),
disti::glsColor(0xFF,0xFF,0x22,0xFF),
disti::glsColor(0xFF,0xFF,0x77,0xFF),
disti::glsColor(0x00,0xFF,0xFF,0xFF),
disti::glsColor(0xFF,0x00,0x7F,0xFF),
disti::glsColor(0xB5,0x70,0x40,0xFF),
disti::glsColor(0xFF,0xD2,0x00,0xFF),
disti::glsColor(0x99,0x99,0x99,0xFF)
}

Used to convert a color enum into a glsColor value.

Definition at line 100 of file gls_palette.h.

const char* GlsPalette::COLOR_NAME[LAST_COLOR+1]
static
Initial value:
=
{
"CLEAR",
"BLACK",
"WHITE",
"RED",
"GREEN",
"DARK_GREEN",
"LIGHT_GREEN",
"BLUE",
"YELLOW",
"PALE_YELLOW",
"CYAN",
"MAGENTA",
"BROWN",
"AMBER",
"GREY"
}

Used to convert a string into the proper color enum.

Definition at line 80 of file gls_palette.h.

Referenced by operator<<(), and operator>>().

const disti::glsColor& GlsPalette::CYAN = COLOR[eCYAN]
static

Definition at line 129 of file gls_palette.h.

const disti::glsColor& GlsPalette::DARK_GREEN = COLOR[eDARK_GREEN]
static

Definition at line 124 of file gls_palette.h.

const disti::glsColor& GlsPalette::GREEN = COLOR[eGREEN]
static

Definition at line 123 of file gls_palette.h.

const disti::glsColor& GlsPalette::GREY = COLOR[eGREY]
static

Definition at line 133 of file gls_palette.h.

const disti::glsColor& GlsPalette::LIGHT_GREEN = COLOR[eLIGHT_GREEN]
static

Definition at line 125 of file gls_palette.h.

const disti::glsColor& GlsPalette::MAGENTA = COLOR[eMAGENTA]
static

Definition at line 130 of file gls_palette.h.

const disti::glsColor& GlsPalette::PALE_YELLOW = COLOR[ePALE_YELLOW]
static

Definition at line 128 of file gls_palette.h.

const disti::glsColor& GlsPalette::RED = COLOR[eRED]
static

Definition at line 122 of file gls_palette.h.

const disti::glsColor& GlsPalette::WHITE = COLOR[eWHITE]
static

Definition at line 121 of file gls_palette.h.

const disti::glsColor& GlsPalette::YELLOW = COLOR[eYELLOW]
static

Definition at line 127 of file gls_palette.h.