#ifndef CONSOLE_H
#define CONSOLE_H

#include "defines.h"

#define        EGA_BLACK           (0)
#define        EGA_BLUE            (1)
#define        EGA_GREEN           (2)
#define        EGA_CYAN            (3)
#define        EGA_RED             (4)
#define        EGA_MAGENTA         (5)
#define        EGA_BROWN           (6)
#define        EGA_GREY            (7)
#define        EGA_DARKGREY        (8)
#define        EGA_LIGHTBLUE       (9)
#define        EGA_LIGHTGREEN      (10)
#define        EGA_LIGHTCYAN       (11)
#define        EGA_LIGHTRED        (12)
#define        EGA_LIGHTMAGENTA    (13)
#define        EGA_YELLOW          (14)
#define        EGA_WHITE           (15)

#define        TEXTCOLOR_DEFAULT   EGA_GREY
#define        BACKCOLOR_DEFAULT   EGA_BLACK

#define        HELPCOLOR_DEFAULT               EGA_YELLOW
#define        INPUTCOLOR_DEFAULT              EGA_WHITE
#define        UNKNOWNCOLOR_DEFAULT            EGA_LIGHTRED


namespace cryptrav
{

namespace Console
{


int            getKey(void);

void           setTextAttr(quint8 textColor, quint8 backColor);

QString        getLine(quint8 textColor = INPUTCOLOR_DEFAULT, quint8 backColor = BACKCOLOR_DEFAULT);

void           put(QString qStr, quint8 textColor = TEXTCOLOR_DEFAULT, quint8 backColor = BACKCOLOR_DEFAULT);
void           putLine(QString qStr, quint8 textColor = TEXTCOLOR_DEFAULT, quint8 backColor = BACKCOLOR_DEFAULT);

void           putSuccess(bool state);
void           putHelp(QString qStr, quint8 textColor = HELPCOLOR_DEFAULT, quint8 backColor = BACKCOLOR_DEFAULT);
void           putUnknown(QString qStr, quint8 textColor = UNKNOWNCOLOR_DEFAULT, quint8 backColor = BACKCOLOR_DEFAULT);

} // namespace "Console"

} // namespace "cryptrav"

#endif // CONSOLE_H
