MM Developer's Guide
MM Interfaces | MM Methods | MM Types and Misc API


IMoaMmXTool


Interface ID: IID_IMoaMmXTool
Pointer type: PIMoaMmXTool
Inheritance: IMoaUnknown
Header file: mmixtool.h

Description

The IMoaMmXTool interface provides a mechanism for providing authoring-time tools that are listed in the Xtras menu. The Director Developer's Guide has more on implementing Tools Xtras. In addition to this interface, Tools Xtras implement the IMoaRegister interface to inform the host application of its capabilities, menu name, and other details. This interface is called by the host application to get the enable state of your tool (unless you're "alwaysEnabled") and to invoke the tool.


Methods

Invoke()
GetEnabled()

GetEnabled()

Syntax

GetEnabled(PIMoaMmXToolThis,
PMoaMmEnabledStatepEnabledState)

Parameters

This
Pointer to the IMoaMmXTool interface

pEnabledState
PMoaMmEnabledState

Returns

kMoaErr_NoErr Succeeded, value at pEnabledState set
kMoaMmErr_NotImplemented Tool is specified as "alwaysEnabled" in registry.

Description


Called by the host application to obtain the state of your tool. Set the value at pEnabledState depending on whether or not it's okay for the user to invoke your tool at this time. The following values are valid for pEnabledState:
Value Description
kMoaMmEnabledState_Disabled Tool cannot be invoked now
kMoaMmEnabledState_Enabled Tool can be invoked now

If you registered a value of TRUE for the kMoaMmDictKey_AlwaysEnabled key in your IMoaRegister::Register() implementation, the host application assumes you're always enabled and never calls this method.


Invoke()

Syntax

Invoke(PIMoaMmXToolThis)

Parameters

This
Pointer to the IMoaMmXTool interface

Returns

kMoaErr_NoErr Succeeded, tool invoked
kMoaMmErr_ToolDisabled Failed because tool is disabled
kMoaErr_OutOfMem Failed due to memory error
kMoaMmErr_InternalError Failed due to internal error

Description

Called when your tool is selected by the user. You can do a multitude of operations from putting up a modal dialog or a modeless window, or immediately executing some operation; it's up to you. See the documentation for the Multimedia Services and Director Services callbacks for an idea of the functionality available.

Copyright © 1995-2007 Adobe Macromedia Software LLC, Inc.