1
edit
Changes
→Complex Functions
== Complex Functions ==
=== void iof_display(const char *str, int row, int col, int len) ===
Outputs the null-terminated string pointed to by "str", on the screen starting at row "row" and column "col", upto "len" characters. As with iof_move(), 0 is the top row, and 0 is the leftmost column. If the string is longer than "len", then only "len" characters are displayed, but if it is shorter than "len", then the entire string is displayed left-justified in the field. However, if "len" is 0 or less, then the field length is considered to be the actual length of the string (i.e. the entire string is displayed). Afterwards, the cursor is positioned after the last character of the field. (Note that on systems where output is buffered, this function should not flush the output buffer). The results are undefined if the specified values indicate a field that does not fit on the screen.
<big>int iof_edit(char* '''str''', int '''row''', int '''col''', <br />
int '''fieldlen''', int '''maxdatalen''', int *'''*insertmode''', int *'''*offset''',<br /> int *'''*curpos''', int '''IsTextEditor''', int '''ReadOnly''')</big>
[[Presentation of variable| Presentation of variable]] <br />
==== void iof_displayflag(..........) ====
<big>void iof_displayflag(const char *'''*format''', int '''row''', int '''col''', int '''status''');</big>
Allows the user to display a <u>checkbox</u> at '''row''' and '''col''' on the screen. Depending on the value of '''status'''; being zero or non-zero, the checkbox will be checked or unchecked respectively.
The 3 characters held in the '''“format”''' array; format[0] and format[2] are surrounding characters and format[1] is the check-mark.
The '''const char *format''' is used to specify the character used for the checkbox, so for example if the '''format'''argument is "[X]", then an ''unchecked'' checkbox will be<big><pre>[ ]</pre></big> and a ''checked'' checkbox will be<big><pre>[X]</pre></big>
After the checkbox is displayed, the cursor is always place under the check-mark (in centre).
==== int iof_flag(..........) ====
<big>int iof_flag(const char *'''*format''', int '''row''', int '''col''', int *'''*status''', int '''radio''');</big>
io_flag() allows the user to make a single true/false selection. '''"status"''' points to the status of the selection, that can be zero or non-zero. If '''"*status"''' is initially set to anything but zero, iof_flag() corrects value to one.'''"format"''' holds the shape of the checkbox as iof_displayflag() function.
==== void iof_displayMenuItem(..........) ====
<big>void iof_displayMenuItem(const char *'''*format''', const char *'''*menuItem''', int '''row''', int '''col''', int '''len''', int '''status''');</big>
Allows the user to display a menu-item at '''row''' and '''col''' on the screen with width of '''len'''. Depending on the value of '''status'''; being zero or non-zero, the menu-item will be surrounded by '''format''' characters or space respectively.
==== int iof_menuItem(..........) ====
<big>int iof_menuItem(const char *'''*format''', const char *'''*menuItem''', int '''row''', int '''col''', int '''len''', int*'''*status''');</big>
iof_menuItem() allows the user to make a single item selection. '''"*status"''' points to the status of the selection, that can be zero or non-zero. If '''"*status"''' is initially set to anything but zero, iof_menuItem() corrects value to one.'''"*format"''' holds the shape of the selection indicator as iof_displayMenuItem() function.