Removed effect methods

This commit is contained in:
Bob Polis
2021-12-13 15:01:38 +01:00
parent bacc189d99
commit 0539d600a0
2 changed files with 7 additions and 180 deletions

View File

@ -44,8 +44,7 @@ void term::progress(int prefixlen,
int steps = round(cur * maxsteps / total);
int perc = round(100 * cur / total);
int fill_len = barwidth - steps / 8;
*_out << '\r' << std::setw(prefixlen) << prefix.substr(0, prefixlen) << ' ';
grayf(8);
*_out << '\r' << std::setw(prefixlen) << prefix.substr(0, prefixlen) << ' ' << io::grayf(8);
for (int i = 0; i < steps / 8; ++i) {
*_out << bar[7];
}
@ -57,144 +56,12 @@ void term::progress(int prefixlen,
*_out << ' ' << std::setw(3) << perc << '%';
}
void term::hide_cursor() const {
// ------------------------------------------------------------------------
cursor_hider::cursor_hider(std::ostream* out) : _out {out} {
*_out << io::hide_cursor;
}
void term::show_cursor() const {
cursor_hider::~cursor_hider() {
*_out << io::show_cursor;
}
void term::reset() const {
*_out << io::reset;
}
void term::bold() const {
*_out << io::bold;
}
void term::italic() const {
*_out << io::italic;
}
void term::underline() const {
*_out << io::underline;
}
void term::overline() const {
*_out << io::overline;
}
void term::strikethru() const {
*_out << io::strikethru;
}
void term::blinkslow() const {
*_out << io::blinkslow;
}
void term::blinkfast() const {
*_out << io::blinkfast;
}
void term::reverse() const {
*_out << io::reverse;
}
void term::blackf() const {
*_out << io::blackf;
}
void term::redf() const {
*_out << io::redf;
}
void term::greenf() const {
*_out << io::greenf;
}
void term::yellowf() const {
*_out << io::yellowf;
}
void term::bluef() const {
*_out << io::bluef;
}
void term::magentaf() const {
*_out << io::magentaf;
}
void term::cyanf() const {
*_out << io::cyanf;
}
void term::whitef() const {
*_out << io::whitef;
}
void term::defaultf() const {
*_out << io::defaultf;
}
void term::grayf(int val) const {
*_out << io::grayf(val);
}
void term::rgbf(int r, int g, int b) const {
*_out << io::rgbf(r, g, b);
}
void term::blackb() const {
*_out << io::blackb;
}
void term::redb() const {
*_out << io::redb;
}
void term::greenb() const {
*_out << io::greenb;
}
void term::yellowb() const {
*_out << io::yellowb;
}
void term::blueb() const {
*_out << io::blueb;
}
void term::magentab() const {
*_out << io::magentab;
}
void term::cyanb() const {
*_out << io::cyanb;
}
void term::whiteb() const {
*_out << io::whiteb;
}
void term::defaultb() const {
*_out << io::defaultb;
}
void term::grayb(int val) const {
*_out << io::grayb(val);
}
void term::rgbb(int r, int g, int b) const {
*_out << io::rgbb(r, g, b);
}
// ------------------------------------------------------------------------
cursor_hider::cursor_hider(int fd) : _t {fd} {
_t.hide_cursor();
}
cursor_hider::~cursor_hider() {
_t.show_cursor();
}