NSTextLayoutOrientationProvider Protocol Reference

Adopted by
Conforms to
Framework
/System/Library/Frameworks/AppKit.framework
Availability
Available in OS X v10.7 and later.
Declared in
NSLayoutManager.h

Overview

This protocol defines the default value for the range of string laid out in the receiver in absence of explicit NSVerticalGlyphFormAttributeName attribute. There are two Application Kit classes implementing this interface: NSTextContainer and NSTextView. The NSTextContainer implementation just returns the value from its text view if non-nil; otherwise, returns NSLayoutOrientationHorizontal. For working with non-NSTextView views, the NSTextContainer implementation can be overridden in order to support the custom layout orientation logic.

Tasks

Getting Layout Orientation

Instance Methods

layoutOrientation

Returns the receiver’s layout orientation. (required)

- (NSTextLayoutOrientation)layoutOrientation
Return Value

The layout orientation of the text.

Discussion

This property defines the default value for the range of string laid out in the receiver in absence of explicit NSVerticalGlyphFormAttributeName attribute.

For example, when NSTextLayoutOrientationVertical, the default value for NSVerticalGlyphFormAttributeName is 1. When rendering into the receiver, the Text System assumes the coordinate system is appropriately rotated. NSTextAttachmentCell determines the image orientation based on the control view's layoutOrientation.

Availability
  • Available in OS X v10.7 and later.
Related Sample Code
Declared In
NSLayoutManager.h