Micono NavigationServices v0.4.1b1
for REALbasic 2.1 plugin

Upload:2000/6/8

[Download]


About Micono NavigationServices

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 -> NavFilterProc

About 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"

R
NS/SFP

Determines whether the Navigation Services library is available on the user's system.

"Version"

"integer"

R
NS

The currently installed version of the Navigation Services shared library.

"NavLoad"

"Boolean"

R/W
NS

Pre-loads/Unloads the Navigation Services shared library.

Default Location

"DefaultLocation"

"FolderItem"

R/W
NS/SFP

Services defaults to the last location visited during a call to the Open/Save functions.

DialogOptions

"DialogOptionFlags"

"Integer"

R/W
NS/SFP

Option flags for affecting the dialog's behavior. See "Table I"

"NoTypePopup"

"Boolean"

R/W
NS

Don't show file type/extension popup on Open/Save.

"DontAutoTranslate"

"Boolean"

R/W
NS

Don't automatically translate on Open.

"DontAddTranslateItems"

"Boolean"

R/W
NS

Don't add translation choices on Open/Save.

"AllFilesInPopup"

"Boolean"

R/W
NS

"All Files" menu item in the type popup on Open.

"AllowStationery"

"Boolean"

R/W
NS

Allow saving of stationery files.

"AllowPreviews"

"Boolean"

R/W
NS

Allow preview to show.

"AllowMultipleFiles"

"Boolean"

R/W
NS

Allow multiple items to be selected.

"AllowInvisibleFiles"

"Boolean"

R/W
NS/SFP

Allow invisible items to be shown.

"DontResolveAliases"

"Boolean"

R/W
NS

Don't resolve aliases.

"SelectDefaultLocation"

"Boolean"

R/W
NS

Make the default location the browser selection.

"SelectAllReadableItem"

"Boolean"

R/W
NS

Make the dialog select "All Readable Documents" on open.

"SupportPackages"

"Boolean"

R/W
NS

Recognize file system packages, v2.0 or greater.

"AllowOpenPackages"

"Boolean"

R/W
NS

Allow opening of packages, v2.0 or greater.

"DontAddRecents"

"Boolean"

R/W
NS

Don't add chosen objects to the recents list, v2.0 or greater.

"DontUseCustomFrame"

"Boolean"

R/W
NS

Don't add the bevelled custom frame, v2.0 or greater.

"LocationX"

"Integer"

R/W
NS/SFP

top-left location of the dialog, or {-1,-1} for default position

"LocationY"

"Integer"

R/W
NS/SFP

"ClientName"

"String"

R/W
NS

A string that identifies your application in the dialog box window title.

"WindowTitle"

"String"

R/W
NS

A string that you can provide to override the default window title.

"ActionButtonLabel"

"String"

R/W
NS

Label of the default button (or null string for default).

"CancelButtonLabel"

"String"

R/W
NS

Label of the cancel button (or null string for default).

"SavedFileName"

"String"

R/W
NS/SFP

Default name for text box in NavPutFile (or null string for default).

"Message"

"String"

R/W
NS/SFP

Custom message prompt (or null string for default).

"PreferenceKey"

"Integer"

R/W
NS

A key for to managing preferences for using multiple utility dialogs.

Reply

"ValidRecord"

"Boolean"

R
NS/SFP

Open/save: true if the user confirmed a selection, false on cancel.

"Replacing"

"Boolean"

R
NS/SFP

Save: true if the user is overwriting an existing object for save.

"IsStationery"

"Boolean"

R
NS

Save: true if the user wants to save an object as stationery.

"TranslationNeeded"

"Boolean"

R
NS

Save: translation is 'needed', open: translation 'has taken place'.

"KeyScript"

"Integer"

R
NS/SFP

Open/save: script in which the name of each item in 'selection' is to be displayed.

"sfGood"

"Boolean"

R
SFP

Open/save: false on cancel.

"sfFile"

"FolderItem"

R
SFP

The file which is selected in file list, or is replyed.

For save

"CreateFile"

"Boolean"

R/W
NS

"DisposeReplyRecord
AfterCompleteSave"

"Boolean"

R/W
NS

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"

R/W
NS

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"

R/W
NS

"CustomRectRight"

"Integer"

R/W
NS

"CustomRectBottom"

"Integer"

R/W
NS

CallBack

"NavEventProc"

"Boolean"

R/W
NS

Handles events such as window updating and resizing.

"NavFilterProc"

"Boolean"

R/W
NS

Determines whether file objects should be displayed in the browser list and navigation menus.

"NavPreviewProc"

"Boolean"

R/W
NS

Displays custom file previews.

"SFPFileFilter"

"Boolean"

R/W
SFP

Activate "SFPFileFilter" of call back for Old type dialog.

"SFPDlgHook"

"Boolean"

R/W
SFP

Activate "SFPDlgHook" of call back for Old type dialog.

"SFPModalFilter"

"Boolean"

R/W
SFP

Activate "SFPModalFilter" of call back for Old type dialog.

"SFPActivateProc"

"Boolean"

R/W
SFP

Activate "SFPActivateProc" of call back for Old type dialog.

Event

"EventWhat"

"Integer"

R/W
NS/SFP

OS event that is used in EventProc, PreviewProc

"EventMessage"

"Integer"

R/W
NS/SFP

"EventModifiers"

"Integer"

R/W
NS/SFP

"EventWhen"

"Integer"

R/W
NS/SFP

"EventWhereX"

"Integer"

R/W
NS/SFP

"EventWhereY"

"Integer"

R/W
NS/SFP

Result (Error)

"Result"

"Integer"

R
NS/SFP

OSErr

Methods

Name/Parameters/Returen

Discription

Daialog Option

"SetDefaultDialogOptions as Integer"

NS

Initialize the default attributes or behavior for dialog boxes.

Pop up menu

"SetNavTypeList( TypeList as AppleEventDescList )"

NS/SFP

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 )"

NS

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"

NS

Navigation Services (Open)

"NavGetFile as AppleEventDescList"

NS

Displays an Open dialog box and prompts the user to select a file or files to be opened.

"NavChooseFile as FolderItem"

NS

Creates a simple dialog box that prompts the user to select a file.

"NavChooseVolume as FolderItem"

NS

Displays a dialog box that prompts the user to choose a volume.

"NavChooseFolder as FolderItem"

NS

Displays a dialog box that prompts the user to choose a folder or volume.

"NavChooseObject as AppleEventDescList"

NS

Displays a dialog box that prompts the user to choose a file, folder, or volume.

"NavNewFolder as FolderItem"

NS

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"

NS

Displays a Save dialog box.

"NavPutFile( FileType as Integer, FileCreator as Integer ) as FolderItem"

NS

"NavAskSaveChanges( Action as Integer ) as Integer"

NS

Displays a Save Changes alert box. See Table II, III.

"NavAskDiscardChanges as Integer"

NS

Displays an alert box that asks the user whether to discard changes to a particular document. See Table IV.

"NavCompleteSave"

NS

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"

SFP

Displays a old type open dialog box.

"SFPCustomPutFile( dlgID as Integer ) as FolderItem"

SFP

Displays a old type save dialog box.

Custom Control

"NavCtlShowDesktop"

NS

Show desktop

"NavCtlSortBy(SortKeyField as Integer)"

NS

Sort key field

"NavCtlSortOrder(SortOrder as Integer)"

NS

Sort order

"NavCtlScrollHome"

NS

Scroll list home

"NavCtlScrollEnd"

NS

Scroll list end

"NavCtlPageUp"

NS

Page list up

"NavCtlPageDown"

NS

Page list down

"NavCtlGetLocation as AppleEventDescList"

NS

Get current location

"NavCtlSetLocation( Location as AppleEventDescList )"

NS

Set current location

"NavCtlGetSelection as AppleEventDescList"

NS

Get current selection

"NavCtlSetSelection( Selection as AppleEventDescList )"

NS

Set current selection

"NavCtlShowSelection"

NS

Make selection visible

"NavCtlOpenSelection"

NS

Open view of selection

"NavCtlEjectVolume( vRefNum as Integer )"

NS

Eject volume

"NavCtlNewFolder( FolderName as String )"

NS

Create a new folder

"NavCtlCancel"

NS

Cancel dialog

"NavCtlAccept"

NS

Accept dialog default

"NavCtlIsPreviewShowing( ShowHide as Boolean )"

NS

Query preview status

"NavCtlAddControl( CNTLResID as Integer )"

NS

Add one control to dialog

"NavCtlAddControlList( DITLResID as Integer )"

NS

Add control list to dialog

"NavCtlGetFirstControlID( RealItem as Boolean ) as Integer"

NS

Get 1st control ID

"NavCtlSelectCustomType( Item as Integer )"

NS

Select a custom menu item

"NavCtlSelectAllType( Item as Integer )"

NS

Select an "All" menu item

"NavCtlGetEditFileName as String"

NS

Get save dlog's file name

"NavCtlSetEditFileName( Name as String )"

NS

Set save dlog's file name

"NavCtlBrowserSelectAll"

NS

Re-scan the browser list

"NavCtlGotoParent"

NS

Navigate to parent

"NavCtlSetActionState( ActionState as Integer )"

NS

Restrict navigation

"NavCtlBrowserRedraw"

NS

Rescan browser list

"NavCtlTerminate"

NS

Terminate/dismiss dialog

Utilities

"FindControl as Integer"

NS

Toolbox APIs for custom dialog. Other API use declare.

"FindDialogItem as Integer"

NS

Events

Name/Parameters/Returen

Discription

"NavFilterProc(F as FolderItem, info as Integer, filterMode as Integer ) as Boolean"

NS

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"

NS

Displays custom file previews.

"NavEventProc( CallBackSelector as Integer, CallBackParms as Integer )"

NS

Handles events such as window updating and resizing.

"SFPFileFilter( F as FolderItem ) as Boolean"

SFP

FileFilter call back reoutine for old type dialog.
#You can't set breakpoint.

"SFPDlgHook( item as Integer, theDialog as Integer ) as Integer"

SFP

DlgHook call back reoutine for old type dialog.
#You can't set breakpoint.

"SFPModalFilter( theDialog as Integer, theEvent as Integer, itemHit as Integer ) as Integer"

SFP

ModalFilter call back reoutine for old type dialog.
#You can't set breakpoint.

"SFPActivateProc( theDialog as Integer, itemNo as Integer, Activating as Boolean )"

SFP

ActivateProc call back reoutine for old type dialog.
#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.