Class

IKFilterBrowserPanel

The IKFilterBrowserPanel class provides a user interface that allows users to browse Core Image filters (CIFilter), to preview a filter, and to get additional information about the filter, such as its description.

Declaration

class IKFilterBrowserPanel : NSPanel

Overview

An IKFilterBrowserPanel object can be displayed as:

  • a separate panel, that is, a utility window that floats on top of document windows

  • a modal dialog

  • a sheet, that is, a dialog that is attached to its parent window and must be dismissed by the user

  • a view that an application can insert into a custom user interface

An IKFilterBrowserPanel object can be configured through a style mask to use either the default or brushed metal look for windows. The size and number of visible controls are specified through an options dictionary. An IKFilterBrowserPanel object communicates selection changes through notifications.

The IKFilterBrowserPanel class allows the user to create filter collections that are stored with the filterCollections key in the com.apple.CoreImageKit.plist property list located in ~/Library/Preferences/.

Topics

Getting a Filter Name

func filterName() -> String!

Returns the name of the filter that is currently selected in the filter browser.

Displaying and Running the Panel

func begin(options: [AnyHashable : Any]!, modelessDelegate: Any!, didEnd: Selector!, contextInfo: UnsafeMutableRawPointer!)

Displays the filter browser in a new utility window, unless the filter browser is already open.

func beginSheet(options: [AnyHashable : Any]!, modalFor: NSWindow!, modalDelegate: Any!, didEnd: Selector!, contextInfo: UnsafeMutableRawPointer!)

Displays the filter browser in a sheet—that is, a dialog that is attached to its parent window and must be dismissed by the user.

func runModal(options: [AnyHashable : Any]!) -> Int32

Displays the filter browser in a modal dialog that must be dismissed by the user but that is not attached to a window.

func finish(Any!)

Closes a filter browser view.

Creating a Filter Browser Panel

class func filterBrowserPanel(withStyleMask: UInt32) -> Any!

Creates a shared instance of the IKFilterBrowserPanel class.

Constants

Filter Browser Option Keys

Keys for filter browser options.

Notifications

static let IKFilterBrowserWillPreviewFilter: NSNotification.Name

Posted before showing a filter preview, allowing an application to set the parameters of a filter.

static let IKFilterBrowserFilterSelected: NSNotification.Name

Posted when the user clicks a filter name in the filter browser.

static let IKFilterBrowserFilterDoubleClick: NSNotification.Name

Posted when the user double-clicks a filter in the filter browser.