|
Mac OS 9
|
Navigation Services Interfaces. More...
#include <MacTypes.h>#include <AppleEvents.h>#include <Translation.h>#include <MacWindows.h>#include <CodeFragments.h>#include <MacErrors.h>#include <CFArray.h>#include <CFString.h>Go to the source code of this file.
Data Structures | |
| struct | NavFileOrFolderInfo |
| union | NavEventDataInfo |
| struct | NavEventData |
| struct | NavCBRec |
| struct | NavMenuItemSpec |
| struct | NavTypeList |
| struct | NavDialogOptions |
| struct | NavReplyRecord |
| struct | NavDialogCreationOptions |
Macros | |
| #define | NewNavEventUPP(userRoutine) |
| #define | NewNavPreviewUPP(userRoutine) |
| #define | NewNavObjectFilterUPP(userRoutine) |
| #define | DisposeNavEventUPP(userUPP) DisposeRoutineDescriptor(userUPP) |
| #define | DisposeNavPreviewUPP(userUPP) DisposeRoutineDescriptor(userUPP) |
| #define | DisposeNavObjectFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP) |
| #define | InvokeNavEventUPP(callBackSelector, callBackParms, callBackUD, userUPP) |
| #define | InvokeNavPreviewUPP(callBackParms, callBackUD, userUPP) |
| #define | InvokeNavObjectFilterUPP(theItem, info, callBackUD, filterMode, userUPP) |
| #define | NewNavEventProc(userRoutine) NewNavEventUPP(userRoutine) |
| #define | NewNavPreviewProc(userRoutine) NewNavPreviewUPP(userRoutine) |
| #define | NewNavObjectFilterProc(userRoutine) NewNavObjectFilterUPP(userRoutine) |
| #define | CallNavEventProc(userRoutine, callBackSelector, callBackParms, callBackUD) InvokeNavEventUPP(callBackSelector, callBackParms, callBackUD, userRoutine) |
| #define | CallNavPreviewProc(userRoutine, callBackParms, callBackUD) InvokeNavPreviewUPP(callBackParms, callBackUD, userRoutine) |
| #define | CallNavObjectFilterProc(userRoutine, theItem, info, callBackUD, filterMode) InvokeNavObjectFilterUPP(theItem, info, callBackUD, filterMode, userRoutine) |
Typedefs | |
| typedef UInt32 | NavAskSaveChangesAction |
| typedef UInt32 | NavAskSaveChangesResult |
| typedef UInt32 | NavAskDiscardChangesResult |
| typedef SInt16 | NavFilterModes |
| typedef struct NavFileOrFolderInfo | NavFileOrFolderInfo |
| typedef union NavEventDataInfo | NavEventDataInfo |
| typedef struct NavEventData | NavEventData |
| typedef struct __NavDialog * | NavDialogRef |
| typedef NavDialogRef | NavContext |
| typedef UInt32 | NavUserAction |
| typedef struct NavCBRec | NavCBRec |
| typedef NavCBRec * | NavCBRecPtr |
| typedef SInt32 | NavEventCallbackMessage |
| typedef void * | NavCallBackUserData |
| typedef NavCBRecPtr | callBackParms |
| typedef NavCBRecPtr void * | callBackUD |
| typedef void * | info |
| typedef void void NavFilterModes | filterMode |
| typedef SInt32 | NavCustomControlMessage |
| typedef UInt32 | NavActionState |
| typedef UInt16 | NavPopupMenuItem |
| typedef UInt16 | NavSortKeyField |
| typedef UInt16 | NavSortOrder |
| typedef UInt32 | NavDialogOptionFlags |
| typedef UInt32 | NavTranslationOptions |
| typedef struct NavMenuItemSpec | NavMenuItemSpec |
| typedef NavMenuItemSpec * | NavMenuItemSpecArrayPtr |
| typedef NavMenuItemSpecArrayPtr * | NavMenuItemSpecArrayHandle |
| typedef NavMenuItemSpecArrayPtr | NavMenuItemSpecPtr |
| typedef NavMenuItemSpecArrayHandle | NavMenuItemSpecHandle |
| typedef struct NavTypeList | NavTypeList |
| typedef NavTypeList * | NavTypeListPtr |
| typedef NavTypeListPtr * | NavTypeListHandle |
| typedef struct NavDialogOptions | NavDialogOptions |
| typedef struct NavReplyRecord | NavReplyRecord |
| typedef struct NavDialogCreationOptions | NavDialogCreationOptions |
Enumerations | |
| enum | { kNavSaveChangesClosingDocument = 1 , kNavSaveChangesQuittingApplication = 2 , kNavSaveChangesOther = 0 } |
| enum | { kNavAskSaveChangesSave = 1 , kNavAskSaveChangesCancel = 2 , kNavAskSaveChangesDontSave = 3 } |
| enum | { kNavAskDiscardChanges = 1 , kNavAskDiscardChangesCancel = 2 } |
| enum | { kNavFilteringBrowserList = 0 , kNavFilteringFavorites = 1 , kNavFilteringRecents = 2 , kNavFilteringShortCutVolumes = 3 , kNavFilteringLocationPopup = 4 } |
| enum | { kNavFileOrFolderVersion = 1 } |
| enum | { kNavUserActionNone = 0 , kNavUserActionCancel = 1 , kNavUserActionOpen = 2 , kNavUserActionSaveAs = 3 , kNavUserActionChoose = 4 , kNavUserActionNewFolder = 5 , kNavUserActionSaveChanges = 6 , kNavUserActionDontSaveChanges = 7 , kNavUserActionDiscardChanges = 8 , kNavUserActionReviewDocuments = 9 , kNavUserActionDiscardDocuments = 10 } |
| enum | { kNavCBRecVersion = 1 } |
| 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 , kNavCBUserAction = 12 , kNavCBOpenSelection = (long)0x80000000 } |
| enum | { uppNavEventProcInfo = 0x00000FC0 } |
| enum | { uppNavPreviewProcInfo = 0x000003D0 } |
| enum | { uppNavObjectFilterProcInfo = 0x00002FD0 } |
| enum | { kNavCtlShowDesktop = 0 , kNavCtlSortBy = 1 , kNavCtlSortOrder = 2 , kNavCtlScrollHome = 3 , kNavCtlScrollEnd = 4 , kNavCtlPageUp = 5 , kNavCtlPageDown = 6 , kNavCtlGetLocation = 7 , kNavCtlSetLocation = 8 , kNavCtlGetSelection , kNavCtlSetSelection , kNavCtlShowSelection = 11 , kNavCtlOpenSelection = 12 , kNavCtlEjectVolume = 13 , kNavCtlNewFolder = 14 , kNavCtlCancel = 15 , kNavCtlAccept = 16 , kNavCtlIsPreviewShowing = 17 , kNavCtlAddControl , kNavCtlAddControlList , kNavCtlGetFirstControlID , kNavCtlSelectCustomType , kNavCtlSelectAllType = 22 , kNavCtlGetEditFileName , kNavCtlSetEditFileName , kNavCtlSelectEditFileName , kNavCtlBrowserSelectAll , kNavCtlGotoParent , kNavCtlSetActionState = 28 , kNavCtlBrowserRedraw , kNavCtlTerminate } |
| enum | { kNavNormalState = 0x00000000 , kNavDontOpenState = 0x00000001 , kNavDontSaveState = 0x00000002 , kNavDontChooseState = 0x00000004 , kNavDontNewFolderState = 0x00000010 } |
| enum | { kNavAllKnownFiles = 0 , kNavAllReadableFiles = 1 , kNavAllFiles = 2 } |
| enum | { kNavSortNameField = 0 , kNavSortDateField = 1 } |
| enum | { kNavSortAscending = 0 , kNavSortDescending = 1 } |
| enum | { kNavDefaultNavDlogOptions = 0x000000E4 , kNavNoTypePopup , kNavDontAutoTranslate , kNavDontAddTranslateItems , kNavAllFilesInPopup , kNavAllowStationery = 0x00000020 , kNavAllowPreviews = 0x00000040 , kNavAllowMultipleFiles = 0x00000080 , kNavAllowInvisibleFiles = 0x00000100 , kNavDontResolveAliases = 0x00000200 , kNavSelectDefaultLocation , kNavSelectAllReadableItem , kNavSupportPackages , kNavAllowOpenPackages , kNavDontAddRecents = 0x00004000 , kNavDontUseCustomFrame , kNavDontConfirmReplacement , kNavPreserveSaveFileExtension } |
| enum | { kNavTranslateInPlace = 0 , kNavTranslateCopy } |
| enum | { kNavMenuItemSpecVersion = 0 } |
| enum | { kNavGenericSignature = FOUR_CHAR_CODE('****') } |
| enum | { kNavDialogOptionsVersion = 0 } |
| enum | { kNavReplyRecordVersion = 2 } |
| enum | { kNavDialogCreationOptionsVersion = 0 } |
Functions | |
| typedef | CALLBACK_API (void, NavEventProcPtr)(NavEventCallbackMessage callBackSelector |
| typedef | CALLBACK_API (Boolean, NavPreviewProcPtr)(NavCBRecPtr callBackParms |
| typedef | CALLBACK_API (Boolean, NavObjectFilterProcPtr)(AEDesc *theItem |
| typedef | STACK_UPP_TYPE (NavEventProcPtr) NavEventUPP |
| typedef | STACK_UPP_TYPE (NavPreviewProcPtr) NavPreviewUPP |
| typedef | STACK_UPP_TYPE (NavObjectFilterProcPtr) NavObjectFilterUPP |
| NavEventUPP | NewNavEventUPP (NavEventProcPtr userRoutine) |
| NavPreviewUPP | NewNavPreviewUPP (NavPreviewProcPtr userRoutine) |
| NavObjectFilterUPP | NewNavObjectFilterUPP (NavObjectFilterProcPtr userRoutine) |
| void | DisposeNavEventUPP (NavEventUPP userUPP) |
| void | DisposeNavPreviewUPP (NavPreviewUPP userUPP) |
| void | DisposeNavObjectFilterUPP (NavObjectFilterUPP userUPP) |
| void | InvokeNavEventUPP (NavEventCallbackMessage callBackSelector, NavCBRecPtr callBackParms, void *callBackUD, NavEventUPP userUPP) |
| Boolean | InvokeNavPreviewUPP (NavCBRecPtr callBackParms, void *callBackUD, NavPreviewUPP userUPP) |
| Boolean | InvokeNavObjectFilterUPP (AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode, NavObjectFilterUPP userUPP) |
| OSErr | NavLoad (void) |
| OSErr | NavUnload (void) |
| UInt32 | NavLibraryVersion (void) |
| OSErr | NavGetDefaultDialogOptions (NavDialogOptions *dialogOptions) |
| OSErr | NavGetFile (AEDesc *defaultLocation, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, NavPreviewUPP previewProc, NavObjectFilterUPP filterProc, NavTypeListHandle typeList, void *callBackUD) |
| OSErr | NavPutFile (AEDesc *defaultLocation, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, OSType fileType, OSType fileCreator, void *callBackUD) |
| OSErr | NavAskSaveChanges (NavDialogOptions *dialogOptions, NavAskSaveChangesAction action, NavAskSaveChangesResult *reply, NavEventUPP eventProc, void *callBackUD) |
| OSErr | NavCustomAskSaveChanges (NavDialogOptions *dialogOptions, NavAskSaveChangesResult *reply, NavEventUPP eventProc, void *callBackUD) |
| OSErr | NavAskDiscardChanges (NavDialogOptions *dialogOptions, NavAskDiscardChangesResult *reply, NavEventUPP eventProc, void *callBackUD) |
| OSErr | NavChooseFile (AEDesc *defaultLocation, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, NavPreviewUPP previewProc, NavObjectFilterUPP filterProc, NavTypeListHandle typeList, void *callBackUD) |
| OSErr | NavChooseFolder (AEDesc *defaultLocation, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, NavObjectFilterUPP filterProc, void *callBackUD) |
| OSErr | NavChooseVolume (AEDesc *defaultSelection, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, NavObjectFilterUPP filterProc, void *callBackUD) |
| OSErr | NavChooseObject (AEDesc *defaultLocation, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, NavObjectFilterUPP filterProc, void *callBackUD) |
| OSErr | NavNewFolder (AEDesc *defaultLocation, NavReplyRecord *reply, NavDialogOptions *dialogOptions, NavEventUPP eventProc, void *callBackUD) |
| OSErr | NavTranslateFile (NavReplyRecord *reply, NavTranslationOptions howToTranslate) |
| OSErr | NavCompleteSave (NavReplyRecord *reply, NavTranslationOptions howToTranslate) |
| OSErr | NavCustomControl (NavDialogRef dialog, NavCustomControlMessage selector, void *parms) |
| OSErr | NavCreatePreview (AEDesc *theObject, OSType previewDataType, const void *previewData, Size previewDataSize) |
| OSErr | NavDisposeReply (NavReplyRecord *reply) |
| Boolean | NavServicesCanRun (void) |
| Boolean | NavServicesAvailable (void) |
| OSStatus | NavGetDefaultDialogCreationOptions (NavDialogCreationOptions *outOptions) |
| OSStatus | NavCreateGetFileDialog (const NavDialogCreationOptions *inOptions, NavTypeListHandle inTypeList, NavEventUPP inEventProc, NavPreviewUPP inPreviewProc, NavObjectFilterUPP inFilterProc, void *inClientData, NavDialogRef *outDialog) |
| OSStatus | NavCreatePutFileDialog (const NavDialogCreationOptions *inOptions, OSType inFileType, OSType inFileCreator, NavEventUPP inEventProc, void *inClientData, NavDialogRef *outDialog) |
| OSStatus | NavCreateAskReviewDocumentsDialog (const NavDialogCreationOptions *inOptions, UInt32 inDocumentCount, NavEventUPP inEventProc, void *inClientData, NavDialogRef *outDialog) |
| OSStatus | NavCreateAskSaveChangesDialog (const NavDialogCreationOptions *inOptions, NavAskSaveChangesAction inAction, NavEventUPP inEventProc, void *inClientData, NavDialogRef *outDialog) |
| OSStatus | NavCreateAskDiscardChangesDialog (const NavDialogCreationOptions *inOptions, NavEventUPP inEventProc, void *inClientData, NavDialogRef *outDialog) |
| OSStatus | NavCreateChooseFileDialog (const NavDialogCreationOptions *inOptions, NavTypeListHandle inTypeList, NavEventUPP inEventProc, NavPreviewUPP inPreviewProc, NavObjectFilterUPP inFilterProc, void *inClientData, NavDialogRef *outDialog) |
| OSStatus | NavCreateChooseFolderDialog (const NavDialogCreationOptions *inOptions, NavEventUPP inEventProc, NavObjectFilterUPP inFilterProc, void *inClientData, NavDialogRef *outDialog) |
| OSStatus | NavCreateChooseVolumeDialog (const NavDialogCreationOptions *inOptions, NavEventUPP inEventProc, NavObjectFilterUPP inFilterProc, void *inClientData, NavDialogRef *outDialog) |
| OSStatus | NavCreateChooseObjectDialog (const NavDialogCreationOptions *inOptions, NavEventUPP inEventProc, NavPreviewUPP inPreviewProc, NavObjectFilterUPP inFilterProc, void *inClientData, NavDialogRef *outDialog) |
| OSStatus | NavCreateNewFolderDialog (const NavDialogCreationOptions *inOptions, NavEventUPP inEventProc, void *inClientData, NavDialogRef *outDialog) |
| OSStatus | NavDialogRun (NavDialogRef inDialog) |
| void | NavDialogDispose (NavDialogRef inDialog) |
| WindowRef | NavDialogGetWindow (NavDialogRef inDialog) |
| NavUserAction | NavDialogGetUserAction (NavDialogRef inDialog) |
| OSStatus | NavDialogGetReply (NavDialogRef inDialog, NavReplyRecord *outReply) |
| CFStringRef | NavDialogGetSaveFileName (NavDialogRef inPutFileDialog) |
| OSStatus | NavDialogSetSaveFileName (NavDialogRef inPutFileDialog, CFStringRef inFileName) |
| Boolean | NavDialogGetSaveFileExtensionHidden (NavDialogRef inPutFileDialog) |
| OSStatus | NavDialogSetSaveFileExtensionHidden (NavDialogRef inPutFileDialog, Boolean inHidden) |
Navigation Services Interfaces.
For bug reports, consult the following page on the World Wide Web:
http://developer.apple.com/bugreporter/
| #define InvokeNavEventUPP | ( | callBackSelector, | |
| callBackParms, | |||
| callBackUD, | |||
| userUPP | |||
| ) |
| #define InvokeNavObjectFilterUPP | ( | theItem, | |
| info, | |||
| callBackUD, | |||
| filterMode, | |||
| userUPP | |||
| ) |
| #define InvokeNavPreviewUPP | ( | callBackParms, | |
| callBackUD, | |||
| userUPP | |||
| ) |
| #define NewNavEventUPP | ( | userRoutine | ) |
| #define NewNavObjectFilterUPP | ( | userRoutine | ) |
| #define NewNavPreviewUPP | ( | userRoutine | ) |
| typedef struct __NavDialog* NavDialogRef |
NavDialogRef
Summary: Opaque Navigation Services dialog identifier
Discussion: A NavDialogRef is an opaque reference to an instance of a Navigation Services dialog. A new NavDialogRef is returned from any of the NavCreate*Dialog functions and is later disposed with the NavDialogDispose function. NavDialogRef is the new name for the NavContext type, and thus when a client's event proc is called, the value of the NavCBRec.context field is the same as the NavDialogRef returned from the corresponding NavCreate*Dialog. A NavDialogRef is distinct from, and is not interchangable with, a Dialog Manager DialogRef.
| typedef SInt32 NavEventCallbackMessage |
NavEventCallbackMessage
Summary: Identifies the message type being sent to the client's event proc
| typedef UInt32 NavUserAction |
NavUserAction
Summary: Indicates an action taken by the user
Discussion: When the user clicks a button at the bottom of a Nav Services dialog (or makes an equivalent mouse or key gesture), a kNavCBUserAction event is sent to the client's event proc indicating which action was taken. Often, the action also dismisses the dialog. User action events are only generated when using dialogs created from a NavCreate*Dialog function. In the special case of a modeless GetFile dialog (supported only on Mac OS X), the user can option-click on the open button to keep the dialog from being dismissed, but the kNavCBUserAction event is sent so the client can get the reply record and open the selected files.
| anonymous enum |
| anonymous enum |
| Enumerator | |
|---|---|
| kNavCBEvent | An OS event has occurred. A pointer to the EventRecord is in the eventData.eventDataParms.event field of the NavCBRec. |
| kNavCBCustomize | Negotiate for custom control space. Client can set change the customRect field in the NavCBRec to create space for a custom area. Nav Services will continue to send the kNavCBCustomize message until the client leaves the customRect field unchanged. |
| kNavCBStart | This message is sent after custom area negotiation, just before the dialog is made visible. Add your custom controls when you receive this message. |
| kNavCBTerminate | This is the last message sent, after the dialog has been hidden. |
| kNavCBAdjustRect | Sent when the dialog has been resized. Check the customRect and or previewRect values to see if any relayout is needed. Nav Services automatically moves controls in the custom area. |
| kNavCBNewLocation | The target folder of the dialog has changed. The NavCBRec.eventData.eventDataParms.param field is an AEDesc* containing an descriptor of the new location (ususally an FSSpec or an FSRef). |
| kNavCBShowDesktop | The target folder has changed to the user's desktop folder. |
| kNavCBSelectEntry | The user has selected or deselected a file or folder. The NavCBRec.eventData.eventDataParms.param field is an AEDescList* identifying the currently selected items. |
| kNavCBPopupMenuSelect | The value of the Show/Format popup menu has changed. The NavCBRec.eventData.eventDataParms.param is a NavMenuItemSpec* identifying the menu item selected. If the dialog was created using the Carbon-only NavCreate*Dialog APIs, then the menuType field of the NavMenuItemSpec is set to the index into the client's CFArray of popupExtension strings (see NavDialogCreationOptions). |
| kNavCBAccept | Sent when the user has accepted (Open, Save, etc.). |
| kNavCBCancel | Sent when the user has cancelled the dialog. |
| kNavCBAdjustPreview | The custom preview area state has changed. The NavCBRec.eventData.eventDataParms.param is a Boolean* set to true if the preview area is visible or false if it is not. |
| kNavCBUserAction | The user has taken one of the actions described in the NavUserAction definition. The action may or may not dismiss the dialog. The NavCBRec.userAction field indicates which action was taken (Carbon dialogs only). |
| kNavCBOpenSelection | The user has opened a folder or chosen a file. The client can block navigation or dismissal by setting the appropriate action state with the kNavCtlSetActionState NavCustomControl selector. |
| void DisposeNavEventUPP | ( | NavEventUPP | userUPP | ) |
| void DisposeNavObjectFilterUPP | ( | NavObjectFilterUPP | userUPP | ) |
| void DisposeNavPreviewUPP | ( | NavPreviewUPP | userUPP | ) |
| void InvokeNavEventUPP | ( | NavEventCallbackMessage | callBackSelector, |
| NavCBRecPtr | callBackParms, | ||
| void * | callBackUD, | ||
| NavEventUPP | userUPP | ||
| ) |
| Boolean InvokeNavObjectFilterUPP | ( | AEDesc * | theItem, |
| void * | info, | ||
| void * | callBackUD, | ||
| NavFilterModes | filterMode, | ||
| NavObjectFilterUPP | userUPP | ||
| ) |
| Boolean InvokeNavPreviewUPP | ( | NavCBRecPtr | callBackParms, |
| void * | callBackUD, | ||
| NavPreviewUPP | userUPP | ||
| ) |
| OSErr NavAskDiscardChanges | ( | NavDialogOptions * | dialogOptions, |
| NavAskDiscardChangesResult * | reply, | ||
| NavEventUPP | eventProc, | ||
| void * | callBackUD | ||
| ) |
| OSErr NavAskSaveChanges | ( | NavDialogOptions * | dialogOptions, |
| NavAskSaveChangesAction | action, | ||
| NavAskSaveChangesResult * | reply, | ||
| NavEventUPP | eventProc, | ||
| void * | callBackUD | ||
| ) |
| OSErr NavChooseFile | ( | AEDesc * | defaultLocation, |
| NavReplyRecord * | reply, | ||
| NavDialogOptions * | dialogOptions, | ||
| NavEventUPP | eventProc, | ||
| NavPreviewUPP | previewProc, | ||
| NavObjectFilterUPP | filterProc, | ||
| NavTypeListHandle | typeList, | ||
| void * | callBackUD | ||
| ) |
| OSErr NavChooseFolder | ( | AEDesc * | defaultLocation, |
| NavReplyRecord * | reply, | ||
| NavDialogOptions * | dialogOptions, | ||
| NavEventUPP | eventProc, | ||
| NavObjectFilterUPP | filterProc, | ||
| void * | callBackUD | ||
| ) |
| OSErr NavChooseObject | ( | AEDesc * | defaultLocation, |
| NavReplyRecord * | reply, | ||
| NavDialogOptions * | dialogOptions, | ||
| NavEventUPP | eventProc, | ||
| NavObjectFilterUPP | filterProc, | ||
| void * | callBackUD | ||
| ) |
| OSErr NavChooseVolume | ( | AEDesc * | defaultSelection, |
| NavReplyRecord * | reply, | ||
| NavDialogOptions * | dialogOptions, | ||
| NavEventUPP | eventProc, | ||
| NavObjectFilterUPP | filterProc, | ||
| void * | callBackUD | ||
| ) |
| OSErr NavCompleteSave | ( | NavReplyRecord * | reply, |
| NavTranslationOptions | howToTranslate | ||
| ) |
| OSStatus NavCreateAskDiscardChangesDialog | ( | const NavDialogCreationOptions * | inOptions, |
| NavEventUPP | inEventProc, | ||
| void * | inClientData, | ||
| NavDialogRef * | outDialog | ||
| ) |
NavCreateAskDiscardChangesDialog()
Summary: Create an AskDiscardChanges dialog
Discussion: Use this function to create a dialog which asks the user to discard changes to a document or cancel. This is most often use when the user wants to revert a a document to the last saved revision. This function replaces NavAskDiscardChanges, allowing new window modalities, and adding Unicode support. Upon successful creation, the dialog is not visible. Present and run the dialog with NavDialogRun. After the dialog is complete, dispose of it with NavDialogDispose.
Parameters:
inOptions: Options controlling the appearance and behavior of the dialog
inEventProc: The UPP for the client's event callack, or NULL for no event callback
inClientData: A client-defined context value passed to all callback functions
outDialog: Upon successful completion, a reference to the created dialog
Result: A status code
| OSStatus NavCreateAskReviewDocumentsDialog | ( | const NavDialogCreationOptions * | inOptions, |
| UInt32 | inDocumentCount, | ||
| NavEventUPP | inEventProc, | ||
| void * | inClientData, | ||
| NavDialogRef * | outDialog | ||
| ) |
NavCreateAskReviewDocumentsDialog()
Summary: Create an AskReviewDocumentsDialog dialog
Discussion: Use this function to create a dialog which tells the user how many unsaved documents there are, and asks the user to start reviewing the documents, don't save any documents, or cancel. This dialog is appropriate to use when an application is quitting and there is more than one unsaved document. It is supported only on Mac OS X because the HI guidelines for earlier versions of Mac OS do not include this dialog as part of the application quit sequence. Upon successful creation, the dialog is not visible. Present and run the dialog with NavDialogRun. After the dialog is complete, dispose of it with NavDialogDispose. Upon dismissal of the dialog, this dialog's user action will be set to one of the following: kNavUserActionReviewDocuments, kNavUserActionDiscardDocuments, or kNavUserActionCancel.
Parameters:
inOptions: Options controlling the appearance and behavior of the dialog
inDocumentCount: Indicates the number of documents needing review. This number appears in the text presented to the user. If for any reason the total number of unsaved documents is unknown, specify 0, and an ambiguous message will appear. Do not specifiy 1, since the HI guidelines call for this alert only when there is more than one document to be reviewed.
inEventProc: The UPP for the client's event callack, or NULL for no event callback
inClientData: A client-defined context value passed to all callback functions
outDialog: Upon successful completion, a reference to the created dialog
Result: A status code
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.1 and later
| OSStatus NavCreateAskSaveChangesDialog | ( | const NavDialogCreationOptions * | inOptions, |
| NavAskSaveChangesAction | inAction, | ||
| NavEventUPP | inEventProc, | ||
| void * | inClientData, | ||
| NavDialogRef * | outDialog | ||
| ) |
NavCreateAskSaveChangesDialog()
Summary: Create an AskSaveChanges dialog
Discussion: Use this function to create a dialog which asks the user to save, don't save or cancel closing a document with unsaved changes. This function replaces NavAskSaveChanges and NavCustomAskSaveChanges, allowing new window modalities, and adding Unicode support. Upon successful creation, the dialog is not visible. Present and run the dialog with NavDialogRun. After the dialog is complete, dispose of it with NavDialogDispose. To provide a customized message for the alert, specify an non-NULL message value in the options structure.
Parameters:
inOptions: Options controlling the appearance and behavior of the dialog
inAction: Indicates this usage context for this dialog: closing a document or quitting an application. This setting affects the message text displayed to the user.
inEventProc: The UPP for the client's event callack, or NULL for no event callback
inClientData: A client-defined context value passed to all callback functions
outDialog: Upon successful completion, a reference to the created dialog
Result: A status code
| OSStatus NavCreateChooseFileDialog | ( | const NavDialogCreationOptions * | inOptions, |
| NavTypeListHandle | inTypeList, | ||
| NavEventUPP | inEventProc, | ||
| NavPreviewUPP | inPreviewProc, | ||
| NavObjectFilterUPP | inFilterProc, | ||
| void * | inClientData, | ||
| NavDialogRef * | outDialog | ||
| ) |
Summary: Create a ChooseFile dialog
Discussion: Use this function to create a dialog designed for selecting one file as the target of an operation. A ChooseFile dialog is a simple version a GetFile dialog. This function replaces NavChooseFile, allowing new window modalities, and adding Unicode support. Upon successful creation, the dialog is not visible. Present and run the dialog with NavDialogRun. After the dialog is complete, dispose of it with NavDialogDispose.
Parameters:
inOptions: Options controlling the appearance and behavior of the dialog
inTypeList: A creator signature and list of file types to show in the dialog file browser. If NULL, show all files.
inEventProc: The UPP for the client's event callack, or NULL for no event callback
inPreviewProc: The UPP for the client's custom file preview callback, or NULL for standard previews
inFilterProc: The UPP for the client's custom filter callback, or NULL for no custom file filtering
inClientData: A client-defined context value passed to all callback functions
outDialog: Upon successful completion, a reference to the created dialog
Result: A status code
| OSStatus NavCreateChooseFolderDialog | ( | const NavDialogCreationOptions * | inOptions, |
| NavEventUPP | inEventProc, | ||
| NavObjectFilterUPP | inFilterProc, | ||
| void * | inClientData, | ||
| NavDialogRef * | outDialog | ||
| ) |
Summary: Create a ChooseFolder dialog
Discussion: Use this function to create a dialog designed for selecting a folder as the target of an operation. This function replaces NavChooseFolder, allowing new window modalities, and adding Unicode support. Upon successful creation, the dialog is not visible. Present and run the dialog with NavDialogRun. After the dialog is complete, dispose of it with NavDialogDispose.
Parameters:
inOptions: Options controlling the appearance and behavior of the dialog
inEventProc: The UPP for the client's event callack, or NULL for no event callback
inFilterProc: The UPP for the client's custom filter callback, or NULL for no custom file filtering
inClientData: A client-defined context value passed to all callback functions
outDialog: Upon successful completion, a reference to the created dialog
Result: A status code
| OSStatus NavCreateChooseObjectDialog | ( | const NavDialogCreationOptions * | inOptions, |
| NavEventUPP | inEventProc, | ||
| NavPreviewUPP | inPreviewProc, | ||
| NavObjectFilterUPP | inFilterProc, | ||
| void * | inClientData, | ||
| NavDialogRef * | outDialog | ||
| ) |
Summary: Create a ChooseObject dialog
Discussion: Use this function to create a dialog designed for selecting a file, folder, or volume as the target of an operation. This function replaces NavChooseObject, allowing new window modalities, and adding Unicode support. Upon successful creation, the dialog is not visible. Present and run the dialog with NavDialogRun. After the dialog is complete, dispose of it with NavDialogDispose.
Parameters:
inOptions: Options controlling the appearance and behavior of the dialog
inEventProc: The UPP for the client's event callack, or NULL for no event callback
inPreviewProc: The UPP for the client's custom file preview callback, or NULL for standard previews
inFilterProc: The UPP for the client's custom filter callback, or NULL for no custom file filtering
inClientData: A client-defined context value passed to all callback functions
outDialog: Upon successful completion, a reference to the created dialog
Result: A status code
| OSStatus NavCreateChooseVolumeDialog | ( | const NavDialogCreationOptions * | inOptions, |
| NavEventUPP | inEventProc, | ||
| NavObjectFilterUPP | inFilterProc, | ||
| void * | inClientData, | ||
| NavDialogRef * | outDialog | ||
| ) |
Summary: Create a ChooseVolume dialog
Discussion: Use this function to create a dialog designed for selecting a volume as the target of an operation. This function replaces NavChooseVolume, allowing new window modalities, and adding Unicode support. Upon successful creation, the dialog is not visible. Present and run the dialog with NavDialogRun. After the dialog is complete, dispose of it with NavDialogDispose.
Parameters:
inOptions: Options controlling the appearance and behavior of the dialog
inEventProc: The UPP for the client's event callack, or NULL for no event callback
inFilterProc: The UPP for the client's custom filter callback, or NULL for no custom file filtering
inClientData: A client-defined context value passed to all callback functions
outDialog: Upon successful completion, a reference to the created dialog
Result: A status code
| OSStatus NavCreateGetFileDialog | ( | const NavDialogCreationOptions * | inOptions, |
| NavTypeListHandle | inTypeList, | ||
| NavEventUPP | inEventProc, | ||
| NavPreviewUPP | inPreviewProc, | ||
| NavObjectFilterUPP | inFilterProc, | ||
| void * | inClientData, | ||
| NavDialogRef * | outDialog | ||
| ) |
Summary: Create a GetFile dialog
Discussion: Use this function to create a dialog designed for opening document files. This function replaces NavGetFile, allowing new window modalities, and adding Unicode support. Upon successful creation, the dialog is not visible. Present and run the dialog with NavDialogRun. After the dialog is complete, dispose of it with NavDialogDispose.
Parameters:
inOptions: Options controlling the appearance and behavior of the dialog
inTypeList: A creator signature and list of file types to show in the dialog file browser. If NULL, show all files.
inEventProc: The UPP for the client's event callack, or NULL for no event callback
inPreviewProc: The UPP for the client's custom file preview callback, or NULL for standard previews
inFilterProc: The UPP for the client's custom filter callback, or NULL for no custom file filtering
inClientData: A client-defined context value passed to all callback functions
outDialog: Upon successful completion, a reference to the created dialog
Result: A status code
| OSStatus NavCreateNewFolderDialog | ( | const NavDialogCreationOptions * | inOptions, |
| NavEventUPP | inEventProc, | ||
| void * | inClientData, | ||
| NavDialogRef * | outDialog | ||
| ) |
Summary: Create a NewFolder dialog
Discussion: Use this function to create a dialog designed for creating a new folder. Nav Services creates the folder as specified by the user and returns a reference to the folder in the selection field of the reply record. This function replaces NavNewFolder, allowing new window modalities, and adding Unicode support. Upon successful creation, the dialog is not visible. Present and run the dialog with NavDialogRun. After the dialog is complete, dispose of it with NavDialogDispose.
Parameters:
inOptions: Options controlling the appearance and behavior of the dialog
inEventProc: The UPP for the client's event callack, or NULL for no event callback
inClientData: A client-defined context value passed to all callback functions
outDialog: Upon successful completion, a reference to the created dialog
Result: A status code
| OSErr NavCreatePreview | ( | AEDesc * | theObject, |
| OSType | previewDataType, | ||
| const void * | previewData, | ||
| Size | previewDataSize | ||
| ) |
| OSStatus NavCreatePutFileDialog | ( | const NavDialogCreationOptions * | inOptions, |
| OSType | inFileType, | ||
| OSType | inFileCreator, | ||
| NavEventUPP | inEventProc, | ||
| void * | inClientData, | ||
| NavDialogRef * | outDialog | ||
| ) |
Summary: Create a PutFile dialog
Discussion: Use this function to create a dialog designed for setting the name and location of a document file prior to saving. This function replaces NavPutFile, allowing new window modalities, and adding Unicode support. Upon successful creation, the dialog is not visible. Present and run the dialog with NavDialogRun. After the dialog is complete, dispose of it with NavDialogDispose.
Parameters:
inOptions: Options controlling the appearance and behavior of the dialog
inFileType: The type of the file to be saved. This parameter is used in conjunction with the inFileCreator parameter to look up the kind string for the Format popup menu, and to drive the identification of translation options.
inFileCreator: The creator signature of the file to be saved (see inFileType parameter)
inEventProc: The UPP for the client's event callack, or NULL for no event callback
inClientData: A client-defined context value passed to all callback functions
outDialog: Upon successful completion, a reference to the created dialog
Result: A status code
| OSErr NavCustomAskSaveChanges | ( | NavDialogOptions * | dialogOptions, |
| NavAskSaveChangesResult * | reply, | ||
| NavEventUPP | eventProc, | ||
| void * | callBackUD | ||
| ) |
| OSErr NavCustomControl | ( | NavDialogRef | dialog, |
| NavCustomControlMessage | selector, | ||
| void * | parms | ||
| ) |
| void NavDialogDispose | ( | NavDialogRef | inDialog | ) |
Summary: Dispose of a Nav Services dialog
Discussion: Call this function when completely finished with a Nav Services dialog. After calling NavDialogDispose, the dialog reference is no longer valid. NavDialogDispose is safe to call from within a callback to the client's Nav Services event proc.
Parameters:
inDialog: The dialog to dispose
| OSStatus NavDialogGetReply | ( | NavDialogRef | inDialog, |
| NavReplyRecord * | outReply | ||
| ) |
Summary: Fill in the provided reply record with the results of a user action such as kNavUserActionOpen, kNavUserActionSaveAs, or kNavUserActionChoose.
Discussion: Call this function when a file dialog receives a user action other that implies an item or items to open, save, etc. Upon successful completion, the reply record describes the item(s) that the client needs to act upon. The reply record should later be disposed of with NavDisposeReply.
Parameters:
inDialog: Which dialog
outReply: A pointer to the client-allocated reply record to be filled in
Result: A status code
| Boolean NavDialogGetSaveFileExtensionHidden | ( | NavDialogRef | inPutFileDialog | ) |
NavDialogGetSaveFileExtensionHidden()
Summary: Get the current state of the extension hiding in a PutFile dialog
Discussion: This function can be called at any time to determine if a PutFile dialog is hiding the file extesion (if any) of the file to be saved.
Parameters:
inPutFileDialog: Which PutFile dialog
Result: True if the extension is hidden, false if the extension is visible or there is no extension.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.1 and later
| CFStringRef NavDialogGetSaveFileName | ( | NavDialogRef | inPutFileDialog | ) |
Summary: Return the current value of the file name to be saved in a PutFile dialog
Discussion: This function can be called at any time on a valid PutFile dialog to obtain the current value of the save file name. This function is a Unicode-based replacement for the kNavCtlGetEditFileName NavCustomControl selector. On Mac OS X, the full file name is returned, including any extenison that may be hidden from the user.
Parameters:
inPutFileDialog: Which dialog
Result: The save file name as a CFStringRef. The string is immutable. The client should retain the string if the reference is to be held beyond the life of the dialog (standard CF retain/release semantics).
| NavUserAction NavDialogGetUserAction | ( | NavDialogRef | inDialog | ) |
Summary: Return the current user action taken by the user
Discussion: A user action occurs when the user dismisses the dialog or otherwise does something generating a reply record that the client needs to act upon. If the user has not taken such an action, NavDialogGetUserAction returns kNavUserActionNone. If the dialog is terminated using the NavCustomControl selector kNavCtlTerminate, the final user action is kNavUserActionNone. For file dialogs, if the final user action is not kNavUserActionCancel, then there is a valid reply record which can be obtained with NavDialogGetReply. Although the user action is sent to the client event proc as a kNavCBUserAction event, this function is provided as a convenience for clients of modal dialogs who may find it easier to get the user action immediately after NavDialogRun returns.
Parameters:
inDialog: Which dialog
Result: The user action
| WindowRef NavDialogGetWindow | ( | NavDialogRef | inDialog | ) |
Summary: Return the window in which a Nav Services dialog appears
Discussion: Note that a valid NavDialogRef may not have a window until NavDialogRun has been called. If no window exists for the dialog, NavDialogGetWindow returns NULL.
Parameters:
inDialog: Which dialog
Result: The window reference
| OSStatus NavDialogRun | ( | NavDialogRef | inDialog | ) |
Summary: Show and run a Nav Services dialog
Discussion: After a dialog is created with a NavCreate*Dialog function, the client can modify the dialog target folder or save file name using NavCustomControl with the appropriate selectors. The dialog is presented to the user by calling NavDialogRun. If the dialog is system modal or application modal (kWindowModalitySystemModal, kWindowModalityAppModal), NavDialogRun does not return until the dialog has been dismissed. If the dialog is modeless or window modal (kWindowModalityNone, kWindowModalityWindowModal), NavDialogRun shows the dialog and returns immediately. In order to know when the dialog has been dismissed, the client must watch for the kNavCBUserAction event sent to the client event proc. Note that on Mac OS 9 and earlier, all dialogs are modal, even if a modeless or window modal dialog is requested. However, the kNavCBUserAction event is still sent to the event proc, so it's possible to use a single programming model on OS 9 and OS X provided the client assumes NavDialogRun returns immediately after showing the dialog.
Parameters:
inDialog: The dialog to run
Result: A status code
| OSStatus NavDialogSetSaveFileExtensionHidden | ( | NavDialogRef | inPutFileDialog, |
| Boolean | inHidden | ||
| ) |
NavDialogSetSaveFileExtensionHidden()
Summary: Set the current state of the extension hiding in a PutFile dialog
Discussion: This function can be called at any time to hide or show the extension of the file to be saved in a PutFile dialog. If the current file name has no extension, then hiding the extension has no effect.
Parameters:
inPutFileDialog: Which PutFile dialog
inHidden: The new value for the hidden extension state
Result: A status code
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.1 and later
| OSStatus NavDialogSetSaveFileName | ( | NavDialogRef | inPutFileDialog, |
| CFStringRef | inFileName | ||
| ) |
Summary: Set the current value of the file name to be saved in a PutFile dialog
Discussion: This function can be called at any time to set the current save file name. Use it to set an initial name before calling NavDialogRun or to change the file name dynamically while a dialog is running. This function is a Unicode-based replacement for the kNavCtlSetEditFileName NavCustomControl selector.
Parameters:
inPutFileDialog: Which PutFile dialog
inFileName: The file name to use
Result: A status code
| OSErr NavDisposeReply | ( | NavReplyRecord * | reply | ) |
| OSStatus NavGetDefaultDialogCreationOptions | ( | NavDialogCreationOptions * | outOptions | ) |
NavGetDefaultDialogCreationOptions()
Summary: Initialize the input structure to default values
Discussion: Provided as a convenience to obtain the preferred default options for use in creating any Nav Services dialog.
Parameters:
outOptions: A pointer to the client-allocated options structure to initialize
Result: A status code
| OSErr NavGetDefaultDialogOptions | ( | NavDialogOptions * | dialogOptions | ) |
| OSErr NavGetFile | ( | AEDesc * | defaultLocation, |
| NavReplyRecord * | reply, | ||
| NavDialogOptions * | dialogOptions, | ||
| NavEventUPP | eventProc, | ||
| NavPreviewUPP | previewProc, | ||
| NavObjectFilterUPP | filterProc, | ||
| NavTypeListHandle | typeList, | ||
| void * | callBackUD | ||
| ) |
| UInt32 NavLibraryVersion | ( | void | ) |
| OSErr NavLoad | ( | void | ) |
| OSErr NavNewFolder | ( | AEDesc * | defaultLocation, |
| NavReplyRecord * | reply, | ||
| NavDialogOptions * | dialogOptions, | ||
| NavEventUPP | eventProc, | ||
| void * | callBackUD | ||
| ) |
| OSErr NavPutFile | ( | AEDesc * | defaultLocation, |
| NavReplyRecord * | reply, | ||
| NavDialogOptions * | dialogOptions, | ||
| NavEventUPP | eventProc, | ||
| OSType | fileType, | ||
| OSType | fileCreator, | ||
| void * | callBackUD | ||
| ) |
| Boolean NavServicesAvailable | ( | void | ) |
| Boolean NavServicesCanRun | ( | void | ) |
| OSErr NavTranslateFile | ( | NavReplyRecord * | reply, |
| NavTranslationOptions | howToTranslate | ||
| ) |
| OSErr NavUnload | ( | void | ) |
| NavEventUPP NewNavEventUPP | ( | NavEventProcPtr | userRoutine | ) |
| NavObjectFilterUPP NewNavObjectFilterUPP | ( | NavObjectFilterProcPtr | userRoutine | ) |
| NavPreviewUPP NewNavPreviewUPP | ( | NavPreviewProcPtr | userRoutine | ) |