diff -r 000000000000 -r bde4ae8d615e os/textandloc/textrendering/texthandling/testdata/COMPLEX.PML --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/textandloc/textrendering/texthandling/testdata/COMPLEX.PML Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,48 @@ + +

+Overview +

+The EditableText class hierarchy provides + instantiable classes for editing and storing text. The choice of which + class to use depends on your requirements of text editing. +

+Usage +

+ +Two instantiable editable text classes are supplied: +

+GlobalText +

+RichText +

+and each case, there is a choice of physical implementation: +

Flat storage +

Segemented storage. +

Flat storage is most efficient when there is little text to be stored, or in the case where little or no editing will take place on the stored text. +

Segmented storage is most efficient where large quantities of text are to be stored, or where the text has a large dynamic content. +

The rich text class supports: +

paragraph styles +

character styles +

explicit paragraph & character formatting +

embedded pictures etc... (See the spec). +

In contrast, global text applies a single paragraph/character style to the entire contents of the document. +

Global text is best used for edit boxes, whereas rich text applications include the word processor and agenda entries, to name but two. +

+CEditableText Methods +

+ConstructL Phase2 construction +

+void ConstructL(TDocumentStorage aStorage); +

+All calls to a document constructor must be followed by an explicit call to the ConstructL method. This method completes the 2 phase object construction favoured by Epoc. The parameter aStorage defines which implementation to use. The type TDocumentStorage is defined in EDITTEXT.H as follows: +

+enum TDocumentStorage {EFlat,ESegmented}; +

+This method may leave. A complete example of document construction is provided below: +

+CEditableText* document=new(ELeave) CGlobalText; +

+document->ConstructL(ESegmented); // Leaves if construction fails. +

+A mandatory part of the ConstructL method inserts an end-of-document character into the document. This character is not included in the DocumentLength method.