AppKit Enumerations

No overview available.

Symbols

Enumerations

Additional NSModalResponse Values

These constants specify values that can be returned by endSheet(_:) and by the completion handlers for beginSheet(_:completionHandler:) and beginCriticalSheet(_:completionHandler:).

Additional Writing Directions

Additional values to be added to leftToRight or rightToLeft, when used with NSWritingDirectionAttributeName.

Alert Panel Return Values

These constants define values returned by the NSRunAlertPanel function and by the NSApplication method runModalSession(_:) when the modal session is run with an NSPanel provided by the NSGetAlertPanel function.

AnonymousAnonymousAnonymousAnonymousAnonymousAnonymousAnonymousAnonymousAnonymous
Attachment Character

This character is used to denote an attachment.

Button Return Values

An alert’s return values for buttons are position dependent. The following constants describe the return values for the first three buttons on an alert (assuming a language that reads left to right). Note that these constants constitute additional NSModalResponse values used by runModal() and beginSheetModal(for:completionHandler:).

Button tags

Button tags that refer to items on the panel.

Display Device Matching

The following constant is used by NSImageRep to denote an attribute whose value changes to match the display device.

Drop on Item Index

This constant defines an index that allows you to drop an item directly on a target.

Explicit Window Depth Limits

These constants define explicit window depths that can be used with depthLimit.

Function-Key Unicodes

These constants represent Unicode characters (0xF700–0xF8FF) that are reserved for function keys on the keyboard. Combined in NSStrings, they represent values that can be used with the characters and charactersIgnoringModifiers properties and may be used in some parameters in the NSEvent method keyEvent(with:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:).

Glyph Attributes

These glyph attribute constants are used only inside the glyph generation machinery, but they must be shared between components.

Item Priority

When a toolbar does not have enough space to fit all its items, it must push some items into the overflow menu. These values allow you to suggest a priority for a toolbar item.

Layout Options

These constants describe layout options returned as a bit mask by the layoutOptions() method.

Managing Scaling Factors

Manages scaling factors.

Movement Codes

These constants specify the reason for a change of editing focus among text fields, in essence answering the question “why am I leaving the field?”

NSAccessibilityOrientation

Values that indicate the orientation of elements, such as scroll bars and split views. Use these values with an accessibility element’s accessibilityOrientation property.

NSAccessibilityPriorityLevel

A data type for notification priority levels.

NSAccessibilityRulerMarkerType

Values that indicate the marker type of an element. Use these values with an accessibility element’s accessibilityRulerMarkerType property.

NSAccessibilitySortDirection

Values that indicate the sort direction of a column (used with the accessibilitySortDirection property).

NSAccessibilityUnits

Values that indicate the unit values of a ruler or layout area (used with the accessibilityHorizontalUnits, accessibilityVerticalUnits, and accessibilityUnits properties).

NSAlertStyle

The NSAlert class defines the alert styles used by the alertStyle property.

NSAnimationBlockingMode

These constants indicate the blocking mode of an NSAnimation object when it is running.

NSAnimationCurve

These constants describe the curve of an animation—that is, the relative speed of an animation from start to finish.

NSApplicationActivationPolicy

The following activation policies control whether and how an application may be activated. They are used by activationPolicy.

NSApplicationDelegateReply

These constants indicate whether or not a copy or print operation was successful, was cancelled, or failed. These constants are used by the reply(toOpenOrPrint:) method.

NSApplicationPrintReply

These constants are returned by the delegate method application(_:printFiles:withSettings:showPrintPanels:).

NSApplicationTerminateReply

These constants define whether an app should terminate and are used by the delegate method applicationShouldTerminate(_:).

NSBackgroundStyle

Background styles used with the backgroundStyle and interiorBackgroundStyle properties.

NSBackingStoreType

These constants specify how the drawing done in a window is buffered by the window device.

NSBezelStyle

Bezel styles used by the bezelStyle property.

NSBezierPathElement

Basic path element commands.

NSBitmapImageFileType

Constants for specifying the bitmap file types.

NSBorderType

