Changes

Jump to: navigation, search

Console Framework Classes 20103 - OOP344

58 bytes removed, 10:46, 9 November 2010
The Frame work
== General Internal Header file ==
The general header file holds the common setting and definition between all classes in the frame work.
<big><syntaxhighlight lang="cpp">
|-------- FWMenu (Maybe?)
</pre></big>
===FWBorder===
FWBorder is the base of all IO entities in our framework. It encapsulate a window or a container in witch IO Fields are to be placed and run.
It encapsulates a border, cordinates and size.
====Class Definition====
<big><syntaxhighlight lang="cpp">
class FWBorder {
</syntaxhighlight></big>
=====Properties=====
int _row, holds the relative coordinate of top row of this border with respect to its container.<br />
int _col, same as _row, but for _col. <br />
bool _visible; Indicates if the border surrounding the entity is to be drawn or not. <br />
FWBorder* _container; holds the container (another FWBorder) which has opened this one (owner or container of the current FWBorder). '''_container''' will be NULL if this FWBorder does not have a container, in which case, it will be full screen and no matter what the values of row, col, width and height are, FWBorder will be '''Full Screen''' (no border will be drawn)
=====Methods===========Protected======
*int absRow()const;
These two methods return the absolute coordinates of the FWBorder instance. (the row an column with respect to left top corner of the screen). These tow functions are used to '''draw''' the border on the screen.
======public======
<big><pre>
FWBorder(int Row=0, int Col=0, int Width=0,int Height=0,
*If the _visible flag is true, it will draw a box at _row and _col, with size of _width and _height using the _border characters and fills it with spaces. Otherwise it will just draw a box using spaces at the same location and same size.
====Border Tester====
[[OOP344 20103 BorderTester | BorderTester.cpp]]
===FWField===
This is an abstract class that is the base of any IO Field entity on a Dialog Box. It holds essential common attributes of a Fields (which some are inherited from border) and enforces implementation of essential methods by it children through pure virtual methods.
====Attributes====
<big><pre>
void* _data;
</pre></big>
Will hold the address of any type of data a FWField can hold.
====Methods====
<big><pre>
FWField(int Row = 0, int Col = 0,
Casts the return value of FWBorder::containr() to a FWDialog* and returns it.
===FWLabel===
FWLabel is child of FWField (therefore inheriting FWBorder too) responsible to display a short character string on the display.
This class is never editable
</syntaxhighlight></big>
====Attributes====
<big><pre>
int _length;
Holds the Length of the display area needed by iol_display.
====Methods====
<big><pre>
FWLabel(const char *Str, int Row, int Col,
copies the string pointed by '''str''' upto '''_length''' characters to '''_data'''.
===FWDialog=======Class Definition====
<big><syntaxhighlight lang="cpp">
</syntaxhighlight></big>
====Dialog and Label Tester====
[[OOP344 20103 Framework Dialog and Label Tester | Test2DialogAndLabel.cpp]]
===FWLineEdit===
====Class Definition====
<big><syntaxhighlight lang="cpp">
</syntaxhighlight></big>
==== Dialog and Line editor Tester ====
[[oop344 20103 Framework Dialog and Lineeditor Tester | DialogAndLineEditor.cpp]]
===FWButton=======Class Definition====
<big><syntaxhighlight lang="cpp">
</syntaxhighlight></big>
====Button Tester====
[[Project Button Text - OOP344 20103 | ButtonTest.cpp]]
===FWCHECK=======Class Definition====
<big><syntaxhighlight lang="cpp">
class FWCheck : public FWLabel {
</syntaxhighlight></big>
====Button Tester====
[[Framework Checkbox Tester - OOP344 21013 | CheckboxTester.cpp]]
===FWValEdit=======Class Definition====
<big><syntaxhighlight lang="cpp">
class FWValEdit: public FWLineEdit{
</syntaxhighlight></big>
====Validated Line editor Tester====
[[Validated LineEdit Tester - OOP344 20103 | FWValEditTester.cpp]]

Navigation menu