Who Should Read This Document
Organization of This Document
See Also
Text System Storage Layer Overview discusses the facilities that the Cocoa text system uses to store the text and geometric shape information used for text layout.
You should read this document if you need to work directly with the text storage layer. For example, you may need to change the text programmatically in a text storage object or extend its capabilities.
To understand this material you should have a general understanding of Cocoa programming conventions. You should also have read Text System Overview.
This document contains the following articles:
“The Storage Layer: The NSTextStorage Class” provides a general introduction to the capabilities of text storage objects.
“Layout Geometry: The NSTextContainer Class” explains how text containers define the area in which the system lays out text and how they interact with other text system objects.
“Creating Text Storage” explains how you create and set up text storage objects.
“Changing Text Storage” describes the process of editing text in a text storage object programmatically.
“Displaying a Text Container” explains how you can display the text in a text storage object in a text view or other NSView object.
“Calculating Region, Bounding Rectangle, and Inset” discusses how to define a text container’s text layout area.
“Tracking the Size of a Text View” explains how you can set up a text container so that its geometry interacts with that of its associated text view.
“Creating a Subclass of NSTextStorage” discusses the requirements of NSTextStorage subclasses.
For further reading, refer to the following documents:
Attributed Strings Programming Guide provides information about the attributed string objects on which NSTextStorage is built. NSTextStorage is a subclass of NSMutableAttributedString.
Text Layout Programming Guide for Cocoa describes the layout process involving text storage, text container, text view, and layout manager objects.
© 1997, 2005 Apple Computer, Inc. All Rights Reserved. (Last updated: 2005-08-11)