These constants specify the type of a view’s border.

NSBoxType

These constants and data type identifies box types, which, in conjunction with a box's border type, define the appearance of the box.

NSBrowserColumnResizingType

Types of browser column resizing.

NSBrowserDropOperation

The type used to specify the drop type of a drag-and-drop operation. See browser(_:validateDrop:proposedRow:column:dropOperation:) for more information.

NSButtonType

Button types that can be specified using setButtonType(_:).

NSCellAttribute

Constants for specifying how a button behaves when pressed and how it displays its state.

NSCellImagePosition

Constants for specifying the position of a button’s image relative to its title.

NSCellType

Constants for specifying how a cell represents its data (as text or as an image).

NSCharacterCollection

The following values specify the mapping of character identifiers to glyphs, and are returned by characterCollection.

NSCollectionElementCategory

Constants specifying the type of element in the collection view.

NSCollectionUpdateAction

Constants indicating the type of action being performed on an item.

NSCollectionViewDropOperation

These constants specify if acceptance of a drop should be at the item it is dropped on or before the item. These constants are used by the collectionView(_:acceptDrop:index:dropOperation:) and collectionView(_:validateDrop:proposedIndex:dropOperation:) methods in NSCollectionViewDelegate

NSCollectionViewItemHighlightState

Constants indicating the type of highlight applied to an item.

NSCollectionViewScrollDirection

Constants indicating the scrolling direction for the layout.

NSColorPanelMode

A type defined for the enum constants specifying color panel modes.

NSColorRenderingIntent

These constants specify how Cocoa should handle colors that are not located within the destination color space of a graphics context. These constants are used by the property colorRenderingIntent.

NSColorSpaceModel

The type of the color-space mode constants listed in Color Space Models.

NSCompositingOperation

These constants specify compositing operators described in terms of having source and destination images, each having an opaque and transparent region. The destination image after the operation is defined in terms of the source and destination before images.

NSControlCharacterAction

Describes actions control characters can cause.

NSControlSize

Constants for specifying a cell’s size.

NSControlTint

Constants for specifying a cell’s tint.

NSCorrectionIndicatorType

These constants allow an application to specify the correction indicator type displayed.

NSDatePickerMode

Constants that define whether the picker provides a single date, or a range of dates.

NSDatePickerStyle

Constants that define the visual appearance of the date picker cell.

NSDisplayGamut
NSDocumentChangeType

Change counts indicate a document’s edit status. These constants indicate how a document should operate on its change count and are passed to the updateChangeCount(_:) method.

NSDraggingContext

These parameters specify whether a drag terminates within or outside the application.

NSDraggingFormation

These constants control the visual format of multiple items being dragged.

NSDrawerState

These constants specify the possible states of a drawer.

NSEventGestureAxis

These constants specify the gesture tracking axis.

NSEventSubtype
NSEventType

Constants that represent various kinds of events.

NSFindPanelAction

These constants define the tags for performFindPanelAction(_:).

NSFindPanelSubstringMatchType

The type of substring matching used by the Find panel.

NSFontAction

These constants specify what action modifyFont(_:) will take.

NSFontFamilyClassMask

This constant is used to access NSFontFamilyClass values in the upper four bits of NSFontSymbolicTraits.

NSFontRenderingMode

These constants specify the font rendering mode.

NSGestureRecognizerState

Constants indicating the current state of the gesture recognizer.

NSGlyphInscription

These constants specify how a glyph is laid out relative to the previous glyph. The glyph inscription constants are possible values for the glyph attribute NSGlyphAttributeInscribe. Glyph inscriptions are set during glyph generation.

Deprecated
NSGlyphProperty

Describes glyph properties.

NSGradientType

Specify the gradients used by the gradientType property.

Deprecated
NSGridCellPlacementNSGridRowAlignment
NSHapticFeedbackPattern

A pattern of haptic feedback to be provided to the user.

NSHapticFeedbackPerformanceTime

A time at which to provide haptic feedback to the user.

NSImageAlignment

These constants allow you to specify the location of the image in the frame and is used by imageAlignment.

