Mac Developer Library

Developer

AppKit Framework Reference NSTextLayoutOrientationProvider Protocol Reference

Options
Deployment Target:

On This Page
Language:

NSTextLayoutOrientationProvider

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import AppKit

Objective-C

@import AppKit;

Availability


Available in OS X v10.7 and later.

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.

  • Returns the receiver’s layout orientation. (required)

    Declaration

    Swift

    func layoutOrientation() -> NSTextLayoutOrientation

    Objective-C

    - (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.

    Import Statement

    Objective-C

    @import AppKit;

    Swift

    import AppKit

    Availability

    Available in OS X v10.7 and later.