Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Editing

When a user program edits data, it must change the document content, and change the view correspondingly.

The text model requires the following sequence of operations for any kind of edit:

It is the application's responsibility to identify the command, change the content, and specify the kind of updating needed in the view.

The application should choose the function used to notify the view about the type of content update. After a major change (such as loading the document), the application should ask the view to reformat and redraw the entire format band. But this is overkill for most purposes: after a single character has been inserted, for instance, only a limited amount of reformatting may be necessary, usually confined to the remainder of the line in which the character was inserted. The general rule is that the application should choose the lightest-weight function that is guaranteed to do the necessary reformatting. This is what makes text views efficient.

See How to handle changes to the text view.