nativeop.h File Reference

(r1785/r1282)

Go to the source code of this file.

Classes

struct  NativeFileOpParams
class  OpMenuLoad
 Imports the specified file as NativeEPS. More...
class  OpMenuSave
 Saves the document to the file specified in the params to the disk using the NativeEPS format. More...
class  OpSaveAsNativeV1
 Saves the document to the file specified in the params to the disk using the Version 1 Native format i.e. Native EPS. More...

Defines

#define OPTOKEN_NATIVELOAD   wxT("NativeLoad")
#define OPTOKEN_NATIVESAVE   wxT("NativeSave")
#define OPTOKEN_SAVEASNATIVEV1   wxT("SaveAsNativeV1")
#define OPTOKEN_SAVEASDEFAULT   wxT("SaveAsDefault")

Functions

BOOL InvokeNativeFileOp (const TCHAR *pOpName, CCLexFile *pFile, UINT32 nPrefFilter)
 Shorthand for invoking the native file Operations.


Define Documentation

#define OPTOKEN_NATIVELOAD   wxT("NativeLoad")
 

Definition at line 108 of file nativeop.h.

#define OPTOKEN_NATIVESAVE   wxT("NativeSave")
 

Definition at line 109 of file nativeop.h.

#define OPTOKEN_SAVEASDEFAULT   wxT("SaveAsDefault")
 

Definition at line 111 of file nativeop.h.

#define OPTOKEN_SAVEASNATIVEV1   wxT("SaveAsNativeV1")
 

Definition at line 110 of file nativeop.h.


Function Documentation

BOOL InvokeNativeFileOp const TCHAR pOpName,
CCLexFile pFile,
UINT32  nPrefFilter
 

Shorthand for invoking the native file Operations.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/8/96
Parameters:
pOpName - the OPTOKEN of the Operation to invoke on pFile. [INPUTS] pFile - pointer to the CCLexFile to use for this operation. nPrefFilter - the filter to use to import the native file, usually FILTERID_GENERIC. Set to -1 to use the last known filter the user selected in a file dialog.
Returns:
TRUE if the Operation is performed successfully, FALSE if it can't be found or performed.
See also:
OpMenuLoad; OpMenuSave; CCFile; Operation; OpDescriptor; OpParam

Definition at line 163 of file nativeop.cpp.

00164 {
00165     // Find the requested Operation.
00166     OpDescriptor* pOp = OpDescriptor::FindOpDescriptor((TCHAR*) pOpName);
00167     if (pOp == 0)
00168     {
00169         ERROR3("Can't find OpDescriptor in InvokeNativeFileOp");
00170         return FALSE;
00171     }
00172 
00173     // Build the parameter block.
00174     NativeFileOpParams pm;
00175     pm.pFile = pFile;
00176     pm.fStatus = FALSE;
00177     pm.nPrefFilter = nPrefFilter;
00178 
00179     // Invoke it with the given parameters, returning its status.
00180     OpParam             param( &pm, INT32(0) );
00181     pOp->Invoke( &param );
00182     return pm.fStatus;
00183 }


Generated on Sat Nov 10 03:49:15 2007 for Camelot by  doxygen 1.4.4