Open main menu

CDOT Wiki β

Changes

Oop344 20102 - iof functions

16 bytes added, 13:00, 17 June 2010
Complex Functions: fixed typeo
NOTE: The following corrections should be done to '''"*curpos"''' and '''"*offset"''' in case they hold invalid values before editing begins:
# If '''"*curpos"''' exceeds greater than or equal to the value of fieldlen, correct the '''"*curpos"''' so that cursor stands at the last position inside the field.
# If '''"*offset"''' is greater than the length of the string, set the '''"*offset"''' so the “last character of str” is hidden right before the first space in the field. (See '''“[[Oop344 20102 - iof functions#IsTextEditor:|IsTextEditor Section #1]]”''' for more)
# After the above, if cursor is past the last character of '''“str”''', set '''"*curpos"''' so the cursor stands right after the last character of "str".
* '''TAB''':
** if '''IsTextEditor''' is false, TAB will simply terminate the function like a Function key
** if '''IsTextEditor''' is true, TAB will insert '''CIO_TAB_SIZE''' number of spaces into the string.'''CIO_TAB_SIZE''' should be a defined "tab size" value in cioliof.h. If '''CIO_TAB_SIZE''' spaces cannot be inserted into the string for any reason then the inputted tab should be ignored. (See '''“[[Oop344 20102 - iof functions#IsTextEditor:|IsTextEditor Section #2]]”''' for more)
* '''ESCAPE''' - Terminates iof_edit() and aborts editing: '''"str"''' will contain originally passed data when leaving function. (See '''“[[Oop344 20102 - iof functions#IsTextEditor:|IsTextEditor Section #3]]”''' for exception)
* '''INSERT''' - toggle Insert/Overstrike mode
1
edit