省略可。 カスタム コマンドが取り消されるときに発生します。 戻り値は無視されます。
| 注 | このコールバックは C++ API でのみサポートされています(スクリプティングではサポートされていません)。 |
C++ API で実装された カスタム コマンド。
CStatus <command_name>_Undo( CRef& in_context )
{
...
} |
<command_name> は、PluginRegistrar.RegisterCommand の呼び出しで指定されている名前です。この名前に含まれるスペースはアンダースコアに置き換えられます。
| パラメータ | Language | タイプ | 説明 |
|---|---|---|---|
| C++ | CRef& | Context オブジェクトへのリファレンス。 Context::GetSource は Command を返します。 |
| Attribute | 詳細 |
|---|---|
| UndoRedoData | 元に戻すための操作をスタックから取得できます。 「カスタム コマンドを元に戻す/やり直す」を参照してください。 |
// Taken from the SimpleUndoRedoCommand example (for the complete example,
// click the link in the See Also section below)
SICALLBACK SimpleUndoRedoCommand_Undo( CRef& in_ctxt )
{
Context ctxt( in_ctxt );
CMoveViewTask* p = (CMoveViewTask*)(CValue::siPtrType)ctxt.GetAttribute(L"UndoRedoData");
p->Undo( );
return CStatus::OK;
} |