Mac Developer Library

Developer

DRSetupPanel Class Reference

Options
Deployment Target:

On This Page
Language:

DRSetupPanel

This class is the base class for setup panels in the DiscRecordingUI framework. It provides a base framework for handling device selection, media ejection and confirming or cancelling the panel.

Import Statement


import DiscRecordingUI @import DiscRecordingUI;

Availability


Available in OS X v10.2 and later.
  • Presents a setup panel as a sheet.

    Declaration

    Swift

    func beginSetupSheetForWindow(_ owner: NSWindow!, modalDelegate modalDelegate: AnyObject!, didEndSelector didEndSelector: Selector, contextInfo contextInfo: UnsafeMutablePointer<Void>)

    Objective-C

    - (void)beginSetupSheetForWindow:(NSWindow *)owner modalDelegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo

    Parameters

    owner

    The window the sheet will be attached to. If owner is not nil, the setup panel slides down as a sheet running as a document modal window. If owner is nil, this is an error.

    modalDelegate

    The modal delegate. The object that implements the didEndSelector.

    didEndSelector

    Selector to invoke when the sheet ends. This selector is optional. If implemented by the modal delegate, this method is invoked after the modal session has ended, but before dismissing the same panel. didEndSelector may dismiss the save panel itself; otherwise it will be dismissed on return from the method. didEndSelector should have the following signature: <br/>

    - (void)setupPanelDidEnd:(DRSetupPanel*)panel returnCode:(int)returnCode contextInfo:(void*)contextInfo;

    <br/>

    contextInfo

    Context information to be passed when the selector named by didEndSelector is invoked.

    Import Statement

    import DiscRecordingUI

    Availability

    Available in OS X v10.2 and later.

  • Invoked when the user clicks the panel's cancel button.

    Declaration

    Swift

    @IBAction func cancel(_ sender: AnyObject!)

    Objective-C

    - (IBAction)cancel:(id)sender

    Parameters

    sender

    The object that invoked this method.

    Import Statement

    import DiscRecordingUI

    Availability

    Available in OS X v10.2 and later.

  • Invoked when the user clicks the panel's close button.

    Declaration

    Swift

    @IBAction func close(_ sender: AnyObject!)

    Objective-C

    - (IBAction)close:(id)sender

    Parameters

    sender

    The object that invoked this method.

    Import Statement

    import DiscRecordingUI

    Availability

    Available in OS X v10.2 and later.

  • Invoked when the user changes the device selected in the device popup.

    Declaration

    Swift

    func deviceSelectionChanged(_ device: DRDevice!)

    Objective-C

    - (void)deviceSelectionChanged:(DRDevice *)device

    Parameters

    device

    The newly selected device, or nil.

    Discussion

    If the device currently selected is disconnected from the machine, the device popup will remove the device from itself and select a new device. This will act as if the user changed the device selected. Because of this, device may be nil if no eligible devices are currently connected to the machine.

    Import Statement

    import DiscRecordingUI

    Availability

    Available in OS X v10.2 and later.

  • Invoked when the user clicks the panel's eject button.

    Declaration

    Swift

    @IBAction func eject(_ sender: AnyObject!)

    Objective-C

    - (IBAction)eject:(id)sender

    Parameters

    sender

    The object that invoked this method.

    Import Statement

    import DiscRecordingUI

    Availability

    Available in OS X v10.2 and later.

  • Initializes the receiver to use the panel from the nibName nib file.

    Declaration

    Swift

    init!(nibName nibName: String!)

    Objective-C

    - (id)initWithNibName:(NSString *)nibName

    Parameters

    nibName

    Nib filename.

    Return Value

    The receiver.

    Import Statement

    import DiscRecordingUI

    Availability

    Available in OS X v10.2 and later.

  • Invoked when the media state of the currently selected device changes. This can include media being ejected, inserted, being used by another application, etc.

    Declaration

    Swift

    func mediaStateChanged(_ status: [NSObject : AnyObject]!) -> Bool

    Objective-C

    - (BOOL)mediaStateChanged:(NSDictionary *)status

    Parameters

    status

    The new device status dictionary.

    Return Value

    YES if the inserted media is valid for use, NO otherwise.

    Import Statement

    import DiscRecordingUI

    Availability

    Available in OS X v10.2 and later.

  • Invoked when the user clicks the panel's default button.

    Declaration

    Swift

    @IBAction func ok(_ sender: AnyObject!)

    Objective-C

    - (IBAction)ok:(id)sender

    Parameters

    sender

    The object that invoked this method.

    Import Statement

    import DiscRecordingUI

    Availability

    Available in OS X v10.2 and later.

  • Invoked when the user clicks the panel's open button.

    Declaration

    Swift

    @IBAction func open(_ sender: AnyObject!)

    Objective-C

    - (IBAction)open:(id)sender

    Parameters

    sender

    The object that invoked this method.

    Import Statement

    import DiscRecordingUI

    Availability

    Available in OS X v10.2 and later.

  • Displays the receiver and begins its event loop.

    Declaration

    Swift

    func runSetupPanel() -> Int

    Objective-C

    - (NSInteger)runSetupPanel

    Return Value

    Returns NSOKButton in NSPanel Class Reference (if the user clicks the default button) or NSCancelButton in NSPanel Class Reference (if the user clicks the Cancel button).

    Discussion

    Invokes NSApplication's runModalForWindow: in NSApplication Class Reference method with self as the argument.

    Import Statement

    import DiscRecordingUI

    Availability

    Available in OS X v10.2 and later.

  • This method is called immediately before panel is displayed on the screen. Any setup to be done in preparation for display should be done here.

    Declaration

    Swift

    func setupForDisplay()

    Objective-C

    - (void)setupForDisplay

    Import Statement

    import DiscRecordingUI

    Availability

    Available in OS X v10.2 and later.