Changes

Jump to: navigation, search

Console Framework Classes 20103 - OOP344

1,697 bytes added, 09:41, 9 November 2010
FWField
===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.
 
Forward declaration of FWDialog is needed for this class;
<big><syntaxhighlight lang="cpp">
class FWField: public FWBorder{
};
</syntaxhighlight></big>
 
 
 
====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,
int Width = 0, int Height =0,
void* Data = (void*) 0,
bool Bordered = false,
const char* Border=FW_BORDER_CHARS);
</pre></big>
 
Passes the corresponding attributes to it's parents constructor and then sets the _data attribute to the incoming Data argument.
 
<big><pre>
~FWField();
</pre></big>
An empty destructor
 
<big><pre>
virtual int edit() = 0;
</pre></big>
Enforces the children to implement an edit() method
 
<big><pre>
virtual bool editable() const = 0;
</pre></big>
Enforces the children to implement an editable() method that returns true if the class is to edit data and false if the class is to only display data.
<big><pre>
virtual void set(const void* data) = 0;
</pre></big>
Enforces the children to implement a set() method to set the _data attribute to the data the class is to work with.
 
<big><pre>
virtual void* data();
</pre></big>
Returns _data;
 
<big><pre>
void container(FWDialog* theOwner);
</pre></big>
 
Sets the _container attribute of FWBorder to '''theowner''' argument.
 
 
<big><pre>
FWDialog* container();
</pre></big>
 
Casts the return value of FWBorder::containr() to a FWDialog* and returns it.
 
===FWLabel===
<big><syntaxhighlight lang="cpp">

Navigation menu