|
Version: 1.0 Posted: 2003-01-14 Build Requirements: N/A Runtime Requirements: Mac OS X Mac OS X, Project Builder 2.0 or later (project file can be downgraded) Download Sample (LayoutManagerDemo.zip, 30.8K) |
||||
DescriptionThis application demonstrates interrogating the layout manager for information about text layout, and the use of temporary attributes to color text. Specifically, we provide rollover coloring of text--one color for the line, another for the word, and a third for the character under the mouse. A subclass of NSTextView is used, but solely for the purpose of obtaining mouse events. The interesting portion of the code involves the conversion of mouse coordinates to a particular glyph and character index, then determining the corresponding line and word, and finally using temporary attributes for coloring. Requirements: Mac OS X, Project Builder 2.0 or later (project file can be downgraded) Keywords: NSLayoutManager cocoa text nslayoutmanager Document Revision History
|
|