|
|
|
| AsciiGraphics (ostream &os) |
| |
|
| ~AsciiGraphics () |
| |
|
| int | getTextHeight () |
| |
| int | getTextLength (const std::string &s) |
| |
| int | getCharLength (char) |
| |
| int | getParenthesisWidth (int) |
| |
| int | getDivideLineHeight () |
| |
| int | getDifferentialHeight (char) |
| |
| int | getDifferentialWidth (char) |
| |
| int | getDifferentialBase (char) |
| |
| void | differential (int x0, int y0, char variable) |
| |
| void | parenthesis (int x_size, int y_size, int x0, int y0) |
| |
| void | horiz_line (int x_size, int x0, int y0) |
| |
| void | at (int x, int y, int c, Attributes, Color color=BLACK) |
| |
| void | at (int x, int y, const string &s, Attributes, Color color=BLACK) |
| |
| void | out () |
| |
| void | clear_screen () |
| |
| virtual void | set (int x, int y, int, int) |
| |
| | Graphics () |
| |
| virtual | ~Graphics () |
| |
| virtual void | at (int x0, int y0, const std::string &s, Attributes chrAttr, Color color=BLACK)=0 |
| |
| virtual void | setSelect (int x, int y, int x0, int y0) |
| |
| void | set (const Box &box) |
| |
| void | setSelect (const Box &box) |
| |
| void | parenthesis (const Box &box) |
| |
| void | relativeOrig (int &x, int &y) |
| |
|
| void | at (int x, int y, int c) |
| |
|
| enum | Color {
BLACK,
RED,
GREEN,
YELLOW,
BLUE,
MAGENTA,
CYAN,
WHITE
} |
| |
| enum | Attributes { NONE =0,
BOLD =1,
ITALIC =2,
BOLD_ITALIC =3
} |
| |
|
int | m_xSize |
| | Horizontal size of graphic window.
|
| |
|
int | m_ySize |
| | Vertical size of graphic window.
|
| |
|
int | m_xOrig |
| | Horizontal origin of graphic window.
|
| |
|
int | m_yOrig |
| | Vertical origin of graphic window.
|
| |
|
Box | m_select |
| | Currently selected area.
|
| |
Class derived from ABC graphics so Equation can draw to a 2D character array.
| void AsciiGraphics::at |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
c, |
|
|
Attributes |
, |
|
|
Color |
color = BLACK |
|
) |
| |
|
inlinevirtual |
Draw a string at x,y with a color.
- Parameters
-
| x | Horizontal origin of line. |
| y | Vertical origin of line. |
| c | Character to be drawn at x0,y0. |
| color | Color of line. |
Implements UI::Graphics.
| void AsciiGraphics::at |
( |
int |
x, |
|
|
int |
y, |
|
|
const string & |
s, |
|
|
Attributes |
, |
|
|
Color |
color = BLACK |
|
) |
| |
Draw a string at x,y with a color.
- Parameters
-
| x | Horizontal origin of line. |
| y | Vertical origin of line. |
| s | String to be drawn at x0,y0. |
| color | Color of line. |
| void AsciiGraphics::at |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
c |
|
) |
| |
|
inlineprivate |
Draw a string at x,y with a color.
- Parameters
-
| x | Horizontal origin of line. |
| y | Vertical origin of line. |
| c | Character to be drawn at x0,y0. |
| void AsciiGraphics::clear_screen |
( |
| ) |
|
|
virtual |
| void AsciiGraphics::differential |
( |
int |
x0, |
|
|
int |
y0, |
|
|
char |
variable |
|
) |
| |
|
virtual |
Draw differential of width x0 and height y0 with char variable name.
- Parameters
-
| x0 | Horizontal origin of differential. |
| y0 | Vertical origin of differential. |
| variable | Name of variable of differential. |
Implements UI::Graphics.
| int AsciiGraphics::getCharLength |
( |
char |
| ) |
|
|
inlinevirtual |
Length of character in ASCII is 1.
- Returns
- Return one.
Implements UI::Graphics.
| int AsciiGraphics::getDifferentialBase |
( |
char |
| ) |
|
|
inlinevirtual |
Get vertical offset of differential.
- Returns
- Vertical offset of differential in lines of text.
Implements UI::Graphics.
| int AsciiGraphics::getDifferentialHeight |
( |
char |
| ) |
|
|
inlinevirtual |
Get height of differential in lines of text.
- Returns
- Height of differential in lines of text.
Implements UI::Graphics.
| int AsciiGraphics::getDifferentialWidth |
( |
char |
| ) |
|
|
inlinevirtual |
Get width of differential in lines of text.
- Returns
- Width of differential in lines of text.
Implements UI::Graphics.
| int AsciiGraphics::getDivideLineHeight |
( |
| ) |
|
|
inlinevirtual |
Get height of line in a division node which is always 1.
- Returns
- Return one.
Implements UI::Graphics.
| int AsciiGraphics::getParenthesisWidth |
( |
int |
| ) |
|
|
inlinevirtual |
Get width of a parenthesis in characters which is always 1.
- Returns
- Return one.
Implements UI::Graphics.
| int AsciiGraphics::getTextHeight |
( |
| ) |
|
|
inlinevirtual |
Get height of text in lines.
- Returns
- All ASCII characters are one line in height.
Implements UI::Graphics.
| int AsciiGraphics::getTextLength |
( |
const std::string & |
s | ) |
|
|
inlinevirtual |
Get length of string in characters.
- Returns
- Length of string in characters.
Implements UI::Graphics.
| void AsciiGraphics::horiz_line |
( |
int |
x_size, |
|
|
int |
x0, |
|
|
int |
y0 |
|
) |
| |
|
inlinevirtual |
Draw a horizontal line starting at x0,y0 length x_size.
- Parameters
-
| x_size | Horizontal size of both line. |
| x0 | Horizontal origin of line. |
| y0 | Vertical origin of line. |
Implements UI::Graphics.
| void AsciiGraphics::out |
( |
| ) |
|
|
virtual |
Flush all characters to the text array.
Implements UI::Graphics.
| void AsciiGraphics::parenthesis |
( |
int |
x_size, |
|
|
int |
y_size, |
|
|
int |
x0, |
|
|
int |
y0 |
|
) |
| |
|
virtual |
Draw pair of parenthesis around a node of size x_size, y_size and origin x0,y0.
- Parameters
-
| x_size | Horizontal size of both parenthesis. |
| y_size | Vertical size of parenthesis. |
| x0 | Horizontal origin of parenthesis. |
| y0 | Vertical origin of parenthesis. |
Implements UI::Graphics.
| virtual void AsciiGraphics::set |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
, |
|
|
int |
|
|
) |
| |
|
inlinevirtual |
Set size of the text array (origin is always 0,0).
- Parameters
-
| x | Horizontal size of text array. |
| y | Vertical size of text array. |
Reimplemented from UI::Graphics.
The documentation for this class was generated from the following file: