#include <menuops.h>
Inheritance diagram for OpExit:
Public Member Functions | |
OpExit () | |
Constructs a new opExit object: setting default operation flags, and adding it to the Live list. | |
void | Do (OpDescriptor *) |
Actually "DO" a Exit Application operation. | |
Static Public Member Functions | |
static BOOL | Init () |
Create an OpDescriptor for the EXIT operation. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
Find the state of the OpExit operation. |
Definition at line 281 of file menuops.h.
|
Constructs a new opExit object: setting default operation flags, and adding it to the Live list.
Definition at line 755 of file menuops.cpp. 00755 : Operation() 00756 { 00757 // We don't show the progress indicator cos it may have been destroyed 00758 OpFlags.HasOwnTimeIndicator = TRUE; 00759 }
|
|
Actually "DO" a Exit Application operation.
Reimplemented from Operation. Definition at line 781 of file menuops.cpp. 00782 { 00783 00784 // CGS: we need to clear out all intermediate blend steps .... 00785 // NOTE: this clears out all 'built-up' intermediate data 00786 // it clears out both 'render' and 'becomea' 00787 00788 NodeGroup::KillAllBlendBecomeAConsLists (TRUE); 00789 00790 GetApplication ()->ResetRealDownload (); // how dare they! 00791 00792 // This op is not related to a document. 00793 pOurDoc = NULL; 00794 00795 PORTNOTE("other","Removed InternetManager usage") 00796 #ifndef EXCLUDE_FROM_XARALX 00797 // InternetManager::OnExitInstance(); // this should be called as early as possible 00798 #endif 00799 00800 ExitAction(); 00801 00802 End(); 00803 }
|
|
Find the state of the OpExit operation.
Definition at line 687 of file menuops.cpp. 00688 { 00689 PORTNOTE("other","Removed OLE usage") 00690 #ifndef EXCLUDE_FROM_XARALX 00691 #if (_OLE_VER >= 0x200) 00692 00693 // Get the user's document, if any. 00694 Document* pKernelDoc = Document::GetSelected(); 00695 CCamDoc* pOilDoc = (pKernelDoc != 0) ? pKernelDoc->GetOilDoc() : 0; 00696 00697 // Get the associated OpDescriptor. 00698 OpDescriptor* pDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_EXIT); 00699 ERROR3IF(!pDesc, "Null OpDescriptor* in OpExit::GetState"); 00700 00701 // Is the selected document embedded in an OLE container etc? 00702 if (pOilDoc && pOilDoc->IsServer()) 00703 { 00704 // The selected document is embedded, we know the specific container. 00705 UIDescription->MakeMsg(_R(IDS_FILE_EXIT_AND_RETURN), 00706 (LPCTSTR) pOilDoc->GetContainerName()); 00707 } 00708 else if (CCamSrvrItem::HowMany() > 0) 00709 { 00710 // Are there any embedded docs? 00711 POSITION posTpl = AfxGetApp()->GetFirstDocTemplatePosition(); 00712 CDocTemplate* pTemplate = AfxGetApp()->GetNextDocTemplate(posTpl); 00713 POSITION posDoc = pTemplate->GetFirstDocPosition(); 00714 while (posDoc) 00715 { 00716 // Skip docs that aren't active OLE items. 00717 CCamDoc* pDoc = (CCamDoc*) pTemplate->GetNextDoc(posDoc); 00718 if (pDoc->IsServer()) 00719 { 00720 // The selected document is not embedded but some other is, 00721 // we know only the word 'host' for this ... 00722 UIDescription->MakeMsg(_R(IDS_FILE_EXIT_AND_RETURN), 00723 (LPCTSTR) String_64(_R(IDS_DEFAULT_HOST_NAME))); 00724 break; 00725 } 00726 } 00727 00728 } 00729 00730 #endif 00731 #endif 00732 00733 // This option is always available. 00734 return OpState(FALSE, FALSE); 00735 }
|
|
Create an OpDescriptor for the EXIT operation.
Reimplemented from SimpleCCObject. Definition at line 822 of file menuops.cpp. 00823 { 00824 return (RegisterOpDescriptor(0, 00825 _R(IDS_APP_EXIT), 00826 CC_RUNTIME_CLASS(OpExit), 00827 OPTOKEN_EXIT, 00828 OpExit::GetState, 00829 HID_APP_EXIT, 00830 _R(IDBBL_EXITOP), 00831 _R(IDD_BARCONTROLSTORE), /* resource ID */ 00832 _R(IDC_BTN_FILEEXIT) /* control ID */ 00833 ) 00834 ); 00835 }
|