PreviewFilter Class Reference

The filter's sole purpose is to hold the PreviewBitmapSize static. It can not import, export or appear on a menu. Notes: 20/01/97 This class used to be derived from AccusoftFilters (but prob never should have been). All other preview filters were derived from this, but are now derived from their respectively similar file filter i.e. PreviewFilterBMP is derived from BMPFilter. This causes a problem with FILTERIDs cos FILTERID_PREVIEW_TIFF is defined to be the same as FILTERID_PREVIEW obviously this won't work now that the filters are not all derived from PreviewFilter. More...

#include <prvwflt.h>

Inheritance diagram for PreviewFilter:

Filter ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 PreviewFilter ()
 Constructor for an PreviewFilter object. The object should be initialised to put it in the filter list, but NEVER used for anything.
BOOL Init ()
 Initialise a PreviewFilter object.
virtual INT32 HowCompatible (PathName &, ADDR, UINT32, UINT32)
 Override pure virtual function so we can have an instance of this object.
virtual BOOL DoImport (SelOperation *, CCLexFile *, Document *, BOOL AutoChosen=FALSE, ImportPosition *Pos=NULL, KernelBitmap **ppImportedBitmap=NULL, DocCoord *pPosTranslate=NULL, String_256 *=NULL)
 Override pure virtual function so we can have an instance of this object.
virtual BOOL DoExport (Operation *, CCLexFile *, PathName *, Document *, BOOL)
 Override pure virtual function so we can have an instance of this object.

Static Public Attributes

static MILLIPOINT PreviewBitmapSize = 96000
 Allows people to set the approximate size of the Preview bitmap that can be included in Camelot Native EPS files and Camelot EPS files. It is measured in Millipoints and defaults to 96000 (about 128 pixels or just over an inch).

Private Member Functions

 CC_DECLARE_DYNAMIC (PreviewFilter)

Detailed Description

The filter's sole purpose is to hold the PreviewBitmapSize static. It can not import, export or appear on a menu. Notes: 20/01/97 This class used to be derived from AccusoftFilters (but prob never should have been). All other preview filters were derived from this, but are now derived from their respectively similar file filter i.e. PreviewFilterBMP is derived from BMPFilter. This causes a problem with FILTERIDs cos FILTERID_PREVIEW_TIFF is defined to be the same as FILTERID_PREVIEW obviously this won't work now that the filters are not all derived from PreviewFilter.

Author:
Martin_Bell (Xara Group Ltd) <camelotdev@xara.com>
Date:
01/01/97

Definition at line 133 of file prvwflt.h.


Constructor & Destructor Documentation

PreviewFilter::PreviewFilter  ) 
 

Constructor for an PreviewFilter object. The object should be initialised to put it in the filter list, but NEVER used for anything.

Author:
Martin_Bell (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/01/97
See also:
PreviewFilter::Init

Definition at line 165 of file prvwflt.cpp.

00165                              : Filter()
00166 {
00167     ImportMsgID = _R(IDN_IMPORTMSG_TIFF);   // the preview used to be a TIFF ?don't know what to do?
00168     
00169     // Set it up so that it can neither Import or Export so that it does not appear in the
00170     // Filter menus.
00171     Flags.CanImport = FALSE;
00172     Flags.CanExport = FALSE;
00173     FilterID = FILTERID_PREVIEW;
00174 
00175     ExportMsgID = _R(IDS_BUILDINGPREVIEW);
00176 }


Member Function Documentation

PreviewFilter::CC_DECLARE_DYNAMIC PreviewFilter   )  [private]
 

BOOL PreviewFilter::DoExport Operation pOp,
CCLexFile pFile,
PathName pPath,
Document pDoc,
BOOL  ShowOptions
[virtual]
 

Override pure virtual function so we can have an instance of this object.

Author:
Martin_Bell (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/01/97
Parameters:
Are all ignored [INPUTS] pOp - the operation that started the export off pDiskFile - the file to put the exported data into pPath - the pathname of the file to be exported to pDoc - the document to export ShowOptions - Show the export options dialogue?
Returns:
FALSE because we don't do any thing.

Reimplemented from Filter.

Definition at line 277 of file prvwflt.cpp.

00280 {
00281     ERROR3( "PreviewFilter::DoExport called\n");
00282 
00283     return FALSE;
00284 }

BOOL PreviewFilter::DoImport SelOperation Op,
CCLexFile pFile,
Document DestDoc,
BOOL  AutoChosen = FALSE,
ImportPosition Pos = NULL,
KernelBitmap **  ppImportedBitmap = NULL,
DocCoord pPosTranslate = NULL,
String_256 URL = NULL
[virtual]
 

Override pure virtual function so we can have an instance of this object.

Author:
Martin_Bell (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/01/97
Parameters:
Are all ignored [INPUTS] Op - pointer to the operation that this input process is associated with. pFile - The file that we should load the bitmap from DestDoc - The Document object which should hold the data read in from the bitmap. URL - original URL of the imported file
Returns:
FALSE because we don't do any thing.

Reimplemented from Filter.

Definition at line 250 of file prvwflt.cpp.

00253 {
00254     ERROR3( "PreviewFilter::DoImport called\n");
00255 
00256     return FALSE;
00257 }

INT32 PreviewFilter::HowCompatible PathName Filename,
ADDR  HeaderStart,
UINT32  HeaderSize,
UINT32  FileSize
[virtual]
 

Override pure virtual function so we can have an instance of this object.

Author:
Martin_Bell (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/01/97
Parameters:
Are all ignored [INPUTS] Filename - name of the file. HeaderStart - Address of the first few bytes of the file. HeaderSize - the number of bytes in the header pointed to by FileStart. FileSize - the size of the whole file, in bytes.
Returns:
0 = not compatible with anything.

Reimplemented from Filter.

Definition at line 223 of file prvwflt.cpp.

00225 {
00226     //TRACEUSER( "Martin", __FILE__ "(%d) : warning: PreviewFilter::HowCompatible called\n", __LINE__ );
00227     // Not compatible with anything.
00228     return 0;
00229 }

BOOL PreviewFilter::Init void   )  [virtual]
 

Initialise a PreviewFilter object.

Author:
Martin_Bell (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/01/97
Returns:
TRUE if the filter was initialised ok, FALSE otherwise.

Errors: Will fail if not enough memory to initialise.

See also:
EPSStack; BMPFilter::Init()

Implements Filter.

Definition at line 191 of file prvwflt.cpp.

00192 {
00193     // Get an OILFilter object
00194     pOILFilter = new OILFilter(this);
00195     if (pOILFilter==NULL)
00196         return FALSE;
00197 
00198     // Load the description strings
00199     FilterName.Load(_R(IDN_FILTERNOTPRESENT));
00200 
00201     // All ok
00202     return TRUE;
00203 }


Member Data Documentation

MILLIPOINT PreviewFilter::PreviewBitmapSize = 96000 [static]
 

Allows people to set the approximate size of the Preview bitmap that can be included in Camelot Native EPS files and Camelot EPS files. It is measured in Millipoints and defaults to 96000 (about 128 pixels or just over an inch).

Preference: PreviewBitmapSize Section: Filters Range: 1 to INT_MAX

Definition at line 155 of file prvwflt.h.


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