nativeop.cpp File Reference

(r1785/r1461)

#include "camtypes.h"
#include "nativeop.h"
#include "native.h"
#include "nativeps.h"
#include "filedlgs.h"
#include <stdlib.h>
#include <errno.h>
#include "webop.h"
#include "bubbleid.h"
#include "tmplmngr.h"
#include "fileutil.h"
#include "camdoc.h"
#include "sgliboil.h"
#include "menuops.h"

Go to the source code of this file.

Defines

#define new   CAM_DEBUG_NEW

Functions

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


Define Documentation

#define new   CAM_DEBUG_NEW
 

Definition at line 143 of file nativeop.cpp.


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