NSImageCacheMode

These constants specify the caching policy on a per NSImage basis. The caching policy is set using the cacheMode property.

NSImageFrameStyle

These constants allow you to specify the kind of frame bordering the image and is used by imageFrameStyle. Note that some of these constants are stylistically obsolete and should be considered deprecated.

NSImageInterpolation

These interpolations are used by imageInterpolation property.

NSImageLayoutDirection
NSImageLoadStatus

These constants are status values passed to the incremental loading delegate method image(_:didLoadRepresentation:with:).

NSImageRepLoadStatus

Constants representing the various status values returned by incrementalLoad(from:complete:).

NSImageResizingMode
NSImageScaling

Constants for specifying a cell’s image scaling behavior.

NSLayoutAttribute

The part of the object’s visual representation that should be used to get the value for the constraint.

NSLayoutConstraintOrientation

The layout constraint orientation, either horizontal or vertical, that the constraint uses to enforce layout between objects.

NSLayoutRelation

The relation between the first attribute and the modified second attribute in a constraint.

NSLevelIndicatorStyle

Constants used to specify a level indicator's appearance.

NSLineBreakMode

These constants specify what happens when a line is too long for its container.

NSLineCapStyle

These constants specify the shape of endpoints for an open path when stroked.

NSLineJoinStyle

These constants specify the shape of the joints between connected segments of a stroked path.

NSLineMovementDirection

Line movement is the direction in which lines move. See Text System Storage Layer Overview.

NSLineSweepDirection

These constants describe the progression of text on a page. The typesetter decides which way text is supposed to flow and passes these values as arguments to the text container, which uses them to calculate the next line rectangle.

NSMatrixMode

These constants determine how NSCell objects behave when an NSMatrix object is tracking the mouse.

NSMultibyteGlyphPacking

A constant for glyph packing.

NSOpenGLContextParameter

The following attribute names are used by setValues(_:for:) and getValues(_:for:):

NSPageControllerTransitionStyle

These constants control the transition style of the page controller.

NSPaperOrientation
NSPathStyle

NSPathStyle constants represent the different visual and behavioral styles an NSPathControl or NSPathCell object can have.

NSPointingDeviceType

The pointing-device types for tablet-proximity events or mouse events with a proximity event subtype.

NSPopUpArrowPosition

These constants are defined for use with the arrowPosition property.

NSPopoverAppearance

The set of predefined appearances for a popover.

Deprecated
NSPopoverBehavior

The appearance and disappearance behavior of a popover.

NSPressureBehavior

These constants describe the behavior and progression of a pressure gesture.

NSPrintRenderingQuality

These constants specify the print quality in use.

NSPrinterTableStatus

These constants describe the state of a printer information table stored by an NSPrinter object.

NSPrintingOrientation

These constants specify page orientations used by the property orientation.

NSPrintingPageOrder

These constants specify the page order.

NSPrintingPaginationMode

These constants specify the different ways in which an image is divided into pages. They’re used by horizontalPagination, and verticalPagination.

NSProgressIndicatorStyle

Specify the progress indicator’s style used by style.

NSProgressIndicatorThickness

Specify the height of a progress indicator.

NSRequestUserAttentionType

These constants specify the level of severity of a user attention request and are used by cancelUserAttentionRequest(_:) and requestUserAttention(_:).

NSRuleEditorNestingMode

Specifies a type for nesting modes.

NSRuleEditorRowType

Specifies a type for row types.

NSRulerOrientation

These constants are defined to specify a ruler’s orientation and are used by orientation.

NSSaveOperationType

A save operation type specifies the type of document save operation to perform. These values are used with method parameters of type NSSaveOperationType. Depending on the method, the save operation type can affect the title of the Save dialog and can affect which files are displayed in the dialog.

NSScrollArrowPosition

These constants specify where the scroller’s buttons appear and are used by the arrowsPosition property.

NSScrollElasticity

These constants determine the elasticity behavior for an axis of the scrollview.

NSScrollViewFindBarPosition

