|
Milo
0.1
Milo:EquationManipulationProgram
|
#include <ui.h>


Public Types | |
| enum | Color { BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE } |
| enum | Attributes { NONE =0, BOLD =1, ITALIC =2, BOLD_ITALIC =3 } |
Public Member Functions | |
Constructor and Virtual Destructor | |
| Graphics () | |
| virtual | ~Graphics () |
Virtual Public Member Functions | |
| virtual void | differential (int x0, int y0, char variable)=0 |
| virtual void | parenthesis (int x_size, int y_size, int x0, int y0)=0 |
| virtual void | horiz_line (int x_size, int x0, int y0)=0 |
| virtual void | at (int x0, int y0, int c, Attributes chrAttr, Color color=BLACK)=0 |
| virtual void | at (int x0, int y0, const std::string &s, Attributes chrAttr, Color color=BLACK)=0 |
| virtual void | clear_screen ()=0 |
| virtual void | out ()=0 |
| virtual int | getTextHeight ()=0 |
| virtual int | getTextLength (const std::string &s)=0 |
| virtual int | getCharLength (char c)=0 |
| virtual int | getParenthesisWidth (int height=1)=0 |
| virtual int | getDivideLineHeight ()=0 |
| virtual int | getDifferentialHeight (char c)=0 |
| virtual int | getDifferentialWidth (char c)=0 |
| virtual int | getDifferentialBase (char c)=0 |
| virtual void | set (int x, int y, int x0=0, int y0=0) |
| virtual void | setSelect (int x, int y, int x0, int y0) |
Public helper member functions. | |
| void | set (const Box &box) |
| void | setSelect (const Box &box) |
| void | parenthesis (const Box &box) |
| void | relativeOrig (int &x, int &y) |
Protected Attributes | |
| 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. | |
Abstract base class to provide a context free graphical interface. Provides an interface of helper functions that allow nodes to draw themselves on the current graphical interface.
Predefined character attributes.
| enum UI::Graphics::Color |
Predefined colors.
|
inline |
Default constructor.
|
inlinevirtual |
Abstract base class needs vertical destructor.
|
pure virtual |
Draw a character at x,y with a color.
| x0 | Horizontal origin of character. |
| y0 | Vertical origin of character. |
| c | Character to be drawn at x0,y0. |
| chrAttr | Attribute of character. |
| color | Color of character. |
Implemented in AsciiGraphics, and CursesGraphics.
|
pure virtual |
Draw a string at x,y with a color.
| x0 | Horizontal origin of line. |
| y0 | Vertical origin of line. |
| s | String to be drawn at x0,y0. |
| chrAttr | Attribute of character. |
| color | Color of line. |
|
pure virtual |
Clear screen.
Implemented in CursesGraphics, and AsciiGraphics.
|
pure virtual |
Draw differential of width x0 and height y0 with char variable name.
| x0 | Horizontal origin of differential. |
| y0 | Vertical origin of differential. |
| variable | Name of variable of differential. |
Implemented in CursesGraphics, and AsciiGraphics.
|
pure virtual |
Get length of character in pixels.
Implemented in CursesGraphics, and AsciiGraphics.
|
pure virtual |
Get vertical offset of differential.
| c | Variable name of differential. |
Implemented in CursesGraphics, and AsciiGraphics.
|
pure virtual |
Get height of differential.
| c | Variable name of differential. |
Implemented in CursesGraphics, and AsciiGraphics.
|
pure virtual |
Get width of differential.
| c | Variable name of differential. |
Implemented in CursesGraphics, and AsciiGraphics.
|
pure virtual |
Get height of line in a division node.
Implemented in CursesGraphics, and AsciiGraphics.
|
pure virtual |
Get width of a parenthesis for a given height in pixels.
Implemented in CursesGraphics, and AsciiGraphics.
|
pure virtual |
Get height of text in pixels.
Implemented in CursesGraphics, and AsciiGraphics.
|
pure virtual |
Get length of string in pixels.
Implemented in CursesGraphics, and AsciiGraphics.
|
pure virtual |
Draw a horizontal line starting at x0,y0 length x_size.
| x_size | Horizontal size of both line. |
| x0 | Horizontal origin of line. |
| y0 | Vertical origin of line. |
Implemented in CursesGraphics, and AsciiGraphics.
|
pure virtual |
Flush all drawing so far to graphic interface.
Implemented in CursesGraphics, and AsciiGraphics.
|
pure virtual |
Draw pair of parenthesis around a node of size x_size, y_size and origin x0,y0.
| x_size | Horizontal size of both parenthesis. |
| y_size | Vertical size of parenthesis. |
| x0 | Horizontal origin of parenthesis. |
| y0 | Vertical origin of parenthesis. |
Implemented in CursesGraphics, and AsciiGraphics.
|
inline |
Draw a pair of parenthesis inside the rectangle box.
| box | Rectangle containing origin and size of parenthesis. |
|
inline |
Change the coordinates x,y to be relative to the graphic's window origin.
| [in,out] | x | Horizontal coordinate to be shifted. |
| [in,out] | y | Vertical coordinate to be shifted. |
|
inlinevirtual |
Set size and origin of this graphics window.
| x | Horizontal size of both graphics window. |
| y | Vertical size of graphics window. |
| x0 | Horizontal origin of graphics window. |
| y0 | Vertical origin of graphics window. |
Reimplemented in CursesGraphics, and AsciiGraphics.
|
inline |
Set size and origin of this graphics window from a rectangle.
| box | Rectangle containing origin and size of window. |
|
inlinevirtual |
Select the area of size x,y at origin x0,y0.
| x | Horizontal size of both selection area. |
| y | Vertical size of selection area. |
| x0 | Horizontal origin of selection area. |
| y0 | Vertical origin of selection area. |
Reimplemented in CursesGraphics.
|
inline |
Set selection area from rectangle.
| box | Rectangle containing origin and size of selection area. |
1.8.11