|
Bugz Door Project
|
The BBS door project. This is an attempt at writing a C++ BBS door toolkit. More...
Classes | |
| class | ANSIColor |
| Foreground, Background and Attributes. More... | |
| struct | box_styles |
| class | Clrscr |
| Clear the screen. More... | |
| class | ColorOutput |
| This holds an ANSIColor and text position + length. More... | |
| class | Door |
| class | Goto |
| ANSI Goto X, Y position. More... | |
| class | IConv |
| class | Line |
| Text and ANSIColor. More... | |
| class | Menu |
| class | NewLine |
| CR+LF. More... | |
| class | Panel |
| class | Render |
| Rendering a string with ANSIColor. More... | |
| class | Screen |
Typedefs | |
| typedef std::function< Render(const std::string &)> | renderFunction |
| Render output function. More... | |
| typedef std::function< std::string(void)> | updateFunction |
Enumerations | |
| enum | COLOR : std::int8_t { COLOR::BLACK, COLOR::RED, COLOR::GREEN, COLOR::BROWN, COLOR::YELLOW = 3, COLOR::BLUE, COLOR::MAGENTA, COLOR::CYAN, COLOR::WHITE } |
| The colors available under ANSI-BBS. More... | |
| enum | ATTR : std::int8_t { ATTR::RESET, ATTR::BOLD, ATTR::BRIGHT = 1, ATTR::BLINK = 5, ATTR::INVERSE = 7 } |
| ANSI-BBS text attributes. More... | |
| enum | Justify { NONE, LEFT, RIGHT, CENTER } |
| enum | BorderStyle { BorderStyle::NONE, BorderStyle::SINGLE, BorderStyle::DOUBLE, BorderStyle::SINGLE_DOUBLE, BorderStyle::DOUBLE_SINGLE, BorderStyle::BLANK } |
Functions | |
| std::ostream & | operator<< (std::ostream &os, const ANSIColor &c) |
| void | to_lower (std::string &text) |
| bool | replace (std::string &str, const std::string &from, const std::string &to) |
| bool | replace (std::string &str, const char *from, const char *to) |
| void | sig_handler (int signal) |
| void | cp437toUnicode (std::string input, std::string &out) |
| void | cp437toUnicode (const char *input, std::string &out) |
| std::ostream & | operator<< (std::ostream &os, const Clrscr &clr) |
| std::ostream & | operator<< (std::ostream &os, const NewLine &nl) |
| std::ostream & | operator<< (std::ostream &os, const Goto &g) |
| std::ostream & | operator<< (std::ostream &os, const Line &l) |
| std::ostream & | operator<< (std::ostream &os, const Panel &p) |
| std::ostream & | operator<< (std::ostream &os, const Screen &s) |
Variables | |
| ANSIColor | reset (ATTR::RESET) |
| reset colors to normal More... | |
| bool | unicode = false |
| bool | full_cp437 = false |
| bool | debug_capture = false |
| Clrscr | cls |
| NewLine | nl |
| const char | SaveCursor [] = "\x1b[s" |
| const char | RestoreCursor [] = "\x1b[u" |
| renderFunction | rBlueYellow |
| BlueYellow Render example function. More... | |
| struct box_styles | UBOXES [] |
| struct box_styles | BOXES [] |
| const char * | JOIN [2][2][2] |
| const char * | UJOIN [2][2][2] |
The BBS door project. This is an attempt at writing a C++ BBS door toolkit.
| typedef std::function<Render(const std::string &)> door::renderFunction |
Render output function.
This defines the render output function. Given the line text, we output the color codes needs to display the line.
| typedef std::function<std::string(void)> door::updateFunction |
This defines the update function.
This updates the text.
|
strong |
|
strong |
The different Borders supported by Panel.
| Enumerator | |
|---|---|
| NONE | NONE (0) |
| SINGLE | SINGLE (1) |
| DOUBLE | DOUBLE (2) |
| SINGLE_DOUBLE | SINGLE top DOUBLE side (3) |
| DOUBLE_SINGLE | DOUBLE top SINGLE side (4) |
| BLANK | BLANK (5) |
|
strong |
|
strong |
| std::ostream& door::operator<< | ( | std::ostream & | os, |
| const ANSIColor & | c | ||
| ) |
| std::ostream& door::operator<< | ( | std::ostream & | os, |
| const Clrscr & | clr | ||
| ) |
Clear the screen using ANSI codes.
Not all systems home the cursor after clearing the screen. We automatically home the cursor as well.
| os | std::ostream& |
| clr | const Clrscr& |
| std::ostream& door::operator<< | ( | std::ostream & | os, |
| const Goto & | g | ||
| ) |
| std::ostream& door::operator<< | ( | std::ostream & | os, |
| const Line & | l | ||
| ) |
| std::ostream& door::operator<< | ( | std::ostream & | os, |
| const NewLine & | nl | ||
| ) |
| Clrscr door::cls |
Clear the BBS terminal.
| const char* door::JOIN[2][2][2] |
| NewLine door::nl |
CRLF
| renderFunction door::rBlueYellow |
BlueYellow Render example function.
Example BlueYellow renderFunction.
| ANSIColor door::reset |
reset colors to normal
This resets the colors to normal state.
| struct box_styles door::UBOXES[] |
use https://en.wikipedia.org/wiki/Code_page_437 for translations between CP437 and unicode symbols.
This holds the characters needed to render the different box styles. tl tr top side bl br ml mr
| const char* door::UJOIN[2][2][2] |
1.8.17