#include <prvwmenu.h>
Inheritance diagram for OpPreviewPopupCommand:
Public Member Functions | |
virtual void | Do (OpDescriptor *pOpDesc) |
Passes the token of the selected menu command to the dialog so it can be handled there. | |
Static Public Member Functions | |
static BOOL | Init (void) |
Registeres all the menu operations by calling InitPolymorphicCommand. | |
static OpState | GetCommandState (String_256 *ShadeReason, OpDescriptor *pOpDesc) |
For finding OpPreviewPopupCommand's state. Used only to tick the proper tool, depending on the current mode. | |
Static Public Attributes | |
static BitmapExportPreviewDialog * | m_pDialog = NULL |
Static Protected Member Functions | |
static BOOL | InitPolymorphicCommand (TCHAR *OpToken, UINT32 MenuTextID) |
Registeres a menu operation. | |
Private Member Functions | |
CC_DECLARE_DYNCREATE (OpPreviewPopupCommand) |
Definition at line 144 of file prvwmenu.h.
|
|
|
Passes the token of the selected menu command to the dialog so it can be handled there.
Reimplemented from Operation. Definition at line 267 of file prvwmenu.cpp. 00268 { 00269 // get the token 00270 String_256 s(pOpDesc->Token); 00271 00272 // ask the dialog to handle it 00273 m_pDialog->DoCommand(&s); 00274 00275 End(); 00276 }
|
|
For finding OpPreviewPopupCommand's state. Used only to tick the proper tool, depending on the current mode.
Definition at line 238 of file prvwmenu.cpp. 00239 { 00240 OpState OpSt; 00241 OpSt.Greyed = FALSE; //always active 00242 // tick either the push or the zoom tool depending on the current mode 00243 if (((pOpDesc->Token == String_256(OPTOKEN_PREVIEW_PUSH_TOOL)) && 00244 (m_pDialog->GetCurrentTool() == PREVIEW_PUSH_TOOL)) || 00245 ((pOpDesc->Token == String_256(OPTOKEN_PREVIEW_ZOOM_TOOL)) && 00246 (m_pDialog->GetCurrentTool() == PREVIEW_ZOOM_TOOL)) || 00247 ((pOpDesc->Token == String_256(OPTOKEN_PREVIEW_COLOUR_SELECTOR_TOOL)) && 00248 (m_pDialog->GetCurrentTool() == PREVIEW_COLOUR_SELECTOR_TOOL))) 00249 OpSt.Ticked = TRUE; 00250 00251 return (OpSt); 00252 }
|
|
Registeres all the menu operations by calling InitPolymorphicCommand.
Reimplemented from SimpleCCObject. Definition at line 203 of file prvwmenu.cpp. 00204 { 00205 InitPolymorphicCommand(OPTOKEN_PREVIEW_ZOOM_TOOL, _R(IDS_MENU_ZOOM)); 00206 InitPolymorphicCommand(OPTOKEN_PREVIEW_PUSH_TOOL, _R(IDS_MENU_PUSH)); 00207 InitPolymorphicCommand(OPTOKEN_PREVIEW_COLOUR_SELECTOR_TOOL, _R(IDS_MENU_SELECTOR)); 00208 InitPolymorphicCommand(OPTOKEN_PREVIEW_ZOOM_TO_FIT, _R(IDS_MENU_FIT)); 00209 InitPolymorphicCommand(OPTOKEN_PREVIEW_ZOOM_TO_100, _R(IDS_MENU_100)); 00210 InitPolymorphicCommand(OPTOKEN_PREVIEW_1TO1, _R(IDS_MENU_1TO1)); 00211 InitPolymorphicCommand(OPTOKEN_PREVIEW_HELP, _R(IDS_PREVIEW_MENU_HELP)); 00212 00213 return (TRUE); 00214 }
|
|
Registeres a menu operation.
Definition at line 169 of file prvwmenu.cpp. 00170 { 00171 return(RegisterOpDescriptor(0, // Tool ID 00172 MenuTextID, // String resource ID 00173 CC_RUNTIME_CLASS(OpPreviewPopupCommand),// Runtime class 00174 OpToken, // Token string 00175 OpPreviewPopupCommand::GetCommandState, // GetState function 00176 0, // help ID 00177 0, // bubble help 00178 0, // resource ID 00179 0, // control ID 00180 SYSTEMBAR_ILLEGAL, // Bar ID 00181 FALSE, // Receive system messages 00182 FALSE, // Smart duplicate operation 00183 TRUE, // Clean operation 00184 NULL, // No vertical counterpart 00185 0, // String for one copy only error 00186 DONT_GREY_WHEN_SELECT_INSIDE // Auto state flags 00187 )); 00188 }
|
|
Definition at line 166 of file prvwmenu.h. |