Click on the following link to download the example: Txtshell.zip
Click: browse to view the example code.
txtshell
is an application that provides a shell for the text example code
to run in. It provides four concrete text example controls, CGlobalControl
, CRichControl
, CStyleControl
and CViewControl
, all derived from the abstract
base class CGraphicExampleControl
. Each of these
controls implements an UpdateModelL()
function that
is called each time the current step in the example is advanced. Each
step modifies the content, formatting, or display of the text in a
different way. For details, see the appropriate control example.
Each of these controls illustrates a different set of operations which can be performed on a text object or a text view.
Note: This example is designed to work properly with Techview and there is no guarantee that it will work with other interfaces.
Rich text control (CRichControl)
Adding and deleting rich text
Applying paragraph formatting to individual paragraphs
Applying character formatting to individual characters
Storing and restoring rich text
Rich text control with style list (CStyleControl)
Illustrates the following:
Creating paragraph styles
Applying paragraph styles to individual paragraphs
Applying specific formatting to styled paragraphs
Applying a style to text with specific formatting
Advanced text view (CViewControl)
illustrates the following text view and layout operations:
Press F1 to get the menu which lists the examples. Select the appropriate example, and then press space to advance through a set of steps that illustrate features of that example.
CTextLayout
CTextView
CPlainText
CRichText
TCursorPosition
TViewYPosQualifier