These constants define the position of the find bar in relation to the scroll view.

NSScrollerArrow

These constants describe the two scroller buttons and are used by drawArrow(_:highlight:).

NSScrollerKnobStyle

Specify different knob styles.

NSScrollerPart

These constants specify the different parts of the scroller:

NSScrollerStyle

Constants to specify the scroller style.

NSScrubberAlignment

Specifies your preferred alignment of items within the scrubber following a user’s scrolling or paging interaction.

NSScrubberMode

Specifies the scrolling behavior for a scrubber.

NSSegmentStyle

The following constants specify the visual style used to display the segmented control. They are used by segmentStyle.

NSSegmentSwitchTracking

The following constants specify the type of tracking behavior a segmented control exhibits. They are used by trackingMode.

NSSelectionAffinity

These constants specify the preferred direction of selection. They’re used by selectionAffinity and setSelectedRange(_:affinity:stillSelecting:).

NSSelectionDirection

These constants specify the direction a window is currently using to change the key view. They’re used by keyViewSelectionDirection.

NSSelectionGranularity

These constants specify how much the text view extends the selection when the user drags the mouse. They’re used by selectionGranularity, and selectionRange(forProposedRange:granularity:):

NSSharingContentScope

The sharing scope constants specify the nature of the things you are sharing.

NSSliderType

The types of sliders, used by sliderType.

NSSpeechBoundary

These constants are used to indicate where speech should be stopped and paused. See pauseSpeaking(at:) and stopSpeaking(at:).

NSSpellingStateAttributeName Flags

These constants control the display of the spelling and grammar indicators on text, highlighting portions of the text that are flagged for spelling or grammar issues. These regions are denoted by a temporary attribute on the layout manager, using the NSSpellingStateAttributeName key.

NSSplitViewDividerStyle

These constants specify the possible divider styles used by NSSplitView and NSSplitView.

NSSplitViewItemBehaviorNSSplitViewItemCollapseBehavior
NSSpringLoadingHighlight

These constants indicate a highlighting style to be displayed by your app’s user interface during a spring-loading operation. One of these constant values will be provided by the springLoadingHighlight method.

NSStackViewDistribution
NSStackViewGravity

The various gravity areas available in a stack view.

NSTIFFCompression

Constants representing the supported TIFF data-compression schemes.

NSTabPosition
NSTabState

These constants describe the current display state of a tab:

NSTabViewBorderType
NSTabViewControllerTabStyle

Tab control style options for a tab view controller.

NSTabViewType

These constants specify the tab view’s type as used by the tabViewType property.

NSTableRowActionEdge

These constants define table row edges on which row actions are attached. They are used by the tableView:rowActionsForRow:edge: delegate method.

NSTableViewColumnAutoresizingStyle

The following constants specify the autoresizing styles. These constants are used by the columnAutoresizingStyle property.

NSTableViewDraggingDestinationFeedbackStyle

These constants specify the drag styles displayed by the table view. They’re used by draggingDestinationFeedbackStyle.

NSTableViewDropOperation

NSTableView defines these constants to specify drop operations.

NSTableViewRowActionStyle

Constants that help define the appearance and behavior of action buttons.

NSTableViewRowSizeStyle

The row size style constants define the size of the rows in the table view. They are used by the effectiveRowSizeStyle and rowSizeStyle properties. You can also query the row size in the NSTableCellView class’ property rowSizeStyle.

NSTableViewSelectionHighlightStyle

The following constants specify the selection highlight styles. These constants are used by the selectionHighlightStyle property.

NSTextAlignment

These constants specify text alignment.

NSTextBlockDimension

The following constants specify values used by the methods setValue(_:type:for:), value(for:), and valueType(for:) to specify text block dimensions.

NSTextBlockLayer

The following constants specify values used by the properties and methods contentWidthValueType, setWidth(_:type:for:edge:), setWidth(_:type:for:), width(for:edge:), and widthValueType(for:edge:) to specify text block layer values.

NSTextBlockValueType

The following constants specify values used by the methods setValue(_:type:for:) and valueType(for:) to specify text block value types.

