#include <colmenu.h>
Inheritance diagram for OpColEditCommand:
Public Member Functions | |
virtual void | Do (OpDescriptor *pOpDesc) |
The nudge op's Do() function. | |
Static Public Member Functions | |
static BOOL | Init (void) |
OpColEditCommand initialiser method. | |
static OpState | GetCommandState (String_256 *ShadeReason, OpDescriptor *pOpDesc) |
For finding OpColEditCommand's state. | |
Static Protected Member Functions | |
static BOOL | InitPolymorphicCommand (StringBase *OpToken, UINT32 MenuTextID) |
Given a command OpToken, this creates a new OpDescriptor for the OpColEditCommand Op. This in turn will provide an Upcall to the Editor containing the given command string, whenever the Op is invoked. | |
Private Member Functions | |
CC_DECLARE_DYNCREATE (OpColEditCommand) |
Definition at line 163 of file colmenu.h.
|
|
|
The nudge op's Do() function.
Reimplemented from Operation. Definition at line 329 of file colmenu.cpp. 00330 { 00331 if (ColourEditDlg::TheEditor != NULL) 00332 ColourEditDlg::TheEditor->DoCommand(&pOpDesc->Token); 00333 00334 End(); 00335 }
|
|
For finding OpColEditCommand's state.
Definition at line 300 of file colmenu.cpp. 00301 { 00302 if (ColourEditDlg::TheEditor != NULL) 00303 return(ColourEditDlg::TheEditor->GetCommandState(&pOpDesc->Token, UIDescription)); 00304 00305 // else return a "safe" shaded state 00306 OpState OpSt; 00307 OpSt.Greyed = TRUE; 00308 *UIDescription = String_256(_R(IDS_K_COLMENU_NOEDITOR)); 00309 return (OpSt); 00310 }
|
|
OpColEditCommand initialiser method.
Reimplemented from SimpleCCObject. Definition at line 262 of file colmenu.cpp. 00263 { 00264 #ifdef WEBSTER 00265 InitPolymorphicCommand((StringBase *) &ColCmd_NewNColour, _R(IDS_NEWCOLOUR)); 00266 #endif // WEBSTER 00267 InitPolymorphicCommand((StringBase *) &ColCmd_Name, _R(IDS_SGMENU_RENAME)); 00268 InitPolymorphicCommand((StringBase *) &ColCmd_EditParent, _R(IDS_COLMENU_EDITPARENT)); 00269 00270 InitPolymorphicCommand((StringBase *) &ColCmd_HSV, _R(IDS_COLMODEL_HSVT)); 00271 InitPolymorphicCommand((StringBase *) &ColCmd_RGB, _R(IDS_COLMODEL_RGBT)); 00272 InitPolymorphicCommand((StringBase *) &ColCmd_CMYK, _R(IDS_COLMODEL_CMYK)); 00273 InitPolymorphicCommand((StringBase *) &ColCmd_Grey, _R(IDS_COLMODEL_GREY)); 00274 00275 InitPolymorphicCommand((StringBase *) &ColCmd_Help, _R(IDS_COLMENU_HELP)); 00276 00277 return (TRUE); 00278 }
|
|
Given a command OpToken, this creates a new OpDescriptor for the OpColEditCommand Op. This in turn will provide an Upcall to the Editor containing the given command string, whenever the Op is invoked.
Definition at line 221 of file colmenu.cpp. 00222 { 00223 return(RegisterOpDescriptor(0, // Tool ID 00224 MenuTextID, // String resource ID 00225 CC_RUNTIME_CLASS(OpColEditCommand), // Runtime class 00226 (TCHAR *) (*OpToken), // Token string 00227 OpColEditCommand::GetCommandState, // GetState function 00228 0, // help ID 00229 0, // bubble help 00230 0, // resource ID 00231 0, // control ID 00232 SYSTEMBAR_ILLEGAL, // Bar ID 00233 FALSE, // Recieve system messages 00234 FALSE, // Smart duplicate operation 00235 TRUE, // Clean operation 00236 NULL, // No vertical counterpart 00237 0, // String for one copy only error 00238 DONT_GREY_WHEN_SELECT_INSIDE // Auto state flags 00239 )); 00240 }
|