Jump to: navigation, search

Console Framework Classes 20103 - OOP344

1,250 bytes added, 12:28, 9 November 2010
FWDialog is a collection of several FWField; it organizes and groups FWFields for user entry and interaction <br />
The following definition is just a suggestion for how to implement this class. You can change it under with your professors confirmation to a better way if you like.
===Class Definition===
<big><syntaxhighlight lang="cpp">
int _fnum;
Holds the number of FWFields added to FWDialog.
int _curidx;
Holds the index of the FWFields that is being edited now.
FWField* _fld[FW_MAX_NO_FIELDS];
An array of FWFields pointers. Initially all the elements of _fld is set to null. When a FWField is added to the form, it will be pointed by one of the elements of this array.
bool _dyn[FW_MAX_NO_FIELDS];
An array of boolean values exactly to the number of elements of _fld. When FWField number "n" is added to FWDialog and is pointed by _fld[n-1], the corresponding _dyn[n-1] indicate if the FWField held in _fld[n-1] is dynamically allocated or not. the _dyn flags will be used in the destructor as deallocation condition for each _fld element.
bool _editable;
Is set to true, if at least one of the FWFields in _fld is editable.
===Dialog and Label Tester===
[[OOP344 20103 Framework Dialog and Label Tester | Test2DialogAndLabel.cpp]]

Navigation menu