#include <plugop.h>
Inheritance diagram for PlugInOp:
Public Member Functions | |
PlugInOp () | |
Constructor for PlugInOp operation. It is not undoable. | |
virtual void | Do (OpDescriptor *) |
Invokes the plug-in specified by the OpDescriptor. | |
Static Public Member Functions | |
static BOOL | Init () |
Creates all the opDescriptors that call this operation. | |
static BOOL | RegisterOpToken (TCHAR *OpToken, const String_64 &NewMenuText, CCRuntimeClass *pClass=CC_RUNTIME_CLASS(PlugInOp), pfnGetState gs=GetState) |
Allows OpDescriptors to be defined to the operation system. | |
static BOOL | RegisterOpToken (TCHAR *OpToken, UINT32 MenuTextID, CCRuntimeClass *pClass=CC_RUNTIME_CLASS(PlugInOp), pfnGetState gs=GetState) |
Allows OpDescriptors to be defined to the operation system. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
To provide greying and ticking functionality for the operation. | |
Private Member Functions | |
CC_DECLARE_DYNCREATE (PlugInOp) |
Definition at line 120 of file plugop.h.
|
Constructor for PlugInOp operation. It is not undoable.
Definition at line 255 of file plugop.cpp.
|
|
|
|
Invokes the plug-in specified by the OpDescriptor.
Reimplemented from Operation. Reimplemented in BfxPlugInOp. Definition at line 392 of file plugop.cpp. 00393 { 00394 if (pOpDesc == NULL) 00395 { 00396 ERROR3IF(pOpDesc == NULL,"PlugInOp::Do null OpDescriptor"); 00397 return; 00398 } 00399 //ERROR3("PlugInOp - do"); 00400 00401 // Search the plug-ins list for the specified plug-in and invoke it 00402 PlugInManager* pManager = GetApplication()->GetPlugInManager(); 00403 if (pManager == NULL) 00404 return; 00405 00406 PlugInItem * pPlugIn = pManager->GetFirstPlugIn(); 00407 String_32 OpToken; 00408 while (pPlugIn) 00409 { 00410 OpToken = pPlugIn->GetUniqueID(); 00411 OpToken += pPlugIn->GetPlugInName(); 00412 if (pOpDesc->Token == OpToken) 00413 pPlugIn->About(); 00414 00415 pPlugIn = pManager->GetNextPlugIn(pPlugIn); 00416 } 00417 00418 // and finish 00419 End(); 00420 }
|
|
To provide greying and ticking functionality for the operation.
Reimplemented in BfxPlugInOp. Definition at line 371 of file plugop.cpp. 00372 { 00373 // At present, this item is always available. 00374 OpState OpSt; 00375 return OpSt; 00376 }
|
|
Creates all the opDescriptors that call this operation.
Reimplemented from SimpleCCObject. Reimplemented in BfxPlugInOp. Definition at line 270 of file plugop.cpp. 00271 { 00272 BOOL ok = TRUE; 00273 // Set up some standard operations 00274 ok = ok && RegisterOpToken(OPTOKEN_PLUGINS, _R(IDS_PLUGINS)); 00275 // ok = ok && RegisterOpToken(OPTOKEN_PHOTOSHOP_PLUGINS, _R(IDS_PHOTOSHOP_PLUGINS)); 00276 // ok = ok && RegisterOpToken(OPTOKEN_PHOTOSHOP_APPLYLAST, _R(IDS_PHOTOSHOP_APPLYLAST)); 00277 00278 // ok = ok && RegisterOpToken(OPTOKEN_PLUGINONE, _R(IDS_PLUGIN_ONE)); 00279 // ok = ok && RegisterOpToken(OPTOKEN_PLUGINTWO, _R(IDS_PLUGIN_TWO)); 00280 // ok = ok && RegisterOpToken(OPTOKEN_PLUGINTHREE, _R(IDS_PLUGIN_THREE)); 00281 return ok; 00282 }
|
|
Allows OpDescriptors to be defined to the operation system.
Definition at line 328 of file plugop.cpp. 00330 { 00331 // register some option descriptors 00332 if (!Operation::RegisterOpDescriptor( 00333 0, // Tool ID 00334 MenuTextID, // String resource ID 00335 pClass, //CC_RUNTIME_CLASS(PlugInOp), // Runtime class 00336 OpToken, // Token string 00337 gs, // GetState function 00338 NULL, // help ID 00339 NULL, // bubble help 00340 NULL, // resource ID 00341 NULL, // control ID 00342 SYSTEMBAR_ILLEGAL, // Bar ID 00343 TRUE, // Recieve system messages 00344 FALSE, // Smart duplicate operation 00345 TRUE, // Clean operation 00346 NULL, // No vertical counterpart 00347 NULL, // String for one copy only error 00348 (DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC) // Auto state flags 00349 )) 00350 return FALSE; 00351 00352 return TRUE; 00353 }
|
|
Allows OpDescriptors to be defined to the operation system.
Definition at line 300 of file plugop.cpp. 00302 { 00303 // Try to create the OpDescriptor 00304 PlugInOpDescriptor* pOpDesc = new PlugInOpDescriptor(OpToken, NewMenuText, pClass, gs); 00305 if (pOpDesc == NULL) 00306 return FALSE; 00307 00308 return TRUE; 00309 }
|