add attribute support, fg/bg in progress
This commit is contained in:
@ -18,16 +18,44 @@
|
||||
#include "devices/CGA.h"
|
||||
#include "lib/OutStream.h"
|
||||
|
||||
class CGA_Stream : public OutStream, public CGA {
|
||||
// NOTE: I added this
|
||||
class fgc {
|
||||
public:
|
||||
fgc() : fg(CGA::LIGHT_GREY) {};
|
||||
fgc(CGA::color fg) : fg(fg) {};
|
||||
CGA::color fg;
|
||||
};
|
||||
class bgc {
|
||||
public:
|
||||
bgc() : bg(CGA::BLACK) {};
|
||||
bgc(CGA::color bg) : bg(bg) {};
|
||||
CGA::color bg;
|
||||
};
|
||||
|
||||
class CGA_Stream : public OutStream, public CGA {
|
||||
private:
|
||||
CGA_Stream(CGA_Stream& copy); // Verhindere Kopieren
|
||||
|
||||
public:
|
||||
CGA_Stream() : OutStream(), CGA() { flush(); }
|
||||
CGA::color color_fg;
|
||||
CGA::color color_bg;
|
||||
bool blink;
|
||||
|
||||
CGA_Stream() : OutStream(), CGA() {
|
||||
color_fg = CGA::LIGHT_GREY;
|
||||
color_bg = CGA::BLACK;
|
||||
blink = false;
|
||||
|
||||
flush();
|
||||
}
|
||||
|
||||
// Methode zur Ausgabe des Pufferinhalts der Basisklasse StringBuffer.
|
||||
void flush() override;
|
||||
|
||||
// NOTE: I added this
|
||||
// TODO: Problem: Implementing this here breaks the << chaining
|
||||
// CGA_Stream& operator<<(const fgc&);
|
||||
// CGA_Stream& operator<<(const bgc&);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user