# I3DExSceneCommand Struct Reference
[External Interfaces]

Inheritance diagram for I3DExSceneCommand:

List of all members.

## Public Member Functions
virtual void MCCOMAPI | GetMenuCallBack (ISelfPrepareMenuCallBack **callBack)=0
virtual MCCOMErr MCCOMAPI | Init (ISceneDocument *sceneDocument)=0
virtual MCCOMErr MCCOMAPI | Prepare ()=0
virtual boolean MCCOMAPI | CanUndo ()=0
virtual boolean MCCOMAPI | Do ()=0
virtual boolean MCCOMAPI | Undo ()=0
virtual boolean MCCOMAPI | Redo ()=0
virtual boolean MCCOMAPI | PostPrepare ()=0

## Detailed Description

Formely known as Scene Operations, they add features to the Scene.

They work is a very similar manner as regular actions, with a Do(), Undo() and Redo() methods.

The 'scmd' resource

You MUST provide a 'scmd' resource to specify additionnal information:

- You MUST give a UNIQUE Action Number (registered with EOVIA)

- Then you specify the menu ID to which the command will be added (-1 goes to the default menu aka edit)

- Then you specify the list of the Rooms in which the Scene Commmand is valid. Giving none means "all".

Note : one instance of each type of Scene Command will be created at the application startup. This instance will be used only for menu enabling purposes by calling the SelfPrepareMenus() method. All other methods of these instances will NEVER be called, including Init(). Therefore, the I3DExSceneCommand::SelfPrepareMenus() proc should be completely self-sufficient.

## Member Function Documentation

virtual boolean MCCOMAPI I3DExSceneCommand::CanUndo | ( |  | ) | `[pure virtual]`

Returns true if the Scene Command is undoable

Implemented in TBasicSceneCommand.

virtual boolean MCCOMAPI I3DExSceneCommand::Do | ( |  | ) | `[pure virtual]`

Do phase. Returns true if your actually changed something in the Scene

Implemented in TBasicSceneCommand.

virtual void MCCOMAPI I3DExSceneCommand::GetMenuCallBack | ( | ISelfPrepareMenuCallBack ** | callBack | ) | `[pure virtual]`

Returns a callBack that is called to check if this scene command is enabled for a given document. Note that the returned object should never keep a reference to the scene document or anything in the scene since it will only be deleted when the application shutsdown

Parameters:

  | callBack | A reference to the callBack

Implemented in TBasicSceneCommand.

virtual MCCOMErr MCCOMAPI I3DExSceneCommand::Init | ( | ISceneDocument * | sceneDocument | ) | `[pure virtual]`

Init() is called after the Scene Command is instanciated. Use sceneDocument to get the selection or any other Scene data you would need to perform your action

Parameters:

  | sceneDocument | The scene document

Implemented in TBasicSceneCommand.

virtual boolean MCCOMAPI I3DExSceneCommand::PostPrepare | ( |  | ) | `[pure virtual]`

PostPrepare is called after Prepare and the options dialog for the pmap so that you can create data caches needed for do/undo/redo operations

Returns:
  true if the scene command can go on, false if the scene command must be stopped

Implemented in TBasicSceneCommand.

virtual MCCOMErr MCCOMAPI I3DExSceneCommand::Prepare | ( |  | ) | `[pure virtual]`

Prepare allows you to perform any preparation work needed (even posting a dialog). Make sure you return MC_S_OK if it is OK to proceed with the Scene Command. If your Scene Command has a PMap resource and the corresponding 'Node' UI resources, then the application will create a modal dialog for you just after Prepare().

Implemented in TBasicSceneCommand.

virtual boolean MCCOMAPI I3DExSceneCommand::Redo | ( |  | ) | `[pure virtual]`

Redo phase. Returns true if your actually changed something in the Scene

Implemented in TBasicSceneCommand.

virtual boolean MCCOMAPI I3DExSceneCommand::Undo | ( |  | ) | `[pure virtual]`

Undo phase. Returns true if your actually changed something in the Scene

Implemented in TBasicSceneCommand.

The documentation for this struct was generated from the following file:

- I3dExSceneCommand.h