[TOC] [Prev] [Next] [Bottom]


NSTextTab

Inherits From:
NSObject

Conforms To:
NSCopying
NSObject (NSObject)

Declared In:
AppKit/NSParagraphStyle.h

Class Description

An NSTextTab represents a tab in an NSParagraphStyle object, storing an alignment type and location. NSTextTabs are most frequently used with the Application Kit's text system and with NSRulerView and NSRulerMarker objects. See the appropriate class specifications for more information on these uses.

The text system supports four alignment types: left, center, right, and decimal (based on the decimal separator character of the locale in effect). These alignment types are absolute, not based on the line sweep direction of text. For example, tabbed text is always positioned to the left of a right-aligned tab, whether the line sweep direction is left-to-right or right-to-left. A tab's location, on the other hand, is relative to the back margin. A tab set at 1.5", for example, is at 1.5" from the right in right-to-left text.


Adopted Protocols

NSCopying
- copyWithZone:

Method Types

Creating an NSTextTab
- initWithType:location:
Getting tab stop information
- location
- tabStopType

Instance Methods

initWithType:location:

- (id)initWithType:(NSTextTabType)type location:(float)location

Initializes a newly allocated NSTextTab with an alignment of type at location on the paragraph. The location is relative to the back margin, based on the line sweep direction of the paragraph. type can be any one of:

NSLeftTabStopType NSRightTabStopType
NSCenterTabStopType NSDecimalTabStopType


location

- (float)location

Returns the receiver's ruler location relative to the back margin.


tabStopType

- (NSTextTabType)tabStopType

Returns the receiver's tab stop type. The possible values are listed in the initWithType:location: method description.



[TOC] [Prev] [Next] [Bottom]

Copyright © 1997, Apple Computer, Inc. All rights reserved.