Protocol

NSColorPickingDefault

The NSColorPickingDefault protocol, together with the NSColorPickingCustom protocol, provides an interface for adding color pickers—custom user interfaces for color selection—to an application’s NSColorPanel instance. The NSColorPickingDefault protocol provides basic behavior for a color picker. The NSColorPickingCustom protocol provides implementation-specific behavior.

Symbols

Creating Color Pickers

init?(pickerMask: Int, colorPanel: NSColorPanel)
Required.

Initializes the receiver with a given color panel and its mode.

Configuring Color Pickers

func setMode(NSColorPanelMode)
Required.

Specifies the receiver’s mode.

func insertNewButtonImage(NSImage, in: NSButtonCell)
Required.

Sets the image of a given button cell.

func provideNewButtonImage()
Required.

Provides the image of the button used to select the receiver in the color panel.

func minContentSize()
Required.

Indicates the receiver’s minimum content size.

func buttonToolTip()
Required.

Provides the toolbar button help tag.

Handling Events

func alphaControlAddedOrRemoved(Any?)
Required.

Sent when the color panel's opacity controls have been hidden or displayed.

func viewSizeChanged(Any?)
Required.

Tells the recever when the color panel's view size changes in a way that might affect the color picker.

Managing Color Lists

func attachColorList(NSColorList)
Required.

Tells the receiver to attach the given color list, if it isn’t already displaying the list.

func detachColorList(NSColorList)
Required.

Tells the receiver to detach the given color list, unless the receiver isn’t displaying the list.

Relationships

Adopted By