Introduction to Text System User Interface Layer
Text System User Interface Layer describes the high-level user interface to the Cocoa text system through the
Who Should Read This Document
You should read this document if your application needs to present a user interface to the full capabilities of the text system, that is, if your users need to edit substantial amounts of text.
To understand this material you should have a general understanding of Cocoa programming conventions, and you should have read Cocoa Text Architecture Guide.
Organization of This Document
This document contains the following articles:
“The User-Interface Layer: NSTextView Class” describes the capabilities and features of the NSTextView class, through which most applications interact with the text system.
“Creating an NSTextView Object” explains how to instantiate an
NSTextViewobject using Interface Builder.
“Creating an NSTextView Programmatically” explains how to create an
NSTextViewobject in code and cause it to create its supporting web of text-handling objects.
“Putting an NSTextView Object in an NSScrollView” shows how to programmatically configure an
NSTextViewobject with scroll bars.
“Using Multiple NSTextViews” describes the attributes held in common by multiple text views configured to share a single layout manager.
“Plain and Rich Text Objects” explains the difference between plain text and rich text and lists the RTF control words that any text object recognizes.
“Setting Text Attributes” discusses text attributes and the action methods you can use to control them programmatically.
“Setting Text Margins” describes the values, maintained by various text system objects, that affect the apparent margins surrounding text on a printed page or display.
For more information, refer to the following documents:
Cocoa Text Architecture Guide provides an overview of the Cocoa text system. It also explains how the text system supports entering and modifying text and attributes through user interaction with the user interface layer.
Text System Storage Layer Overview describes the facilities that the Cocoa text system uses to store the text and geometric shape information used for text layout.