YAPETUI::Colors Class Reference

Class for managing colors. More...

#include <colors.h>

List of all members.

Static Public Member Functions

static short getcolor (COLORS c)
 Returns the number of the color pair.
static void initColors ()
 Initializes the color pairs.
static void setcolor (WINDOW *w, COLORS c)
 Set the color of the curses window.
static void unsetcolor (WINDOW *w, COLORS c)

Static Private Attributes

static color colors []
 Array holding the colors.
static bool initialized = false
 Indicates whether or colors has been initialized.


Detailed Description

This class is used for managing colors.

Definition at line 121 of file colors.h.


Member Function Documentation

short Colors::getcolor ( COLORS  c  )  [static]

Returns the number used by curses for the given color. If color support is unavailable, it always returns 0.

Returns:
the number of the color pair, or zero if color support is not available.

Definition at line 106 of file colors.cc.

References colors, and YAPETUI::color::no.

Referenced by YAPETUI::ListWidget< YAPET::PartDec >::showSelected().

void Colors::initColors (  )  [static]

void Colors::setcolor ( WINDOW *  w,
COLORS  c 
) [static]

void Colors::unsetcolor ( WINDOW *  w,
COLORS  c 
) [static]

Definition at line 114 of file colors.cc.

References colors.


Member Data Documentation

color Colors::colors [static, private]

Initial value:

 {
    
    {1, COLOR_WHITE, COLOR_BLUE, A_NORMAL},
    
    {2, COLOR_CYAN, COLOR_BLACK, A_NORMAL},
    
    {3, COLOR_BLACK, COLOR_CYAN, A_NORMAL},
    
    {4, COLOR_BLACK, COLOR_WHITE, A_REVERSE},
    
    {5, COLOR_BLACK, COLOR_YELLOW, A_REVERSE},
    
    {6, COLOR_WHITE, COLOR_BLACK, A_NORMAL},
    
    {7, COLOR_BLACK, COLOR_GREEN, A_REVERSE},
    
    {8, COLOR_WHITE, COLOR_BLUE, A_NORMAL}
}
The color pairs for curses are access by using the names defined in the COLOR enum.

Definition at line 136 of file colors.h.

Referenced by getcolor(), initColors(), setcolor(), and unsetcolor().

bool Colors::initialized = false [static, private]

Indicates whether or colors has been initialized by calling initColors().

Definition at line 129 of file colors.h.

Referenced by initColors().


The documentation for this class was generated from the following files:

Generated on Thu Jun 11 19:13:07 2009 for YAPET by  doxygen 1.5.8