Mac Developer Library

Developer

Quartz Framework Reference IKFilterBrowserPanel Class Reference

Options
Deployment Target:

On This Page
Language:

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.

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

Inheritance


Import Statement


Swift

import Quartz

Objective-C

@import Quartz;

Availability


Available in OS X v10.5 and later.
  • Returns a view that contains a filter browser.

    Declaration

    Swift

    func filterBrowserViewWithOptions(_ inOptions: [NSObject : AnyObject]!) -> IKFilterBrowserView!

    Objective-C

    - (IKFilterBrowserView *)filterBrowserViewWithOptions:(NSDictionary *)inOptions

    Parameters

    inOptions

    A dictionary of options that describe the configuration to use for the filter browser user interface. For the possible keys you can supply see “Filter Browser Option Keys” and the constant IKUISizeFlavor.

    Return Value

    A filter browser view that is configured as specified.

    Discussion

    Use this method to add a view that contains the filter browser to your custom user interface. To dismiss the filter browser view, invoke the finish method.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

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

    Declaration

    Swift

    func beginWithOptions(_ inOptions: [NSObject : AnyObject]!, modelessDelegate modelessDelegate: AnyObject!, didEndSelector didEndSelector: Selector, contextInfo contextInfo: UnsafeMutablePointer<Void>)

    Objective-C

    - (void)beginWithOptions:(NSDictionary *)inOptions modelessDelegate:(id)modelessDelegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo

    Parameters

    inOptions

    A dictionary of options that describe the configuration to use for the filter browser user interface. For the possible keys you can supply see “Filter Browser Option Keys” and the constant IKUISizeFlavor.

    modelessDelegate

    The object that will invoke the selector didEndSelector when the filter browser session terminates.

    didEndSelector

    The selector to invoke when the filter browser session terminates.

    contextInfo

    Any data that must be passed as an argument to the delegate through didEndSelector after the filter browser session terminates.

    Discussion

    When the filter browser session ends, didEndSelector is invoked on the modeless delegate, passing contextInfo as an argument. The selector didEndSelector must have the following signature:

    - (void)openPanelDidEnd:(NSOpenPanel *)panel returnCode:(int)returnCode contextInfo:(void *)contextInfo

    The returnCode value passed to the selector is set to NSOKButton if the user validates, or to NSCancelButton if the user cancels.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

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

    Declaration

    Swift

    func beginSheetWithOptions(_ inOptions: [NSObject : AnyObject]!, modalForWindow modalForWindow: NSWindow!, modalDelegate modalDelegate: AnyObject!, didEndSelector didEndSelector: Selector, contextInfo contextInfo: UnsafeMutablePointer<Void>)

    Objective-C

    - (void)beginSheetWithOptions:(NSDictionary *)inOptions modalForWindow:(NSWindow *)modalForWindow modalDelegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo

    Parameters

    inOptions

    A dictionary of options that describe the configuration to use for the filter browser user interface. For the possible keys you can supply see “Filter Browser Option Keys” and the constant IKUISizeFlavor.

    modalForWindow

    The parent window for the dialog.

    modalDelegate

    The object that will invoke the selector didEndSelector when the filter browser session terminates.

    didEndSelector

    The selector to invoke when the filter browser session terminates.

    contextInfo

    Any data that must be passed as an argument to the delegate through didEndSelector after the filter browser session terminates.

    Discussion

    When the filter browser session ends, didEndSelector is invoked on the modeless delegate, passing contextInfo as an argument. The selector didEndSelector must have the following signature:

    - (void)openPanelDidEnd:(NSOpenPanel *)panel returnCode:(int)returnCode contextInfo:(void *)contextInfo

    The returnCode value passed to the selector is set to NSOKButton if the user validates, or to NSCancelButton if the user cancels.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

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

    Declaration

    Swift

    func runModalWithOptions(_ inOptions: [NSObject : AnyObject]!) -> Int32

    Objective-C

    - (int)runModalWithOptions:(NSDictionary *)inOptions

    Parameters

    inOptions

    A dictionary of options that describe the configuration to use for the filter browser user interface. For the possible keys you can supply see “Filter Browser Option Keys” and the constant IKUISizeFlavor.

    Return Value

    Either NSOKButton if the user validates, or NSCancelButton if the user cancels.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Closes a filter browser view.

    Declaration

    Swift

    func finish(_ sender: AnyObject!)

    Objective-C

    - (void)finish:(id)sender

    Parameters

    sender

    The object that invokes the action, such as an OK or Cancel button.

    Discussion

    Invoke this action when you want to dismiss the filter browser.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Creates a shared instance of the IKFilterBrowserPanel class.

    Declaration

    Swift

    class func filterBrowserPanelWithStyleMask(_ styleMask: UInt32) -> AnyObject!

    Objective-C

    + (id)filterBrowserPanelWithStyleMask:(unsigned int)styleMask

    Parameters

    styleMask

    A mask that specifies whether to use the default or brushed metal look for the window. You can select or deselect the NSTexturedBackgroundWindowMask style bit.

    Return Value

    The shared instance.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Keys for filter browser options.

    Declaration

    Swift

    let IKFilterBrowserDefaultInputImage: NSString! let IKFilterBrowserExcludeCategories: NSString! let IKFilterBrowserExcludeFilters: NSString! let IKFilterBrowserShowCategories: NSString! let IKFilterBrowserShowPreview: NSString!

    Objective-C

    NSString *const IKFilterBrowserDefaultInputImage; NSString *const IKFilterBrowserExcludeCategories; NSString *const IKFilterBrowserExcludeFilters; NSString *const IKFilterBrowserShowCategories; NSString *const IKFilterBrowserShowPreview;

    Constants

    • IKFilterBrowserDefaultInputImage

      IKFilterBrowserDefaultInputImage

      The key for the default input image. The associated value is the CIImage object to use as the default input image for the filter preview. Setting the image to nil causes Image Kit to use the image supplied by the framework. You can also set the input image and other parameters during the notification IKFilterBrowserWillPreviewFilterNotification.

      Available in OS X v10.5 and later.

    • IKFilterBrowserExcludeCategories

      IKFilterBrowserExcludeCategories

      The key for excluding filter categories. The associated value is an NSArray object that lists the categories that you do not want to display in the filter browser.

      Available in OS X v10.5 and later.

    • IKFilterBrowserExcludeFilters

      IKFilterBrowserExcludeFilters

      The key for excluding filters. The associated value is an NSArray object that lists the filters that you do not want to display in the filter browser.

      Available in OS X v10.5 and later.

    • IKFilterBrowserShowCategories

      IKFilterBrowserShowCategories

      The key for showing categories. The associated value is a BOOL value that determines if the filter browser should show the category list.

      Available in OS X v10.5 and later.

    • IKFilterBrowserShowPreview

      IKFilterBrowserShowPreview

      The associated value is a BOOL value that determines if the filter browser should provide a preview.

      Available in OS X v10.5 and later.