00001 #pragma once 00002 00027 #ifndef __CONSOLES_H__ 00028 #define __CONSOLES_H__ 00029 00030 // INCLUDES 00031 #include "console.h" 00032 00034 class console_mono: public console 00035 { 00036 // Member functions. 00037 public: 00038 console_mono(void); 00039 void TextColor(console_color ForeColor, console_color BackColor); 00040 void TextColor(console_color ForeColor); 00041 void SetCursorPos(int x, int y); 00042 void SaveCursorPos(void); 00043 void RestoreCursorPos(void); 00044 void ClearScreen(void); 00045 }; 00046 00048 class console_ansi: public console 00049 { 00050 // Constants. 00051 private: 00052 static const int CONSOLE_COLOR[16]; 00053 00054 // Member functions. 00055 public: 00056 console_ansi(void); 00057 void TextColor(console_color ForeColor, console_color BackColor); 00058 void TextColor(console_color ForeColor); 00059 void SetCursorPos(int x, int y); 00060 void SaveCursorPos(void); 00061 void RestoreCursorPos(void); 00062 void ClearScreen(void); 00063 }; 00064 00065 #ifdef WINDOWS 00066 00067 class console_win: public console 00068 { 00069 // Constants. 00070 private: 00071 static const int CONSOLE_COLOR[16]; 00072 00073 // Member functions. 00074 public: 00075 console_win(void); 00076 void TextColor(console_color ForeColor, console_color BackColor); 00077 void TextColor(console_color ForeColor); 00078 void SetCursorPos(int x, int y); 00079 void SaveCursorPos(void); 00080 void RestoreCursorPos(void); 00081 void ClearScreen(void); 00082 00083 // Attributes. 00084 private: 00085 COORD m_SaveCoord; 00086 HANDLE m_StdOut; 00087 }; 00088 #endif // WINDOWS 00089 00090 #endif // __CONSOLES_H__ 00091
![]() |
![]() |
![]() |