Event Message Constants |
Header: Navigation.h |
Your application can provide an event-handling function to update application windows and handle other events related to your Open and Save dialog boxes. Navigation Services informs you of pertinent events by supplying event message constants to your event-handling function via the param field of a structure of type NavCBRec. These constants are defined in the NavEventCallbackMessages data type. For more information, see Handling Events.
enum { kNavCBEvent = 0, kNavCBCustomize = 1, kNavCBStart = 2, kNavCBTerminate = 3, kNavCBAdjustRect = 4, kNavCBNewLocation = 5, kNavCBShowDesktop = 6, kNavCBSelectEntry = 7, kNavCBPopupMenuSelect = 8, kNavCBAccept = 9, kNavCBCancel = 10, kNavCBAdjustPreview = 11, kNavCBOpenSelection = -2147483648 };
Tells your application that an event has occurred (including an idle event), which provides an opportunity for your application to track controls, update other windows, and so forth. Your application can obtain the event record describing this event from the event field of the structure of type
Tells your application to supply a dialog box customization request. The customRect field of the NavCBRec structure defines a rectangle in the local coordinates of the dialog box; the top-left coordinates define the anchor point for a customization rectangle. If you want to customize the dialog box, your application responds to the kNavCBCustomize message by setting a value in the customRect field that completes the dimensions of the customization rectangle. After your application responds, Navigation Services inspects the customRect field to determine if the requested dimensions result in a dialog box that can fit on the screen. If the dimensions are too large, then Navigation Services responds by setting the rectangle to the largest size that the screen can accommodate. Your application can continue to negotiate by examining the customRect field and requesting a different size until Navigation Services provides an acceptable rectangle value, at which time you should create your custom control or item list. The minimum size for the customization area is 400 pixels wide by 40 pixels high. For more information, see Adding Custom Controls.
Note: Dont add new dialog box items until your application receives the kNavCBStart event message constant.
Tells your application that a dialog box is ready to be displayed. After receiving the kNavCBCustomize event message constant, your event-handling function should wait for the kNavCBStart event message constant to ensure that your application can safely add dialog items. No additional data is provided to your application with this constant. For more information, see Adding Custom Controls.
Tells your application that the dialog box is about to be closed, which means you must remove any user-interface items that were created in response to the kNavCBStart message. No additional data is provided to your application with this constant.
Tells your application that the dialog box has been resized and the customization rectangle has been accordingly resized. Use the customRect field from the structure of type
Tells your application that a new location is being viewed in the dialog box. The param field of the NavCBRec structure contains a pointer to an AEDesc structure of type 'typeFSS' describing the new location. This pointer is valid only during the execution of your event-handling function. For more information on how to parse AEDesc structures, see Obtaining Object Descriptions.
Tells your application that the Open or Save dialog box is showing the desktop view, consisting of the composite of all desktop folders from all mounted volumes. The param field of the NavCBRec structure contains a pointer to an AEDescList structure identifying the desktop location. This pointer is valid only during the execution of your event-handling function. For more information on how to parse AEDesc structures, see Obtaining Object Descriptions.
Tells your application that an entry in the browser list has been selected or deselected by the user. The param field of the NavEventDataInfo structure contains a pointer to an AEDescList record of type 'typeFSS' identifying the current selection. If the user deselects the current selection, the AEDescList record contains an empty reference. This pointer is valid only during the execution of your event-handling function. For more information on how to parse AEDesc structures, see Obtaining Object Descriptions.
Tells your application that a selection was made from the Open dialog boxs Show pop-up menu or Save dialog boxs Format pop-up menu. The param field of the NavCBRec structure contains a pointer to a structure of type
Tells your application that the user has pressed the Accept button.
Tells your application that the user has pressed the Cancel button.
Tells your application that the user has toggled the preview area on or off. The param field of the NavCBRec structure contains a pointer to a Boolean value of true if the preview area is toggled on and false if toggled off. This information is useful if your application creates custom controls in the preview area. For more information, see Drawing Custom Previews.
(Navigation Services 2.0 or later.) Tells your application that the user has opened a file or chosen a file object. After detecting this constant, you can call the function
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)