#include <camfiltr.h>
Inheritance diagram for BaseCamelotFilter:

Public Member Functions | |
| BaseCamelotFilter () | |
| Constructor for the base Camelot save/load filter off which are derived the v2 native file and web filters. This filter provides common functionality for these derived filters. | |
| ~BaseCamelotFilter () | |
| Tidies up when the filter is destroyed. | |
| virtual BOOL | Init () |
| Initalises the Filter ready for use. Will fail if it can not get enough memory to work with. This is the base class filter and so should be overridden by the derived classes. | |
| virtual void | Deinit () |
| Deinits the filter when the program shuts down. | |
| virtual INT32 | HowCompatible (PathName &Filename, ADDR HeaderStart, UINT32 HeaderSize, UINT32 FileSize) |
| virtual INT32 | HowCompatibleIsFileType (char *pFileType)=0 |
| virtual BOOL | DoExport (Operation *, CCLexFile *, PathName *, Document *, BOOL) |
| Exports the current document out to file. Uses the virtual functions of this class. Do not override unless really necessary. | |
| virtual BOOL | DoImport (SelOperation *, CCLexFile *, Document *, BOOL AutoChosen=FALSE, ImportPosition *Pos=NULL, KernelBitmap **ppImportedBitmap=NULL, DocCoord *pPosTranslate=NULL, String_256 *=NULL) |
| Read the data from the specified file. | |
| virtual BOOL | IsWebFilter ()=0 |
| virtual BOOL | IsCompactNativeFilter ()=0 |
| virtual BOOL | IsImporting () |
| Used to see if the doc is being imported into an existing doc, loaded into a fresh doc. | |
| virtual BOOL | IsImportingAtPosition () |
| This will return TRUE only if we are importing into an existing doc AND at a specific position. | |
| virtual BOOL | IsDefaultDocRequired (const TCHAR *pcszPathName) |
| Works out if opening a file of this type requires a default document to be loaded. If the file format supplies the document then return FALSE otherwise return TRUE. An example would be opening a bitmap file. This has no document defined in the file format and so we need to load the default document before importing the bitmap into this file. In this baseclass version return FALSE and hence assume that the filters that need to will override this function to return TRUE. | |
| virtual INT32 | GetMaxPathLookUp () |
| The max number pf paths that should be looked at by the function FindSimilarPath(). | |
| INT32 | StartRecord (UINT32 Tag, INT32 Size) |
| INT32 | StartStreamedRecord (UINT32 Tag, INT32 Size) |
| BOOL | EndRecord () |
| BOOL | EndStreamedRecord () |
| UINT32 | GetRecordTag () |
| INT32 | GetRecordNum () |
| void | SetCoordOrigin (const DocCoord &Origin) |
| Sets the origin for all coords that are written to or read from the file. | |
| DocCoord | GetCoordOrigin () |
| The Get function. | |
| BOOL | Write (BYTE b) |
| BOOL | Write (UINT32 n) |
| BOOL | Write (INT32 n) |
| BOOL | Write (const DocCoord &Coord) |
| BOOL | Write (TCHAR *pStr) |
| BOOL | Write (BYTE *pBuf, UINT32 BufSize) |
| BOOL | Write (FLOAT f) |
| BOOL | WriteWCHAR (WCHAR w) |
| BOOL | WriteASCII (TCHAR *pStr) |
| BOOL | WriteUnicode (TCHAR *pStr) |
| BOOL | WriteZeroSizedRecord (UINT32 Tag) |
| Helper function that makes it easy to write out a zero-sized record. | |
| UINT32 | Write (CXaraFileRecord *pRecord) |
| UINT32 | WriteDefinitionRecord (CXaraFileRecord *pRecord) |
| BOOL | WriteCCPanose (const CCPanose &Panose) |
| INT32 | WriteFontDefinition (WORD FontHandle, BOOL IsBold, BOOL IsItalic) |
| Writes a font definition record to the file, and returns with the record number of the record. | |
| BOOL | WriteBitmapSource (const BitmapSource &Source, UINT32 Height) |
| INT32 | WriteRecord (DocColour *pDocColour) |
| Writes out the given colour to the file, returning the record number. | |
| INT32 | WriteRecord (KernelBitmap *pBitmap) |
| Writes out the given bitmap to the file, returning the record number. | |
| ColourListComponent * | GetColourDocComponent () |
| BitmapListComponent * | GetBitmapDocComponent () |
| UnitListComponent * | GetUnitDocComponent () |
| DocInfoComponent * | GetDocInfoComponent () |
| ViewComponent * | GetViewDocComponent () |
| PrintComponent * | GetPrintComponent () |
| FontComponent * | GetFontComponent () |
| FilePos | GetFilePos () |
| UINT32 | GetNumBytesWritten () |
| virtual Document * | GetDocument () |
| virtual Spread * | GetSpread () |
| virtual void | GotError (UINT32 errorID) |
| Sets an error using the given resource string All it does is call the mirror function in the attached CXaraFile. | |
| virtual void | GotError (UINT32 errorID, const TCHAR *errorString) |
| Sets an error using the given resource string All it does is call the mirror function in the attached CXaraFile. | |
| virtual void | EndOfFile () |
| virtual void | SetTotalNumBytesToRead (UINT32 s) |
| virtual BOOL | InvalidateRegion (Node *pNode) |
| Invalidates the area of the document covered by the node, causing it to redraw. | |
| virtual UINT32 | GetCurrentRecordSize () |
| Function to get the current size of the record that has been read in by the CXaraFile and RecordHandlers and are currently processing. This can be used by streamed record handlers, such as bitmaps, which need to know the size of the recordso that they can update the progress bar size by a proportion of this amount on loading. (Not require on saving as the streamed record handlers can supply what value they like to the progress system and hence update with whatever value they require. | |
| virtual BOOL | InsertNode (Node *pNode) |
| This inserts the given node relative to the current context node. | |
| virtual BOOL | IncInsertLevel () |
| Tells the tree building system that the next nodes should be added to the next level of the tree. | |
| virtual BOOL | DecInsertLevel () |
| Tells the tree building system that the next nodes should be added to the previous level of the tree. | |
| virtual Node * | GetInsertContextNode () |
| Returns the node to add the next node to. | |
| virtual void | SetInsertContextNode (Node *pNode) |
| Sets the context node to the node provided. | |
| virtual void | InsertNextNodeAsChild () |
| This call ensures that the next node inserted via InsertNode() will be inserted as a child of the context node. | |
| virtual void | InsertNextNodeAsSibling () |
| This call ensures that the next node inserted via InsertNode() will be inserted as a sibling of the context node. | |
| virtual InsertTreeContext * | GetInsertContext (void) |
| If you wish to use SetInsertcontextNode to alter where the filter imports to, then chances are you'll want to save & restore the insertion state so that subsequent importing can continue where it left off. If this is the case, bracket your subtree import with code like this: InsertTreeContext *pContext = pFilter->GetInsertContext(); ... import your subtree or whatever ... pFilter->RestoreInsertContext(pContext);. | |
| virtual void | RestoreInsertContext (InsertTreeContext *pOldState) |
| If you wish to use SetInsertcontextNode to alter where the filter imports to, then chances are you'll want to save & restore the insertion state so that subsequent importing can continue where it left off. If this is the case, bracket your subtree import with code like this: InsertTreeContext *pContext = pFilter->GetInsertContext(); ... import your subtree or whatever ... pFilter->RestoreInsertContext(pContext);. | |
| virtual BOOL | IncProgressBarCount (UINT32 n) |
| Func to incrementing the progress bar count. If there is a progress bar available, it is updated by this call. Scope: Protected. | |
| virtual UINT32 | GetProgressBarCount () |
| virtual BOOL | SetTotalProgressBarCount (UINT32 n) |
| Func to set total the progress bar count. If there is a progress bar available, it is updated by this call. Scope: Protected. | |
| virtual WebPrefsDlgParam * | GetCachedExportOptions () |
| BOOL | UnrecognisedTag (UINT32 Tag) |
| Informs the filter that it didn't recognise the given tag. | |
| BOOL | MergeSameNamedLayers () |
| We have imported layers of the same name in the document. Merge these layers together and if these layers are the special rollover layers make these button and bar names unique. See Also: SliceHelper::MeshImportedLayersWithExistingButtonBars. | |
| void | AppendWarning (UINT32 WarningId) |
| Appends a warning saying that it's come across some data it doesn't recognise. This allows the user to be warned about things like:- bitmap definitions not being loaded colour definitions not being loaded. | |
| virtual BOOL | WriteNodes (Node *pNode) |
| This is the main tree traversal routine that writes out the document in the v2 file format. | |
| virtual BOOL | WriteNodeAndSubNodes (Node *pNode) |
| This recursively writes the document, asking each node to write itself out, in the correct renderable order. | |
| virtual BOOL | ReadPostChildren (Node *pNode) |
| Informs a node that all its children have been imported Calls either the Native or Web varient of the function, depending on the type of filter this is. | |
| virtual BOOL | ReadFileUntil (INT32 tag) |
| Reads in the file until the specified tag is hit. | |
| virtual char * | GetExportFileType ()=0 |
| virtual void | SetImportFileType (char *pFileType) |
| Sets the file type of the imported file. | |
| virtual BOOL | IsOpeningMinimalWebFormat () |
| It will only return TRUE if the file is the minimal web format, and we are OPENING the file and NOT importing it into a new document. | |
| SelOperation * | GetImportSelOp () const |
| void | AddAtomicTag (AtomicTagListItem *pItem) |
| Adds the item to the list of atomic tags compiled during import. | |
| void | AddEssentialTag (EssentialTagListItem *pItem) |
| Adds the item to the list of Essential tags compiled during import. | |
| BOOL | IsTagInAtomicList (UINT32 Tag) |
| Searches the atomic tag list to see of the given tag is in the list. | |
| BOOL | IsTagInEssentialList (UINT32 Tag) |
| Searches the Essential tag list to see of the given tag is in the list. | |
| TagDescriptionListItem * | GetTagDescription (UINT32 Tag) |
| Searches the tag description list to see of the given tag is in the list. | |
| virtual void | AddTagDescription (UINT32 Tag, UINT32 ID) |
| Adds the description for the given tag export. | |
| BOOL | SetDocumentNudgeSize (UINT32 newVal) |
| Sets the nudge size for the current document. | |
| virtual void | WriteTagDescriptionRecord () |
| WEBSTER - markn 11/2/97. | |
| BOOL | WriteNudgeSizeRecord () |
| Writes out the documents nudge size. | |
| BOOL | WriteBitmapSmoothingRecord () |
| Writes out the document's bitmap smoothing setting. The first byte is a flags byte. LSB bitmap smoothing flag bits 2-8 reserved There are 4 reserved bytes for future use (other bitmap settings). | |
| BOOL | WriteDuplicationOffsetRecord () |
| Writes out the documents duplication offset. | |
| BOOL | WriteRemainingAtomicTagDefinitions () |
| All compound nodes (e.g. bevels, contours, shadows, clipview) are now defined as being atomic. This is so that they can be backwards compatible with CX2. | |
| UINT32 | WriteXPEBitmapPlaceHolder (String_256 &strBitmapName) |
| Writes out an XPE placeholder record to notify the loader to regenerate the bitmap from the XPE info in the bitmap properties. | |
| virtual BOOL | AddTagDescription (TagDescriptionListItem *pItem) |
| Adds the item to the list of tag descriptions compiled during import or export. | |
| virtual void | AddPathRecordRefToList (NodePath *pNodePath, UINT32 RecordNumber) |
| Adds a path record reference to the list. | |
| virtual UINT32 | FindPathRecordRefRecordNumber (NodePath *pNodePath) |
| Finds the record number for the given path. | |
| virtual NodePath * | FindPathRecordRefPath (UINT32 RecordNumber) |
| Finds the path for the given record number. | |
| virtual BOOL | FindSimilarPath (NodePath *pPath, UINT32 *pOtherPathRecNum, Matrix *pTransform) |
| Finds a similar path to the one provided that has previously been output to the file. | |
| virtual double | GetSimilarPathTolerance (NodePath *pPath)=0 |
| virtual void | AddNodeGroupRefToList (Node *pNode, NodeGroup *pGroup) |
| Adds a text story group reference to the listFinds the group associated with the text storyFinds the text story associated with the groupAdds a node/group reference to the list. | |
| virtual NodeGroup * | FindGroupForThisNode (Node *pNode) |
| Finds the group associated with the node. | |
| virtual BOOL | WriteNodeAsOutlines (Node *pNode) |
| Converts the node into a group of paths, and then outputs that group to the filter. | |
| BOOL | SetLastRecordHandler (CXaraFileRecordHandler *pHandler, UINT32 Tag) |
| Sets the handler used to handle the last record that was imported. It also sets the tag value of the last handled record. | |
| Document * | GetLastDocumentInserted () |
| Chapter * | GetLastChapterInserted () |
| Spread * | GetLastSpreadInserted () |
| Layer * | GetLastLayerInserted () |
| NodePath * | GetLastNodePathInserted () |
| NodeAttribute * | GetLastCurrentAttrInserted () |
| void | SetLastDocumentInserted (Document *pNode) |
| void | SetLastChapterInserted (Chapter *pNode) |
| void | SetLastSpreadInserted (Spread *pNode) |
| void | SetLastLayerInserted (Layer *pNode) |
| void | SetLastNodePathInserted (NodePath *pNode) |
| void | SetLastCurrentAttrInserted (NodeAttribute *pNode) |
| UINT32 | GetDocumentInsertedCount () |
| UINT32 | GetChapterInsertedCount () |
| UINT32 | GetSpreadInsertedCount () |
| UINT32 | GetLayerInsertedCount () |
| UINT32 | GetSetSentinelInsertedCount () |
| void | IncDocumentInsertedCount () |
| void | IncChapterInsertedCount () |
| void | IncSpreadInsertedCount () |
| void | IncLayerInsertedCount () |
| void | IncSetSentinelInsertedCount () |
| virtual void | ExportHTMLTag (PathName *ppthToUse) |
| Exports an HTML tag to the clipboard that can be used in a page of HTML to embed the file that is being exported. | |
| virtual void | SetInsertMode (InsertMode newInsertMode, CCRuntimeClass *pAttrGroup=NULL) |
| Set Mode for AttachNode function. | |
| virtual InsertMode | GetInsertMode () |
| virtual SelectionType | GetSelType () |
| virtual void | SetSelType (SelectionType ThisSelType) |
| virtual Layer * | GetFirstImportedLayer () |
| virtual void | SetFirstImportedLayer (Layer *pLayer) |
| virtual BOOL | SetCompression (BOOL NewState) |
| Function to turn Compression on or off on the underlying CCFile. | |
| virtual BOOL | StartCompression () |
| Function to turn Compression on when we are writing to the file. It asks the underlying CCFile and CXaraFile to start the compression process up. | |
| virtual BOOL | StopCompression () |
| Function to turn Compression off when we are writing to the file. It asks the underlying CCFile and CXaraFile to stop the compression process. | |
| virtual BOOL | SetPreCompression (UINT32 Flags) |
| Sets the precompression used in this file. | |
| virtual UINT32 | GetPreCompression () |
| virtual CCLexFile * | GetCCFile () |
| Function to give public access to the underlying CCFile that is being used to save out the data. Note: only people who have a genuine reason need to access this - e.g. bitmap savers. | |
| virtual INT32 | GetBitmapCompression () |
| Public access to the current bitmap compression which the user has requested to use when saving bitmaps in the web format. 0 means maximum compression e.g. use JPEG filter at 0% lossy compression 100 means minimum compression e.g. use JPEG filter at 100% lossy compression 101 - 200 means lossless compression e.g. us PNG filter. Could use the no bitmap compression at all e.g. use BMP filter. Unused at present. (Very much like the JPEG compression percentage). Note: Virtual so that can be overriden in native filter to save in the proper native state. | |
| virtual INT32 | SetBitmapCompression (INT32 NewBmpComp) |
| Set up a new state for the the current bitmap compression. 200 = no compression, 0 = full compression. (Very much like the JPEG compression percentage). | |
| virtual BOOL | GetPreviewBitmapExport () |
| Public access to the current export preview bitmap which the user has requested to use when saving bitmaps in the web format. True means export a preview bitmap, False means do not. Note: Virtual so that can be overriden in native filter to save in the proper native state. | |
| virtual BOOL | SetPreviewBitmapExport (BOOL NewExportPreviewBmp) |
| Set up a new state for the the current export preview bitmap. True means export a preview bitmap, False means do not. | |
| virtual BOOL | GetConvertTextToOutlines () |
| Public access to the current convert text to outlines which the user has requested to use when saving in the web format. True means convert text to outlines, False means do not. Note: Virtual so that can be overriden in native filter to save in the proper native state. | |
| virtual BOOL | SetConvertTextToOutlines (BOOL NewConvertTextToOutlines) |
| Set up a new state for the the convert text to outlines. True means convert text to outlines, False means do not. | |
| virtual BOOL | GetConvertBlendsToOutlines () |
| Public access to the current convert text to outlines which the user has requested to use when saving in the web format. True means convert blends to outlines, False means do not. | |
| virtual BOOL | SetConvertBlendsToOutlines (BOOL NewConvertBlendsToOutlines) |
| Set up a new state for the the convert blends to outlines. True means convert blends to outlines, False means do not. | |
| virtual BOOL | GetRemoveInvisibleLayers () |
| Public access to the current remove invisible layers which the user has requested to use when saving in the web format. True means remove invisible layers, False means do not. Note: Virtual so that can be overriden in native filter to save in the proper native state. | |
| virtual BOOL | SetRemoveInvisibleLayers (BOOL NewRemoveInvisibleLayers) |
| Set up a new state for the the remove invisible layers. True means remove invisible layers, False means do not. | |
| virtual BOOL | GetRemoveUnusedColours () |
| Public access to the current remove unused colours which the user has requested to use when saving in the web format. True means remove unused colours, False means do not. Note: Virtual so that can be overriden in native filter to save in the proper native state. | |
| virtual BOOL | SetRemoveUnusedColours (BOOL NewRemoveUnusedColours) |
| Set up a new state for the the remove unused colours. True means remove unused colours, False means do not. | |
| virtual BOOL | GetMinimalWebFormat () |
| Public access function. | |
| virtual BOOL | SetMinimalWebFormat (BOOL NewMinimalWebFormat) |
| Set up a new state for the min web format flag. | |
| virtual BOOL | GetSaveXPEBitmaps () |
| Public access function. | |
| virtual BOOL | SetSaveXPEBitmaps (BOOL NewSaveXPEBitmaps) |
| Set up a new state for the save XPE bitmaps flag. | |
| virtual BOOL | ShouldExportHTMLTag () |
| Public access to the HTML to clipboard. | |
| virtual BOOL | SetHTMLToClipboard (BOOL NewHTMLToClipboard) |
| Set a new state for HTMLToClipboard. | |
| virtual String_256 | GetDontConvertTheseFontsToOutlinesString () |
| Access func to that fint list dude. | |
| virtual BOOL | GetNativeCheckSimilarPaths () |
| Public access to the current Native check similar paths flag setting. | |
| virtual MILLIPOINT | GetWebSimilarPathTolerence () |
| Public access to the current Web similar path tolerence setting. It is measured in millipoints. | |
| virtual BOOL | WriteSpecificRegularShapes () |
| virtual BoundsWriteLevel | GetBoundsWriteLevel () |
Static Public Member Functions | |
| static BOOL | SkipToPreviewBitmap (CCLexFile *pFile, BOOL *IsNewNativeFile, UINT32 *pFilterId=NULL) |
| Function used by the gallery thumb nail code to check the file is the native/web format and then get to the preview bitmap record and leave the file pointer sitting at the bitmap image. Assumes file is already opened and ready for reading at the start of the file. Notes: Added pFilterId argument for open dialog Martin-20/01/97. | |
| static BOOL | SkipToIndexInformation (CCLexFile *pFile, String_256 *pString, BOOL *IsNewNativeFile) |
| Function used by the gallery index generation code to check the file is the native/web format and then get to the index information record. Assumes file is already opened and ready for reading at the start of the file. Could share some common functionality with the above but we need speed so just duplicate the code. This function must also be different as we need to use the CXaraFile code as we need to read the string from the document comment record. Hence, we can get this to do some of the work such as checking the id is present etc. | |
| static BOOL | WritePathsInRelativeFormat () |
| static List * | GetRecordHandlers () |
| static BOOL | SetNativeCompression (BOOL NewState) |
| Set the preference as to whether we are to compress the native files or not. | |
| static BOOL | GetNativeCompression () |
| Set the prefernece as to whether we are to compress the native files or not. | |
| static BOOL | ShouldSaveXPEBitmaps () |
| Find out whether we should save XPE bitmap data or just the information needed to rebuild the bitmap. | |
Static Public Attributes | |
| static String_256 | DefaultExportPath |
| String to hold the default path for the optional web export path. | |
| static BOOL | ExportWebFile = TRUE |
| Flag for whether the user has requested to export a web file when native saving. | |
Protected Member Functions | |
| void | AppendIgnoredDataWarning (UINT32 Tag) |
| Appends a warning saying that it's come across some data it doesn't recognise. | |
| void | UnkownEssentialDataError (UINT32 Tag) |
| Errors that a tag is not recognised, yet it is an essential tag (i.e. one that must be recognised in order to load the file correctly). | |
| virtual BOOL | StartProgressBar (String_64 *pMessage) |
| Starts up the progress bar. If it fails it returns FALSE, but it's no problem if you continue - i.e. you shouldn't about import/export just because you can't get a progress bar going. | |
| virtual void | EndProgressBar () |
| If a progress bar already exists, it's deleted. | |
| virtual void | ResetImportExportVars () |
| Resets all the vars that are common to both import & export. This should be the last thing that's called when import/export has finished. | |
| virtual BOOL | PrepareImportExportVars () |
| Prepares all the vars that are common to both import & export. This should be the first thing that's called when import/export starts. | |
| virtual CXaraFile * | CreateCXaraFile () |
| This is a central place where the CXaraFile object is created. It is a virtual func to allow derived classes to create different flavours of CXaraFile. | |
| virtual BaseCamelotFilter * | CreateNULLFilter (Document *pDocument)=0 |
| virtual BOOL | PrepareToExport (CCLexFile *pFile) |
| Gets things ready for the export. This opens the CXaraFile object and writes out the file header. | |
| virtual void | CleanUpAfterExport (BOOL Success) |
| Cleans up the memory allocated by BaseCamelotFilter::PrepareToExport() - used when the export process ends, either normally or abnormally. | |
| virtual BOOL | FindDocComponents () |
| Finds ptrs to all the doc components the filter is interested in. If it can't find all of them, FALSE will be returned. | |
| virtual BOOL | StartExportDocComponents (BOOL BeforeCompression) |
| Tells all the doc components attached to the document that we are about to export to either the web or native file format. | |
| virtual BOOL | EndExportDocComponents (BOOL Success) |
| Tells all the doc components attached to the document that we have finished exporting the document. | |
| virtual BOOL | BeginDocumentExport () |
| This function is called just before document-related records are written out to the file. EndDocumentExport() is called after all the doc records have been saved. | |
| virtual BOOL | EndDocumentExport () |
| This function is called after document-related records have been are written out to the file. BeginDocumentExport() is called before the doc records are saved. | |
| virtual Node * | GetExportNode () |
| Returns a pointer to the first node to export. | |
| virtual BOOL | WriteDocument (Operation *pExportOp) |
| Exports the document pointed to by TheDocument. | |
| virtual BOOL | WritePreChildren (Node *pNode) |
| Asks the node to write itself out. Calls either the Native or Web varient of the function, depending on the type of filter this is. | |
| virtual BOOL | CanWriteChildren (Node *pNode) |
| Asks the node if it's OK to automatically write out its children. Calls either the Native or Web varient of the function, depending on the type of filter this is. | |
| virtual BOOL | WritePostChildren (Node *pNode) |
| Asks the node to write itself out. Calls either the Native or Web varient of the function, depending on the type of filter this is. | |
| virtual BOOL | WriteBeginChildRecords (Node *pNode) |
| Informs a node that its child records are about to be written Calls either the Native or Web varient of the function, depending on the type of filter this is. | |
| virtual BOOL | WriteEndChildRecords (Node *pNode) |
| Informs a node that its child records have been written Calls either the Native or Web varient of the function, depending on the type of filter this is. | |
| virtual BOOL | WriteCurrentAttributes () |
| Write out all current attributes. | |
| virtual BOOL | WriteSelectedNodes (Operation *pExportOp, Node *pNode, SelRange *pSelection) |
| Exports the selection and any additional nodes required, starting from pNode. | |
| virtual BOOL | WriteSelectedLayerAndNodes (Operation *pExportOp, Node *pNode, SelRange *pSelection) |
| Exports a layer node and everything selected below it (i.e. all it's selected children) out through the filter. | |
| virtual BOOL | WriteHeader () |
| Writes out the header record to the file. | |
| virtual BOOL | GetExportOptions (WebPrefsDlgParam *pPrefs) |
| Allows the user to be prompted to get information for export. This overriden version returns True so that nothing happens. Scope: Protected. | |
| virtual OpDescriptor * | GetDialogueOp (void) |
| Obtains a pointer to the OpDescriptor to be used to access the relevant export dialogue. | |
| virtual BOOL | ExportPreviewBitmap (CCLexFile *pFile, Operation *pOp, PathName *pPath, Document *pDoc) |
| Exports a preview bitmap into the file in the correct format. | |
| virtual BOOL | CorrectFileHeader (CCLexFile *pFile) |
| Corrects the file header so that it contains the correct information now that we have correctly reached the end of the file. | |
| virtual UINT32 | CalcExportSize (Document *pDocument) |
| Calcs the number of bytes that will be exported to the file. It is used to maintain a progress display. | |
| BOOL | InitRecordHandlers () |
| Calls all the record handlers via their BeginImport() function. It also registers the list of handlers with the attached CXaraFile object. | |
| BOOL | DeinitRecordHandlers () |
| Calls all the record handlers via their EndImport() function. It also registers the list of handlers with the attached CXaraFile object. | |
| virtual BOOL | PrepareToImport (CCLexFile *pFile) |
| To get this filter ready to import a file. | |
| virtual void | CleanUpAfterImport (BOOL Successful) |
| Happens at the end of the import to allow the filters to clean up after themselves. | |
| virtual BOOL | PrepareTreeBuilding () |
| This does the setting up of the tree building functions (InsertNode(), etc). | |
| virtual void | CleanUpTreeBuilding () |
| This deinits the tree building system. | |
| virtual BOOL | EnsureFrameLayerIntegrity (Spread *pSpread) |
| Happens at the end of the import to allow the layers to be cleaned up. Mainly used by Webster so that we can ensure that frame layers are the order of the day. Do now as the layers are stable and have all their flags present. We cannot decide when we get the layer record as we would need to wait until we have the layer details record. Then this would not be the complete information until we have seen or not seen as the case may be the frame properties record. | |
| virtual BOOL | EnsureLayerIntegrity (Spread *pSpread) |
Happens at the end of the import to allow the layers to be cleaned up. Mainly used by Camelot so that we can see whether we are using a framed document or a layered document. We must check that:-
| |
| virtual BOOL | StartImportDocComponents () |
| Tells all the doc components attached to the document that we are about to Import to either the web or native file format. | |
| virtual BOOL | EndImportDocComponents (BOOL Successful) |
| Tells all the doc components attached to the document that we have finished Importing the document. | |
| virtual BOOL | ReadFile () |
| Reads in the file. | |
| virtual BOOL | SetFileCompressionState (BOOL NewState) |
| Set a new file compression status into action. | |
| virtual BOOL | GetFileCompressionState () |
| Get the current file compression state. True if compressing. | |
| virtual BOOL | AttachNode (Node *pNewNode, Node *pContextNode, AttachNodeDirection Direction) |
| Attachs one node to another. This will attach the node undoably when it has to. At the mo, insertion is only performed undoably when all the following conditions are met:-. | |
Static Protected Member Functions | |
| static BOOL | CreateRecordHandlers () |
| static void | DestroyRecordHandlers () |
| Destroys all the record handlers associated with the camelot v2 file format filters. | |
Protected Attributes | |
| WebPrefsDlgParam * | pPrefs |
| UINT32 | FilterNameID |
| UINT32 | FilterInfoID |
| UINT32 | ExportingMsgID |
| UINT32 | BadFileMsgID |
| FilePos | FileStart |
| FilePos | FileEnd |
| FilePos | FileHeaderRecord |
| UINT32 | FileSize |
| INT32 | CompressionType |
| BOOL | CompressionOn |
| double | FileVersionNumber |
| double | BuildVersionNumber |
| BOOL | EndOfFileFlag |
| BOOL | EscapePressed |
| Node * | pInsertContextNode |
| BOOL | InsertNextAsChild |
| UINT32 | InsertLevel |
| InsertLevelStack * | pInsertLevelStack |
| CXaraFile * | pCXaraFile |
| ColourListComponent * | pColComponent |
| BitmapListComponent * | pBmpComponent |
| UnitListComponent * | pUnitsComponent |
| DocInfoComponent * | pInfoComponent |
| ViewComponent * | pViewComponent |
| PrintComponent * | pPrintComponent |
| FontComponent * | pFontComponent |
| Spread * | pTheSpread |
| struct { | |
| SelOperation * pOp | |
| ImportPosition * pPos | |
| } | ImportInfo |
| UINT32 | ProgressBarCount |
| Progress * | pProgress |
| String_64 | ProgressBarMessage |
| UINT32 | TotalProgressBarCount |
Static Protected Attributes | |
| static List | RecordHandlerList |
| static BOOL | RecordHandlersCreated = FALSE |
| static BOOL | PreviewBitmapExport = FALSE |
| Flag for whether the user has requested a preview bitmap when exporting as a web file. True means do export a preview bitmap. | |
| static INT32 | BitmapCompression = 75 |
| How much compression the user has requested when saving bitmaps. 0 means maximum compression e.g. use JPEG filter at 0% lossy compression 99 means minimum compression e.g. use JPEG filter at 99% lossy compression 101 - 201 means lossless compression e.g. us PNG filter. Range stores the old compression setting. Could use the BMPZIP filter instead. (Very much like the JPEG compression percentage). | |
| static BOOL | CompressNative = TRUE |
| Flag for whether we compress the native files saved from Xara Studio. True means do compress the files. | |
| static BOOL | SaveXPEBitmaps = FALSE |
| Flag for whether we compress the native files saved from Xara Studio. True means do save the XPE bitmaps. False means don't save them, just save the XPE info and rebuild when loading. | |
| static BOOL | ConvertTextToOutlines = FALSE |
| Flag for whether the user has requested a convert text to outlines when exporting as a web file. True means do convert text to outlines. | |
| static INT32 | PreviewBitmapFilterType = 1 |
| What type of preview bitmap filter we should be using when exporting as a web or native file. 0 - means BMP. 1 - means GIF. 2 - means JPEG. 3 - means PNG. 4 - means TIFF. | |
| static BOOL | RemoveInvisibleLayers = 1 |
| Whether invisible layers should be removed or not when exporting as a web or native file. | |
| static BOOL | RemoveUnusedColours = TRUE |
| Whether unused colours should be removed or not when exporting as a web or native file. | |
| static BOOL | HTMLToClipboard = FALSE |
| Whether to export an HTML tag to the clipboard when exporting a Web file. | |
| static BOOL | MinimalWebFormat = 0 |
| Whether we should use the minimal web format or not when exporting as a web file. The alternative is to be a lot closer to native format. | |
| static BOOL | WriteRelativePaths = 1 |
| When this is 1, all paths will be written out in a relative format 0 means use an absolute format. | |
| static String_256 | DontConvertTheseFontsToOutlines |
| This string defines the list of font typefaces that won't be converted to outlines when exporting to the web format. | |
| static BOOL | NativeCheckSimilarPaths = 0 |
| When this is 1, the default, paths will be checked for similarities during saving. When 0 this check is not made. | |
| static INT32 | WebSimilarPathTolerence = 200 |
| This determines the tolerence that is used when checking for similar paths in web files. It is measured in millipoints. | |
| static BOOL | ConvertBlendsToOutlines = FALSE |
| Flag for whether the user has requested a convert text to outlines when exporting as a web file. True means do convert text to outlines. | |
| static BOOL | ImportNonFramesOntoActivelayer = TRUE |
| When this is 1, the default, import of non-frame layers will happen onto the active layer. When 0, import of non-frame layers will be onto the first non-frame layer in the import. | |
Private Member Functions | |
| CC_DECLARE_DYNAMIC (BaseCamelotFilter) | |
| void | UpdateLastSafeToRenderNode (Node *pNode) |
| BOOL | IsThisASelectedTemplate (Node *pNode) |
| Determines whether or not this node is a selected template node. | |
| BOOL | DeleteNode (Node *pNode) |
| deletes the given node by removing it from the tree | |
| BOOL | PreExportShadows (Node *pRoot) |
| Prep shadows for export. We do the following steps:. | |
| BOOL | PostExportShadows (Node *pRoot) |
| Repair the document tree after shadow export. We do the following steps:. | |
| BOOL | PostImportShadows () |
| We factor out common attributes on all NodeShadowControllers in the document. | |
Private Attributes | |
| Node * | pLastUnsafeToRenderNode |
| String_256 | IgnoredDataString |
| String_256 | WarningsString |
| char | ImportFileType [4] |
| AtomicTagList * | pAtomicTagList |
| EssentialTagList * | pEssentialTagList |
| TagDescriptionList * | pTagDescriptionList |
| CXaraFilePathRecordRefList * | pPathRecordRefList |
| CXaraFileNodeGroupRefList * | pNodeGroupRefList |
| Document * | pLastDocument |
| Chapter * | pLastChapter |
| Spread * | pLastSpread |
| Layer * | pLastLayer |
| NodePath * | pLastNodePath |
| NodeAttribute * | pLastCurrentAttr |
| UINT32 | DocumentCount |
| UINT32 | ChapterCount |
| UINT32 | SpreadCount |
| UINT32 | LayerCount |
| UINT32 | SetSentinelCount |
| Layer * | pImportLayer |
| UINT32 | PreCompFlags |
| InsertMode | m_InsertMode |
| CCRuntimeClass * | m_pCurrentAttrGroup |
| DocCoord | CoordOrigin |
| Layer * | m_pFirstImportedLayer |
| Layer * | m_pActiveLayerBeforeImport |
| SelectionType | SelType |
Definition at line 201 of file camfiltr.h.
|
|
Constructor for the base Camelot save/load filter off which are derived the v2 native file and web filters. This filter provides common functionality for these derived filters.
Definition at line 607 of file camfiltr.cpp. 00608 { 00609 // We are a hidden filter which just contains common functionality 00610 // This filter should never be set up or seen, the derived classes just use it. 00611 00612 // Items to handle the file compression 00613 CompressionType = 0; // type of compression in use (0 at present) 00614 CompressionOn = FALSE;// on/off flag 00615 00616 FileVersionNumber = 0.0; 00617 BuildVersionNumber = 0.0; 00618 00619 pColComponent = NULL; 00620 pBmpComponent = NULL; 00621 pUnitsComponent = NULL; 00622 pInfoComponent = NULL; 00623 pViewComponent = NULL; 00624 pPrintComponent = NULL; 00625 pFontComponent = NULL; 00626 00627 pTheSpread = NULL; 00628 00629 pUnitsComponent = NULL; 00630 pInfoComponent = NULL; 00631 00632 pInsertContextNode = NULL; 00633 InsertNextAsChild = FALSE; 00634 pInsertLevelStack = NULL; 00635 00636 pCXaraFile = NULL; 00637 pProgress = NULL; 00638 ProgressBarCount = 0; 00639 TotalProgressBarCount = 0; 00640 00641 pPrefs = NULL; 00642 00643 CoordOrigin = DocCoord(0,0); // Zero origin 00644 00645 pLastDocument = NULL; 00646 pLastChapter = NULL; 00647 pLastSpread = NULL; 00648 pLastLayer = NULL; 00649 pLastNodePath = NULL; 00650 pLastCurrentAttr = NULL; 00651 DocumentCount = 0; 00652 ChapterCount = 0; 00653 SpreadCount = 0; 00654 LayerCount = 0; 00655 SetSentinelCount = 0; 00656 00657 pImportLayer = NULL; 00658 00659 EscapePressed = FALSE; 00660 00661 pAtomicTagList = NULL; 00662 pEssentialTagList = NULL; 00663 pTagDescriptionList = NULL; 00664 00665 pPathRecordRefList = NULL; 00666 // WEBSTER - markn 31/1/97 00667 // Replaced with general system 00668 // pTextStoryGroupRefList = NULL; 00669 00670 // WEBSTER - markn 29/1/97 00671 // Part of the general form of the system used to convert text to outlines in v1.5 00672 pNodeGroupRefList = NULL; 00673 00674 PreCompFlags = 0; 00675 00676 // WEBSTER - markn 15/2/97 00677 // Bug fix for selecti |