Essentia
2.1-beta6-dev
|
#include <asciidag.h>
Public Member Functions | |
AsciiBox (const std::vector< std::string > &network, int x, int y) | |
bool | borderContains (int x, int y) const |
Static Public Member Functions | |
static bool | isBox (const std::vector< std::string > &network, int x, int y) |
static std::vector< AsciiBox > | findBoxes (const std::vector< std::string > &network) |
Public Attributes | |
int | posX |
int | posY |
int | width |
int | height |
std::string | title |
This class represents a box in an ASCII canvas. At the moment, the only chars allowed for drawing boxes are:
AsciiBox | ( | const std::vector< std::string > & | network, |
int | x, | ||
int | y | ||
) |
This constructs a box that is supposedly anchored at pos (x, y) in the given network. If that is not the case, the result is undefined.
bool borderContains | ( | int | x, |
int | y | ||
) | const |
Return whether the given position is located on the border (frame) of this box.
|
static |
Find and return all the boxes in the given ascii network representation. This function does not do any checking of any sort, so an ill-formed box will simply be ignored and no exception will be thrown
|
static |
Return whether there is a box which top-left corner is located at (x, y).
int height |
int posX |
int posY |
std::string title |
int width |