#include <plugop.h>
Inheritance diagram for PlugInOpDescriptor:
Public Member Functions | |
PlugInOpDescriptor (const TCHAR *pcszToken, const String_64 &NewMenuText, CCRuntimeClass *pClass=CC_RUNTIME_CLASS(PlugInOp), pfnGetState gs=PlugInOp::GetState) | |
Constructs the new PlugInOpDescriptor. | |
virtual BOOL | GetText (String_256 *Description, OpTextFlags WhichText) |
This function will use the TextID and ModuleID values to obtain a String resource describing an operation. String resources may have one or more text descriptions in them, therefore, a TextFlag can be used to identify the the appropriate text required. | |
Static Public Member Functions | |
static OpState | GetState (String_256 *psName, OpDescriptor *pOpDesc) |
Returns the state that this operation should appear in the menus or as a buttom, for example - greyed out, or ticked. | |
Protected Attributes | |
String_64 | m_MenuText |
Private Member Functions | |
CC_DECLARE_DYNAMIC (PlugInOpDescriptor) |
Definition at line 190 of file plugop.h.
|
Constructs the new PlugInOpDescriptor.
Definition at line 140 of file plugop.cpp. 00142 : OpDescriptor( 0, // tool ID 00143 _R(IDS_PHOTOSHOP_PLUGIN), // String resource ID (use same for all) 00144 pClass, //CC_RUNTIME_CLASS(PlugInOp), // Runtime class 00145 (TCHAR*) pcszToken, // OpToken 00146 gs, // GetState function 00147 NULL, // help ID 00148 NULL, // bubble help 00149 NULL, // resource ID 00150 NULL, // control ID 00151 TRUE, // Recieve system messages 00152 FALSE, // Smart duplicate operation 00153 TRUE, // Clean operation 00154 NULL, // String for one copy only error 00155 (DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC) // Auto state flags 00156 ) 00157 { 00158 m_MenuText = NewMenuText; 00159 }
|
|
|
|
Returns the state that this operation should appear in the menus or as a buttom, for example - greyed out, or ticked.
Definition at line 178 of file plugop.cpp. 00179 { 00180 // At present, this item is always available. 00181 OpState OpSt; 00182 return OpSt; 00183 }
|
|
This function will use the TextID and ModuleID values to obtain a String resource describing an operation. String resources may have one or more text descriptions in them, therefore, a TextFlag can be used to identify the the appropriate text required.
Reimplemented from OpDescriptor. Definition at line 209 of file plugop.cpp. 00210 { 00211 String_256 ResourceText = m_MenuText; // ( TextID, ModuleID ); 00212 // This string should contain various elements for each part of the apply, undo, redo text 00213 // each separated by a semi colon. So we will fake this up in the string using the 00214 // text that we will have set, which is the plug-in name on the menu, for the apply name. 00215 ResourceText += ";"; // DO NOT internationlise this! 00216 ResourceText += m_MenuText; // add undo text 00217 ResourceText += ";"; // DO NOT internationlise this! 00218 ResourceText += m_MenuText; // add redo text 00219 00220 TCHAR* ok = NULL; 00221 00222 // The rest is the same as the main OpDescriptor... 00223 00224 // Explicitly cast return value from GetDescription from a TCHAR* to a String_256 00225 ok = GetDescription((TCHAR*) ResourceText, WhichText); 00226 00227 // if description is found then return true else return false 00228 if (ok) 00229 { 00230 *Description = String_256(ok); 00231 return TRUE; 00232 } 00233 else 00234 return FALSE; 00235 }
|
|
|