21
edits
Changes
→The Frame work
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 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.
<big><syntaxhighlight lang="cpp">
class FWBorder {
</syntaxhighlight></big>
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)
*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.
<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.
[[OOP344 20103 BorderTester | BorderTester.cpp]]
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.
<big><pre>
void* _data;
</pre></big>
Will hold the address of any type of data a FWField can hold.
<big><pre>
FWField(int Row = 0, int Col = 0,
Casts the return value of FWBorder::containr() to a FWDialog* and returns it.
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>
<big><pre>
int _length;
Holds the Length of the display area needed by iol_display.
<big><pre>
FWLabel(const char *Str, int Row, int Col,
copies the string pointed by '''str''' upto '''_length''' characters to '''_data'''.
<big><syntaxhighlight lang="cpp">
</syntaxhighlight></big>
[[OOP344 20103 Framework Dialog and Label Tester | Test2DialogAndLabel.cpp]]
<big><syntaxhighlight lang="cpp">
</syntaxhighlight></big>
[[oop344 20103 Framework Dialog and Lineeditor Tester | DialogAndLineEditor.cpp]]
<big><syntaxhighlight lang="cpp">
</syntaxhighlight></big>
[[Project Button Text - OOP344 20103 | ButtonTest.cpp]]
<big><syntaxhighlight lang="cpp">
class FWCheck : public FWLabel {
</syntaxhighlight></big>
[[Framework Checkbox Tester - OOP344 21013 | CheckboxTester.cpp]]
<big><syntaxhighlight lang="cpp">
class FWValEdit: public FWLineEdit{
</syntaxhighlight></big>
[[Validated LineEdit Tester - OOP344 20103 | FWValEditTester.cpp]]