NSTextBlockVerticalAlignment

The following constants specify values used by the property verticalAlignment to specify vertical alignment.

NSTextFieldBezelStyle

Specify the bezel style of the text field cell.

NSTextFinderAction

These constants specify the user interface item tags that correspond find action. These constants are passed to the performTextFinderAction(_:) method, the responder will call the appropriate method for the tag. That method will, in turn, determine the desired action and invoke the appropriate method in the NSTextFinder object’s NSTextFinderClient protocol.

NSTextFinderMatchingType

The following constants indicate the type of search anchor an action should perform.

NSTextLayoutOrientation

Describes the text layout orientation.

NSTextTabType

These constants describe the various type of tab stop.

NSTextTableLayoutAlgorithm

These constants, specifying the type of text table layout algorithm, are used with layoutAlgorithm.

NSTickMarkPosition

Specifies where the tick marks of an NSSliderCell object appear.

NSTitlePosition

Specify the location of a box’s title with respect to its border.

NSTokenStyle

The NSTokenStyle constants define how tokens are displayed and editable in the NSTokenFieldCell. These values are used by tokenStyle and the delegate method tokenFieldCell(_:styleForRepresentedObject:).

NSToolbarDisplayMode

These constants specify toolbar display modes and are used by the displayMode property.

NSToolbarSizeMode

These constants specify toolbar display modes and are used by the sizeMode property.

NSTouchType
NSTypesetterBehavior

These constants define the behavior of NSLayoutManager and NSTypesetter when laying out lines. They are used by typesetterBehavior to control the compatibility level of the typesetter.

NSUnderlineStyle

Constants for specifying both the NSUnderlineStyleAttributeName and NSStrikethroughStyleAttributeName attributes of an attributed string.

NSUpdateWindowsRunLoopOrdering

This constant is used by the NSRunLoop method perform(_:target:argument:order:modes:).

NSUsableScrollerParts

These constants specify which parts of the scroller are visible.

NSUserInterfaceLayoutDirection

Specifies the directional flow of the user interface. These constants are returned by userInterfaceLayoutDirection.

NSUserInterfaceLayoutOrientation

The two stack view layout directions and, for clipping resistance and hugging priority, the two user interface axes.

NSViewLayerContentsPlacement

These constants specify the location of the layer content when the content is not re-rendered in response to view resizing. For more information, see the layerContentsPlacement property.

NSViewLayerContentsRedrawPolicy

Constants that specify how layer resizing is handled when a view is layer-backed or layer-hosting. For more information, see the layerContentsRedrawPolicy property.

NSVisualEffectBlendingMode

Constants to specify the source of content for blending that the visual effect view uses.

NSVisualEffectMaterial

Constants to specify the material the visual effect view uses.

NSVisualEffectState

Constants to specify how the material appearance should reflect window activity state.

NSWindingRule

These constants are used to specify the winding rule a Bezier path should use.

NSWindowAnimationBehavior

These constants control the automatic window animation behavior used when the orderFront(_:) or orderOut(_:) methods are called.

NSWindowBackingLocation

The following constants and the related data type represent a window’s possible backing locations.

NSWindowButton

These constants provide a way to access standard title bar buttons:

NSWindowOrderingMode

These constants let you specify how a window is ordered relative to another window. For more information, see order(_:relativeTo:).

NSWindowSharingType

The following constants and the related data type represent the access levels other processes can have to a window’s content.

NSWindowTabbingMode
NSWindowTitleVisibility

Specifies the appearance of the window’s title bar area.

NSWindowUserTabbingPreference
NSWritingDirection

These constants specify the writing directions:

NSWritingDirectionFormatType

Options for specifying writing direction used with NSWritingDirectionAttributeName.

OpenGL Profiles

Defines constants that specify the functionality provided by the renderer.

Reserved Glyph Codes

These constants define reserved glyph codes.

Tags of Views in the FontPanel
Typeface Information

Typeface information is specified by the lower 16 bits of NSFontSymbolicTraits using the following constants.