Upload:
REALbasic 2.1.x plugin for NavigationServices・Various setting of dialogue option is possible.
・Filter process, preview process, and event process handling are possible.
・Preparation of custom dialogue is possible.・Because it is possible to confirm all actions yet, use it with care.
Customize of NS and Old type dialog ![]()
Navigation Services
![]()
Standard File Package
Preview process of Navigation Services Changes
(ver0.3->0.4)
- [New] Correspond with old type custom dialog.
Properties: sfGood, sfFile, SFPFileFilter, SFPDlgHook, SFPModalFilter, SFPActivateProc
Methods: SFPCustomGetFile, SFPCustomPutFile
Event: SFPFileFilter, SFPDlgHook, SFPModalFilter, SFPActivateProc- [CHANG]
EventProc -> NavEventProc
PreviewProc -> NavPreviewProc
FilterProc -> NavFilterProcAbout action confirmation:
- MacOS9, G4 450MHz, Rb2.1.1, NS2.0
About Navigation Services
- Navigation Services 1.1 SDK at http://developer.apple.com/sdk/index.html
Global Methods
// Determines whether the Navigation Services library is available on the user's system.
"mic_NavAvailable as Boolean"
// The currently installed version of the Navigation Services shared library.
"mic_NavVersion as Integer"
// Pre-loads the Navigation Services shared library.
"mic_NavLoad as Boolean"
// Unloads the Navigation Services shared library.
"mic_NavUnLoad"
MicNavService Class:
|
Properties |
||||
|
Name |
Type |
Discription |
||
|
Navigation Services Library |
||||
|
"Available" |
"Boolean" |
|
|
Determines whether the Navigation Services library is available on the user's system. |
|
"Version" |
"integer" |
|
|
The currently installed version of the Navigation Services shared library. |
|
"NavLoad" |
"Boolean" |
|
|
Pre-loads/Unloads the Navigation Services shared library. |
|
Default Location |
||||
|
"DefaultLocation" |
"FolderItem" |
|
|
Services defaults to the last location visited during a call to the Open/Save functions. |
|
DialogOptions |
||||
|
"DialogOptionFlags" |
"Integer" |
|
|
Option flags for affecting the dialog's behavior. See "Table I" |
|
"NoTypePopup" |
"Boolean" |
|
|
Don't show file type/extension popup on Open/Save. |
|
"DontAutoTranslate" |
"Boolean" |
|
|
Don't automatically translate on Open. |
|
"DontAddTranslateItems" |
"Boolean" |
|
|
Don't add translation choices on Open/Save. |
|
"AllFilesInPopup" |
"Boolean" |
|
|
"All Files" menu item in the type popup on Open. |
|
"AllowStationery" |
"Boolean" |
|
|
Allow saving of stationery files. |
|
"AllowPreviews" |
"Boolean" |
|
|
Allow preview to show. |
|
"AllowMultipleFiles" |
"Boolean" |
|
|
Allow multiple items to be selected. |
|
"AllowInvisibleFiles" |
"Boolean" |
|
|
Allow invisible items to be shown. |
|
"DontResolveAliases" |
"Boolean" |
|
|
Don't resolve aliases. |
|
"SelectDefaultLocation" |
"Boolean" |
|
|
Make the default location the browser selection. |
|
"SelectAllReadableItem" |
"Boolean" |
|
|
Make the dialog select "All Readable Documents" on open. |
|
"SupportPackages" |
"Boolean" |
|
|
Recognize file system packages, v2.0 or greater. |
|
"AllowOpenPackages" |
"Boolean" |
|
|
Allow opening of packages, v2.0 or greater. |
|
"DontAddRecents" |
"Boolean" |
|
|
Don't add chosen objects to the recents list, v2.0 or greater. |
|
"DontUseCustomFrame" |
"Boolean" |
|
|
Don't add the bevelled custom frame, v2.0 or greater. |
|
"LocationX" |
"Integer" |
|
|
top-left location of the dialog, or {-1,-1} for default position |
|
"LocationY" |
"Integer" |
|
|
|
|
"ClientName" |
"String" |
|
|
A string that identifies your application in the dialog box window title. |
|
"WindowTitle" |
"String" |
|
|
A string that you can provide to override the default window title. |
|
"ActionButtonLabel" |
"String" |
|
|
Label of the default button (or null string for default). |
|
"CancelButtonLabel" |
"String" |
|
|
Label of the cancel button (or null string for default). |
|
"SavedFileName" |
"String" |
|
|
Default name for text box in NavPutFile (or null string for default). |
|
"Message" |
"String" |
|
|
Custom message prompt (or null string for default). |
|
"PreferenceKey" |
"Integer" |
|
|
A key for to managing preferences for using multiple utility dialogs. |
|
Reply |
||||
|
"ValidRecord" |
"Boolean" |
|
|
Open/save: true if the user confirmed a selection, false on cancel. |
|
"Replacing" |
"Boolean" |
|
|
Save: true if the user is overwriting an existing object for save. |
|
"IsStationery" |
"Boolean" |
|
|
Save: true if the user wants to save an object as stationery. |
|
"TranslationNeeded" |
"Boolean" |
|
|
Save: translation is 'needed', open: translation 'has taken place'. |
|
"KeyScript" |
"Integer" |
|
|
Open/save: script in which the name of each item in 'selection' is to be displayed. |
|
"sfGood" |
"Boolean" |
|
|
Open/save: false on cancel. |
|
"sfFile" |
"FolderItem" |
|
|
The file which is selected in file list, or is replyed. |
|
For save |
||||
|
"CreateFile" |
"Boolean" |
|
|
|
|
"DisposeReplyRecord |
"Boolean" |
|
|
There is call need NavCompleteSave method by all means when used NavPutFile method when this property is true. |
|
Rectangle of Cuntom Dialog area |
||||
|
"CustomRectLeft" |
"Integer" |
|
|
A local coordinate rectangle describing the customization area available to your application. This determines how much room your application has to install custom controls. |
|
"CustomRectTop" |
"Integer" |
|
|
|
|
"CustomRectRight" |
"Integer" |
|
|
|
|
"CustomRectBottom" |
"Integer" |
|
|
|
|
CallBack |
||||
|
"NavEventProc" |
"Boolean" |
|
|
Handles events such as window updating and resizing. |
|
"NavFilterProc" |
"Boolean" |
|
|
Determines whether file objects should be displayed in the browser list and navigation menus. |
|
"NavPreviewProc" |
"Boolean" |
|
|
Displays custom file previews. |
|
"SFPFileFilter" |
"Boolean" |
|
|
Activate "SFPFileFilter" of call back for Old type dialog. |
|
"SFPDlgHook" |
"Boolean" |
|
|
Activate "SFPDlgHook" of call back for Old type dialog. |
|
"SFPModalFilter" |
"Boolean" |
|
|
Activate "SFPModalFilter" of call back for Old type dialog. |
|
"SFPActivateProc" |
"Boolean" |
|
|
Activate "SFPActivateProc" of call back for Old type dialog. |
|
Event |
||||
|
"EventWhat" |
"Integer" |
|
|
OS event that is used in EventProc, PreviewProc |
|
"EventMessage" |
"Integer" |
|
|
|
|
"EventModifiers" |
"Integer" |
|
|
|
|
"EventWhen" |
"Integer" |
|
|
|
|
"EventWhereX" |
"Integer" |
|
|
|
|
"EventWhereY" |
"Integer" |
|
|
|
|
Result (Error) |
||||
|
"Result" |
"Integer" |
|
|
OSErr |
Methods Name/Parameters/Returen Discription Daialog Option "SetDefaultDialogOptions as
Integer" Initialize the default attributes or
behavior for dialog boxes. Pop up menu "SetNavTypeList( TypeList as
AppleEventDescList )" Before calling, set up this structure to
declare file types that your application can
open. "AddNavPopupExtension( MenuCreator as
String, MenuType as String, MenuItemName as String
)" Used to add extra menu items to the Show
pop-up menu in an Open dialog box or the Format pop-up menu
in Save dialog boxes. "ClearNavPopupExtension" Navigation Services (Open) "NavGetFile as
AppleEventDescList" Displays an Open dialog box and prompts
the user to select a file or files to be opened. "NavChooseFile as FolderItem" Creates a simple dialog box that prompts
the user to select a file. "NavChooseVolume as
FolderItem" Displays a dialog box that prompts the
user to choose a volume. "NavChooseFolder as
FolderItem" Displays a dialog box that prompts the
user to choose a folder or volume. "NavChooseObject as
AppleEventDescList" Displays a dialog box that prompts the
user to choose a file, folder, or volume. "NavNewFolder as FolderItem" Displays a dialog box that prompts the
user to create a new folder. Navigation Services (Save) "NavPutFile( FileType as String,
FileCreator as String ) as FolderItem" Displays a Save dialog box. "NavPutFile( FileType as Integer,
FileCreator as Integer ) as FolderItem" "NavAskSaveChanges( Action as Integer )
as Integer" Displays a Save Changes alert box. See
Table II, III. "NavAskDiscardChanges as
Integer" Displays an alert box that asks the user
whether to discard changes to a particular document. See
Table IV. "NavCompleteSave" Completes a save operation and performs
any needed translation on the file. There is call need this
method by all means when used NavPutFile method in
DisposeReplyRecordAfterCompleteSave=true. Standard File Package (Old type dialog) "SFPCustomGetFile( dlgID as Integer ) as
FolderItem" Displays a old type open dialog
box. "SFPCustomPutFile( dlgID as Integer ) as
FolderItem" Displays a old type save dialog
box. Custom Control "NavCtlShowDesktop" Show desktop "NavCtlSortBy(SortKeyField as
Integer)" Sort key field "NavCtlSortOrder(SortOrder as
Integer)" Sort order "NavCtlScrollHome" Scroll list home "NavCtlScrollEnd" Scroll list end "NavCtlPageUp" Page list up "NavCtlPageDown" Page list down "NavCtlGetLocation as
AppleEventDescList" Get current location "NavCtlSetLocation( Location as
AppleEventDescList )" Set current location "NavCtlGetSelection as
AppleEventDescList" Get current selection "NavCtlSetSelection( Selection as
AppleEventDescList )" Set current selection "NavCtlShowSelection" Make selection visible "NavCtlOpenSelection" Open view of selection "NavCtlEjectVolume( vRefNum as Integer
)" Eject volume "NavCtlNewFolder( FolderName as String
)" Create a new folder "NavCtlCancel" Cancel dialog "NavCtlAccept" Accept dialog default "NavCtlIsPreviewShowing( ShowHide as
Boolean )" Query preview status "NavCtlAddControl( CNTLResID as Integer
)" Add one control to dialog "NavCtlAddControlList( DITLResID as
Integer )" Add control list to dialog "NavCtlGetFirstControlID( RealItem as
Boolean ) as Integer" Get 1st control ID "NavCtlSelectCustomType( Item as Integer
)" Select a custom menu item "NavCtlSelectAllType( Item as Integer
)" Select an "All" menu item "NavCtlGetEditFileName as
String" Get save dlog's file name "NavCtlSetEditFileName( Name as String
)" Set save dlog's file name "NavCtlBrowserSelectAll" Re-scan the browser list "NavCtlGotoParent" Navigate to parent "NavCtlSetActionState( ActionState as
Integer )" Restrict navigation "NavCtlBrowserRedraw" Rescan browser list "NavCtlTerminate" Terminate/dismiss dialog Utilities "FindControl as Integer" Toolbox APIs for custom dialog. Other API
use declare. "FindDialogItem as Integer"
Events Name/Parameters/Returen Discription "NavFilterProc(F as FolderItem, info as
Integer, filterMode as Integer ) as Boolean" Determines whether file objects should be
displayed in the browser list and navigation
menus. "NavPreviewProc( CallBackParms as
Integer, Desc as AppleEventDescList, W as Integer, H as
Integer ) as Graphics" Displays custom file previews. "NavEventProc( CallBackSelector as
Integer, CallBackParms as Integer )" Handles events such as window updating
and resizing. "SFPFileFilter( F as FolderItem ) as
Boolean" FileFilter call back reoutine for old
type dialog. "SFPDlgHook( item as Integer, theDialog
as Integer ) as Integer" DlgHook call back reoutine for old type
dialog. "SFPModalFilter( theDialog as Integer,
theEvent as Integer, itemHit as Integer ) as
Integer" ModalFilter call back reoutine for old
type dialog. "SFPActivateProc( theDialog as Integer,
itemNo as Integer, Activating as Boolean )" ActivateProc call back reoutine for old
type dialog.
#You can't set
breakpoint.
#You can't set
breakpoint.
#You can't set
breakpoint.
#You can't set
breakpoint.
Table I: NavDialogOptionFlags
kNavDefaultNavDlogOptions = 0x000000E4
kNavNoTypePopup = 0x00000001
kNavDontAutoTranslate = 0x00000002
kNavAllFilesInPopup = 0x00000010
kNavAllowStationery = 0x00000020
kNavAllowPreviews = 0x00000040
kNavAllowMultipleFiles = 0x00000080
kNavAllowInvisibleFiles = 0x00000100
kNavDontResolveAliases = 0x00000200
kNavSelectDefaultLocation = 0x00000400
kNavSelectAllReadableItem = 0x00000800
kNavSupportPackages = 0x00001000
kNavAllowOpenPackages = 0x00002000
kNavDontAddRecents = 0x00004000
kNavDontUseCustomFrame = 0x00008000
Table II: NavAskSaveChangesAction
Input action codes for NavAskSaveChanges()
kNavSaveChangesClosingDocument = 1
kNavSaveChangesQuittingApplication = 2
kNavSaveChangesOther = 0
Table III: NavAskSaveChangesResult
Result codes for NavAskSaveChanges()
kNavAskSaveChangesSave = 1
kNavAskSaveChangesCancel = 2
kNavAskSaveChangesDontSave = 3
Table IV: NavAskDiscardChangesResult
Result codes for NavAskDiscardChanges()
kNavAskDiscardChanges = 1
kNavAskDiscardChangesCancel = 2
Table V: CallBackSelector of EventProc
kNavCBEvent = 0, /* an event has occurred (update, idle events, etc.) */
kNavCBCustomize = 1, /* protocol for negotiating customization space */
kNavCBStart = 2, /* the navigation dialog is starting up */
kNavCBTerminate = 3, /* the navigation dialog is closing down */
kNavCBAdjustRect = 4, /* the navigation dialog is being resized */
kNavCBNewLocation = 5, /* user has chosen a new location in the browser */
kNavCBShowDesktop = 6, /* user has navigated to the desktop */
kNavCBSelectEntry = 7, /* user has made a selection in the browser */
kNavCBPopupMenuSelect = 8, /* signifies that a popup menu selection was made */
kNavCBAccept = 9, /* user has accepted the navigation dialog */
kNavCBCancel = 10, /* user has cancelled the navigation dialog */
kNavCBAdjustPreview = 11, /* preview button was clicked or the preview was resized */
kNavCBOpenSelection = (long)0x80000000 /* user has opened or chosen an object, v2.0 or greater */
No warranty and copyright
Supports
Copyright 2000, Micono Utilities. All rights reserved.