The simplest way to do this is to use the RunDocument AIX" utility with a stationery class, either TTextStationery or TEmbedderTextStationery. TTextStationery is a convenience class, provided by the Text Editing framework, that builds a document based on TTextModel and TTextPresenterState. TEmbedderTextStationery is a convenience class that builds an embeddable text document based on TEmbedderTextModel.
NOTE When you create your own Text Editing framework classes, you can create a similar stationery class by deriving from TCompoundDocumentStationery or from one of the other stationery classes provided by the Desktop frameworks.
TTextStationery and TEmbedderTextStationery access the shared library EditableTextLib. For example, to create a default text component based on TTextStationery named TextDoc, execute the following command from the AIX console:
To create an embeddable text component, execute this command from the AIX console:RunDocument -c -o TTextStationery EditableTextLib TextDoc
To create a text component without using RunDocument, instantiate the model and presenter state and use them to create a compound document. Your application will also need to create a window and provide an event handling loop.RunDocument -c -o TEmbedderTextStationery EditableTextLib TextDoc
TTextModel* model = new TTextModel;
TTextPresenterState* presenterState = new TTextPresenterState;
TCompoundDocument textDocument( model, presenterState );
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.