Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

console_ansi Class Reference

#include <consoles.h>

Inheritance diagram for console_ansi:

Inheritance graph
Collaboration diagram for console_ansi:

Collaboration graph
List of all members.

Detailed Description

Singleton class for ANSI console.


Public Member Functions

 console_ansi (void)
 Console ANSI constructor.

void TextColor (console_color ForeColor, console_color BackColor)
 Set the text color.

void TextColor (console_color ForeColor)
 Set the text color.

void SetCursorPos (int x, int y)
 Sets the cursor position.

void SaveCursorPos (void)
 Save the cursor position.

void RestoreCursorPos (void)
 Restore the cursor position.

void ClearScreen (void)
 Clear the Screen.


Static Private Attributes

const int CONSOLE_COLOR [16]
 Console colors.


Constructor & Destructor Documentation

console_ansi::console_ansi void   ) 
 

Console ANSI constructor.


Member Function Documentation

void console_ansi::TextColor console_color  ForeColor,
console_color  BackColor
[virtual]
 

Set the text color.

Parameters:
ForeColor: Foreground color.
BackColor: Background color.
Note:
Using ANSI escape codes only the foreground color can be bright.

Implements console.

void console_ansi::TextColor console_color  ForeColor  )  [virtual]
 

Set the text color.

Parameters:
ForeColor: Foreground color.

Implements console.

void console_ansi::SetCursorPos int  x,
int  y
[virtual]
 

Sets the cursor position.

Parameters:
x: Column.
y: Row.

Implements console.

void console_ansi::SaveCursorPos void   )  [virtual]
 

Save the cursor position.

Implements console.

void console_ansi::RestoreCursorPos void   )  [virtual]
 

Restore the cursor position.

Implements console.

void console_ansi::ClearScreen void   )  [virtual]
 

Clear the Screen.

Implements console.


Member Data Documentation

const int console_ansi::CONSOLE_COLOR [static, private]
 

Initial value:

{
    30,
    31,
    32,
    34,
    33,
    35,
    36,
    37,
    30|0x80,
    31|0x80,
    32|0x80,
    34|0x80,
    33|0x80,
    35|0x80,
    36|0x80,
    37|0x80
}
Console colors.


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