Using and creating text cursor tools

The Text Editing framework provides a set of classes you use to create cursor tools. Text cursor tools allow end users to operate on text, generally to apply styles, by dragging the cursor over it--similar to making a selection. For example, you could create a cursor tool that applies a bold style to text as the user drags the tool. The user selects the tool from a tool palette or menu and uses the mouse to select a range of text; when the user releases the mouse the selected text is made bold.

After a user chooses a text cursor tool, the view starts an interactor for that tool when the next mouse-down event occurs. When the user releases the mouse, the interactor creates the corresponding selection and issues the appropriate command against that selection.

The default menus provided by the Text Editing framework include a Tool menu with several text cursor tools:



[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker