MM Developer's Guide
MM Interfaces | MM Methods | MM Types and Misc API
Interface ID: IID_IMoaMmWndMac
Pointer type: PIMoaMmWndMac
Inheritance: IMoaUnknown
Header file: mmiwndm.h
Description
This interface supports Macintosh-specific user interface display.
As an alternative to this platform-specific API, consider using
the MUI XDK and MUI Xtra instead. It
provides platform-independent interfaces that support dialogs
containing a variety of widget types, including dynamic layout
capabilities and a standard event-handling mechanism. The MUI
API also lets you easily display system alerts, file dialogs,
and URL dialogs. See the MUI Developer's
Guide for information on which applications support the MUI XDK.
With IMoaMmUtils2, IMoaMmValue,
and IMoaMmWndWin, this interface supersedes IMoaMmUtils
, which has been made redundant.
Methods
-
- MacHandleEvent()
MacPrepareModalDialog()
MacModalDialog()
MacUnprepareModalDialog()
MacAlert()
MacRegisterWindow()
MacUnregisterWindow()
MacDragWindow()
MacSelectWindow()
MacXShowWindow()
MacHideWindow()
Syntax
- MacAlert(PIMoaMmWndMac This,
- MoaLong alertID,
PMoaVoid filterProcUPP)
Parameters
-
This
- Pointer to the
IMoaMmWndMac
interface
alertID
MoaLong
Alert's resource ID
filterProcUPP
PMoaVoid
Universal procPtr to a filterProc
Returns
-
MoaError
Description
-
- Replaces the Macintosh Alert() call. This method is required to ensure proper window management
in the host application. alertID is the alert resource ID of your alert. Make sure
to call MoaBeginUsingResources() before this call and MoaEndUsingResources() afterwards, to provide access to your resources. filterProcUPP is a universal procPtr to a filterProc;
set to NULL if there is none. MacAlert() returns a 16-bit integer identifying what user action
took place; it returns 1 if alert wasn't drawn. See the Inside
Mac documentation on Alert for more information.
Syntax
- MacDragWindow(PIMoaMmWndMac This,
- PMoaMmMacWindow pWindow,
PMoaPoint pStartPoint,
PMoaRect pLimitRect)
Parameters
-
This
- Pointer to the
IMoaMmWndMac
interface
pWindow
PMoaMmMacWindow
WindowPtr to the Macintosh window
pStartPoint
- PMoaPoint
pLimitRect
- PMoaRect
Returns
-
MoaError
Description
-
Drags a Macintosh window. pWindowis
a Macintosh WindowPtr.
This method is provided as a replacement for the Macintosh Toolbox DragWindow() function.
This method allows the host application to correctly handle window
layering and focus when your Xtra is running along-side windows
owned by the application. To have events for a Macintosh window
routed to your code, see MacRegisterWindow() and MacUnregisterWindow().
See also: MacSelectWindow(), MacXShowWindow(), MacHideWindow().
Syntax
- MacHandleEvent(PIMoaMmWndMac This,
- PMoaVoid pEventRecord)
Parameters
-
This
- Pointer to the
IMoaMmWndMac
interface
pEventRecord
PMoaVoid
Pointer to a Macintosh EventRecord structure
Returns
-
MoaError
Description
-
Passes a Macintosh-style event on to host
application. pEventRecord is a pointer to a Macintosh EventRecord structure. This call passes the event directly to the host application's
event loop.
Syntax
- MacHideWindow(PIMoaMmWndMac This,
- PMoaMmMacWindow pWindow)
Parameters
-
This
- Pointer to the
IMoaMmWndMac
interface
pWindow
PMoaMmMacWindow
WindowPtrto
the Macintosh window
Returns
-
MoaError
Description
-
Hides a Macintosh window. pWindowis
a Macintosh WindowPtr.
This method is provided as a replacement for the Macintosh Toolbox HideWindow() function.
This method allows the host application to correctly handle window
layering and focus when your Xtra is running along-side windows
owned by the application. To have events for a Macintosh window
routed to your code, see MacRegisterWindow() and MacUnregisterWindow().
See also: MacDragWindow(), MacXShowWindow(), MacSelectWindow().
Syntax
- MacModalDialog(PIMoaMmWndMac This,
- MoaMmDialogCookie dialogCookie,
PMoaVoid filterProcUPP,
MoaShort FAR * itemHit)
Parameters
-
This
- Pointer to the
IMoaMmWndMac
interface
dialogCookie
MoaMmDialogCookie
Value obtained from calling MacPrepareModalDialog()
filterProcUPP
- PMoaVoid
itemHit
- MoaShort FAR *
Returns
-
MoaError
Description
-
- Use this on the Macintosh instead of
calling the Toolbox ModalDialog().
This method allows the host application to get update events and
performs other operations supporting moveable modal dialogs. dialogCookieis
the value obtained from a call to MacPrepareModalDialog(), which must be made before showing the dialog and entering a dialog
loop. If the dialog has a title bar, it is moveable, and the host
application's windows and dialogs beneath it update properly when
it is moved. Since moving a dialog can cause update events in
the host applications, make sure you can handle calls back to
your thumbnail and sprite imaging methods from within this call.
Be sure to "bracket" your call to MacModalDialog() with calls to MoaBeginUsingResources()
and MacPrepareModalDialog() before showing your dialog
and entering your dialog loop, andMacUnprepareModalDialog() and MoaEndUsingResources() after exiting the dialog loop and closing the dialog.
Syntax
- MacPrepareModalDialog(PIMoaMmWndMac This,
- PMoaMmDialogCookie pDialogCookie)
Parameters
-
This
- Pointer to the
IMoaMmWndMac
interface
pDialogCookie
- PMoaMmDialogCookie
Returns
-
MoaError
Description
-
- Call this method before calling the MacModalDialog() loop. This method must be called before your dialog has been displayed
and before you enter you modal dialog loop. pDialogCookiecontains
a pointer to a MoaMmDialogCookieto
receive a special value that is passed to subsequent calls to MacModalDialog() and MacUnprepareModalDialog().
Syntax
- MacRegisterWindow(PIMoaMmWndMac This,
- PIMoaMmMacEventHandler pEventHandler,
PMoaMmMacWindow pWindow,
MoaMmRegWindowFlags flags,
PMoaVoid refCon)
Parameters
-
This
- Pointer to the
IMoaMmWndMac
interface
pEventHandler
- PIMoaMmMacEventHandler
pWindow
- PMoaMmMacWindow
flags
- MoaMmRegWindowFlags
refCon
- PMoaVoid
Returns
-
MoaError
Description
-
Use this method to incorporate modeless windows or floating palettes
controlled by your Xtra.. For example, your asset media editor
can be modeless and persist after the call to the Editor method
returns. (Use the PIMoaAssetCallback::SetModified() method to "dirty" your asset when changes
are made asynchronously.) As another example, a floating inspector
palette could be created that tracks the current selection in
the cast window, supplying additional information about the selected
cast member(s).
You supply a PIMoaMmMacEventHandler interface which the host application calls back (the
Macintosh EventRecord* is given as a parameter to the HandleEvent() method). pWindow is the Macintosh window pointer of the window
you want to register. flags contains the window registration flags; see mmtypes.h. refConis an
arbitrary 4-byte value (user-data) which the caller can supply
to be passed to pEventHandlerwhen
events are dispatched.
Director Tip: This callback is also available in
projectors, so can be used to display arbitrary windows at run-time.
Here are some tips about Macintosh window management:
Syntax
- MacSelectWindow(PIMoaMmWndMac This,
- PMoaMmMacWindow pWindow)
Parameters
-
This
- Pointer to the
IMoaMmWndMac
interface
pWindow
PMoaMmMacWindow
WindowPtrto
the Macintosh window
Returns
-
MoaError
Description
-
Selects a Macintosh window and brings the
window to the front. pWindowis
a Macintosh WindowPtr.
This method is provided as a replacement for the Macintosh Toolbox SelectWindow()function.
Use this callback instead of calling SelectWindow().
This allows the host application to correctly handle window layering
and focus when your Xtra is running along-side windows owned by
the application. To have events for a Macintosh window routed
to your code, see MacRegisterWindow() and MacUnregisterWindow().
See also: MacDragWindow(), MacXShowWindow(),MacHideWindow().
Syntax
- MacXShowWindow(PIMoaMmWndMac This,
- PMoaMmMacWindow pWindow)
Parameters
-
This
- Pointer to the
IMoaMmWndMac
interface
pWindow
PMoaMmMacWindow
WindowPtrto the Macintosh window
Returns
-
MoaError
Description
-
Makes a Macintosh window visible; it doesn't
necessarily bring the window to the front. pWindow is a Macintosh WindowPtr.
This method is provided as a replacement for the Macintosh Toolbox ShowWindow() function.
Use this callback instead of calling ShowWindow().
This allows the host application to correctly handle window layering
and focus when your Xtra is running along-side windows owned by
the application. To have events for a Macintosh window routed
to your code, see MacRegisterWindow() and MacUnregisterWindow().
See also: MacDragWindow(), MacXShowWindow(), MacSelectWindow().
Syntax
- MacUnprepareModalDialog(PIMoaMmWndMac This,
- MoaMmDialogCookie dialogCookie)
Parameters
-
This
- Pointer to the
IMoaMmWndMac
interface
dialogCookie
MoaMmDialogCookie
Value obtained from MacPrepareModalDialog()
Returns
-
MoaError
Description
-
- Call this after your MacModalDialog() loop. This method must be called after you have exited
your dialog loop and your dialog window has been closed. dialogCookie is the value obtained from the previous call to MacPrepareModalDialog().
Syntax
- MacUnregisterWindow(PIMoaMmWndMac This,
- PIMoaMmMacEventHandler pEventHandler)
Parameters
-
This
- Pointer to the
IMoaMmWndMac
interface
pEventHandler
- PIMoaMmMacEventHandler
Returns
-
MoaError
Description
-
Call this with the PIMoaMmMacEventHandler you supplied to MacRegisterWindow() when you no longer want to receive events for the window. You
must call MacUnregisterWindow()before
disposing of your window See the description of MacRegisterWindow()method
for more information.
Copyright © 1995-2007 Adobe Macromedia Software LLC, Inc.