Open main menu

CDOT Wiki β

Changes

OOP344 Assignment Two

982 bytes added, 10:52, 19 October 2009
IO_Frame
===IO_Frame===
 
'''IO_Frame''' class, encapsulates a frame. It Draws a frame at left top cornder of '''col''' and '''row''' with specified '''width''' and '''height'''.
 
A Frame can be instatiated as follows:
<big><pre>
IO_Frame(int row, int col, int width, int height, const char* frameChars = (const char*)0);
</pre></big>
 
the '''frameChars''' are characters used to draw the frame, charachters in order are:
# left side
# left top corner
# top side
# top right corner
# right side
# right buttom corner
# buttom side
# buttom left conrner
 
So to draw this:
<big><pre>
/--------\
| |
| |
| |
\--------/
</pre></big>
 
frame chars should be:
<big><pre>
"|/-\|/-\"
</pre></big>
 
If however, the '''frameChars''' argument is missing (it is NULL) then a defaut, defined value in "io_def.h"; '''_FRAMW_CHARS''' should be used.
 
<big><pre>
void Display(void);
</pre></big>
'''Display()''', displays the frame with the specified coordinates and size in its constructor
===IO_Form===