Changes

Jump to: navigation, search

BIO Functions oop344 20111

15 bytes removed, 09:24, 27 January 2011
no edit summary
# If '''"*curpos"''' is 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 '''“[[Iolib functions 20103 - OOP344BIO Functions oop344 20111#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".
<u>Editing is terminated by pressing ENTER, TAB, UP, DOWN, PGUP, PGDN or any of the function keys (F1 to F12)</u>. Pressing<u>ESCAPE will terminate the bio_edit() and abort editing</u>: '''"str"'''will contain originally passed data when leaving function.
Note that the conditions of termination are changed if the '''“IsTextEditor”''' flag is true (non-zero). See '''“[[Iolib functions 20103 - OOP344BIO Functions oop344 20111#IsTextEditor:|IsTextEditor]]”'''section for detail.
If '''"ReadOnly"''' has a true value (non-zero), then any attempt to change the content of '''"str"''' should end the function and return the key. Note that all other keys should work (Function and Non-ASCII keys). This makes the '''bio_edit()''' funciton "read only", but the user still can scroll the text to left or right and etc....
* '''TAB''':
** if '''IsTextEditor''' is false, TAB will simply terminate the function like a Function key
** if '''IsTextEditor''' is true, TAB will insert '''BIO_TAB_SIZE''' number of spaces into the string.'''BIO_TAB_SIZE''' should be a defined "tab size" value in bio.h. If '''BIO_TAB_SIZE''' spaces cannot be inserted into the string for any reason then the inputted tab should be ignored. (See '''“[[Iolib functions 20103 - OOP344BIO Functions oop344 20111#IsTextEditor:|IsTextEditor Section #2]]”''' for more)* '''ESCAPE''' - Terminates bio_edit() and aborts editing: '''"str"''' will contain originally passed data when leaving function. (See '''“[[Iolib functions 20103 -OOP344BIO Functions oop344 20111#IsTextEditor:|IsTextEditor Section #3]]”''' for exception)
* '''INSERT''' - toggle Insert/Overstrike mode (toggles the value of *insertmode)
**<u>In Insert mode</u>, printable characters are inserted into the string, moving the remainder of the string to the right to make room.

Navigation menu