1
edit
Changes
no edit summary
Save your work in separate files for each class. Name the files to the same name as the classes. Each class should have a header file and a code file.
For example for the class IOField, create iofield.h and iofield.cpp. The header file should hold the class declaration and any other possible declaration related to the class. the The "cpp" file should hold the definition (implementation) of the class and its methods and possible functions.
Create a Make file to build your project with respect to dependencies of classes.
int getOwnerLeft()const;
</pre></big>
These two methods return the top and left, coordinates of the frame of the form in which the field exists.They simply return zero, if there is no owner. This can help the display methods of a field to place the field at the correct, relative position according to the from form they are displayed in.
====displayOwner() (optional)====
<big><pre>
</blockquote>
The display function work in the following order:
# If IO_CLEAR bit is set in '''how''', then before anything the screen should be be cleared.
# If the field number is 0 (zero) then
## if IO_SHOW_ALL is set in '''how''', then all the fields are displayed in the order they were added
## otherwise either of IO_SHOW_ERROR or IO_SHOW_HELP is set, only their corresponding designated IO_Label will be displayed.
# if the filed field number is not zero, then the IO_Field number "fieldnumber" will be displayed. If the number is larger than the number of fields in the IO_Form then it will be rotated back from the beginning. (i.e. if there are 4 fields in the form and fieldnumber is 5, then filed number 1 will be displayed)
<hr width="50%" />
int edit(void);
</pre></big>
*This function can change the status for each check item. Use UPKEY and DOWNKEY to select the individual check item, SPACE key to toggle the check status, and other keys to exit the edit mode. This function return returns the last key value.
<big><pre>
int maxLines = -1,const char* frameChars = (const char*)0);</pre></big>
This constructor set the class to dynamically create "series of strings" to be edited by io_edit function in the edit method when needed.The arguments, row and column are top and left coordinates of the text field and width and hieght height are the width and height of the text field.
insertMode is where the insert flag status is kept.
frameChars hold the optional characters to build the frame.
The "single dimension string" representation of the "series of the strings" holding the text will the then be where str argument is pointing to. No dynamic memory is allocated for this.It is the caller program's responsibilty responsibility to accommodate enough space for the data;
maxLines argument will limit the number of the lines in text, unless it is set to -1.