OpClipboardExport Class Reference

#include <clipext.h>

Inheritance diagram for OpClipboardExport:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

virtual void DoWithParam (OpDescriptor *, OpParam *pOpParam)
 Exports the current contents of the InternalClipoard onto the Windows clipboard.
virtual void Do (OpDescriptor *pOpDesc)
 Saves the Current Doc as the default document.

Static Public Member Functions

static BOOL Init ()
 Registers our OpDescriptor.
static OpState GetState (String_256 *, OpDescriptor *)
 Yet another empty OpState function.

Detailed Description

Definition at line 322 of file clipext.h.


Member Function Documentation

void OpClipboardExport::Do OpDescriptor pOpDesc  )  [virtual]
 

Saves the Current Doc as the default document.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/3/95
Parameters:
pOpDesc - the OpDescriptor that called this op [INPUTS]

Reimplemented from Operation.

Definition at line 1964 of file clipext.cpp.

01965 {
01966     ERROR3("Don't invoke OpClipboardExport with Do. I don't like it");
01967 }

void OpClipboardExport::DoWithParam OpDescriptor ,
OpParam pOpParam
[virtual]
 

Exports the current contents of the InternalClipoard onto the Windows clipboard.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/4/95
Parameters:
OpDescriptor - Not Used [INPUTS]
pOpParam->Param1 - a (ClipboardMapping *) to control the process pOpParam->Param2 - unused (should be 0)

Reimplemented from Operation.

Definition at line 1897 of file clipext.cpp.

01898 {
01899     // Ensure we put any undo information into the clipboard document, not the selected doc!
01900     pOurDoc = InternalClipboard::Instance();
01901 
01902     // Get a clipboard view to be used during the export
01903     View* OldView = View::GetCurrent();
01904     ClipboardView *View = new ClipboardView;
01905     if (View == NULL || !View->Init())
01906     {
01907         if (View != NULL)
01908             delete View;
01909 
01910         End();
01911         return;
01912     }
01913 
01914     pOurView = View;
01915     View->SetCurrent();
01916 
01917 #if (_OLE_VER >= 0x200)
01918 
01919     // Get the operation parameters and do the export.
01920     OpClipboardExportParams* pprm = (OpClipboardExportParams*) pOpParam->Param1;
01921     
01922     // Tell the clipboard which memory to use, or to allocate, and the document.
01923     pprm->pMapping->SetRenderMemory(pprm->hMem, pprm->cbMemSize);
01924     pprm->pMapping->SetDocument(pprm->pDoc);
01925     
01926     // Do the export into the memory.  Save the memory handle and size into the parameters
01927     // in case HandleExport allocated the memory.
01928     pprm->hMem = pprm->pMapping->HandleExport(this, InternalClipboard::Instance());
01929     pprm->cbMemSize = ::GlobalSize(pprm->hMem);
01930 
01931 #else
01932 
01933     // Export the data to the global memory block
01934     ClipboardMapping* pMapping = (ClipboardMapping*) pOpParam->Param1;
01935     HANDLE hData = pMapping->HandleExport(this, InternalClipboard::Instance());
01936 
01937     // And finally, chuck the data (if any) on the external clipboard
01938     if (hData != NULL) ::SetClipboardData(pMapping->ExternalDataType, hData);
01939 
01940 #endif
01941 
01942     // Restore the old view
01943     pOurView = NULL;
01944 
01945     if (OldView != NULL) OldView->SetCurrent();
01946     delete View;
01947     End();
01948 }

OpState OpClipboardExport::GetState String_256 ,
OpDescriptor
[static]
 

Yet another empty OpState function.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/4/95

Definition at line 2007 of file clipext.cpp.

02008 {
02009     OpState Bob;
02010     return Bob;
02011 }

BOOL OpClipboardExport::Init void   )  [static]
 

Registers our OpDescriptor.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/4/95
Returns:
TRUE if it worked, FALSE if not

Reimplemented from SimpleCCObject.

Definition at line 1984 of file clipext.cpp.

01985 {
01986     return (RegisterOpDescriptor(
01987                                 0,
01988                                 _R(IDS_CLIPBOARD_OPEXPORT),
01989                                 CC_RUNTIME_CLASS(OpClipboardExport),
01990                                 OPTOKEN_CLIPBOARDEXPORT,
01991                                 OpClipboardExport::GetState
01992                                 ));
01993 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:57:43 2007 for Camelot by  doxygen 1.4.4