Changes

Jump to: navigation, search

OOP344 Assignment Two

10 bytes added, 20:22, 8 December 2009
IO_TextEdit
Inherit IO_Field and IO_Frame into a new class called IO_TextEdit. (Read: Practical Programming Techniques Using C++, pages 94 to 96, Multiple Inheritance topic)
IO_TextEdit, uses the io_edit() function of ciol library if the having its isTextEditor flag set to true(1). IO_TextEdit calls the io_edit function repeatedly to edit series of strings that is created dynamically by the IO_TextEdit. If an initial initially a newline -separated ('\n') separated string is provided, IO_TextEdit will split the string into several strings and copy them into dynamically allocated series of strings.
IO_TextEdit will do the edit in a framed multiline text field. Editing begins with the cursor at the top left of the field or from the position the editing was terminated beforelast time.
Each line can be edited using the io_edit. If during the process of editing the string is shifted, make sure all lines are shifted together. If in overstrike mode hitting the enter key goes to next line. Otherwise (in insert mode) it should insert a new line after the current line and if there is any data after the current position, the data should be cut, and pasted to the newly created line. The cursor should stand at the beginning of the new line.

Navigation menu