From CDOT Wiki
=== IsTextEditor: ===
If IsTextEditor is true, then it means that the function is being used to edit text by editing one line of text at a time. In this case, shifting a line to the left or right should not only cause the editing line to be shifted, but also the rest of the lines in the text. To do this, iof_edit() should let the calling function know that a shift has happened. Since shifting essentially means modifying '''“*offset”''' when '''“IsTextEditor”''' is true, and that there are times when you find that '''“*offset”''' needs to be modified, you should terminate the function afterwards. With termination, the function should return the terminating key.
Note that at the beginning of the execution of iof_edit(), validating '''*offset''' may require the value of '''*offset''' to change. If so, make sure to correct the offset and then terminate the function before any editing happens returning the default value of key.
# The iof_edit() function always shows blanks in any the part of the field that is not occupied by the data in the string.
#<u>UNDER NO CIRCUMSTANCES DOES THE FUNCTION CHANGE ANY POSITION ON THE SCREEN OUTSIDE OF THE FIELD</u>.
# When '"IsTextEditor"' is true and ESCAPE KEY is hit, do not abort the editing, and simply terminate the function returning the ESCAPE KEY.
# If memory allocation for aborting the edit (ESCAPE KEY) fails, quit the function returning -1.
# Any normal printable key is simply placed into the string according to the rules laid out in the discussion of the INSERT key above.(The keys from the space character to the tilde character in the ASCII table are considered "printable".)
# Like most C library functions, your iof_edit() may assume that it is the calling program's responsibility is to ensure that the array is large enough to handle the specified number of characters, and that the starting screen position provides enough room (on the screen) for the field, etc.
=== Selection Editor ===