#include <native.h>
Inheritance diagram for CamelotNativeFilter:
Public Member Functions | |
CamelotNativeFilter () | |
Constructor for the Native save/load filter. | |
~CamelotNativeFilter () | |
Tidies up when the filter is destroyed. | |
BOOL | Init () |
Initalises the Filter ready for use. Will fail if it can not get enough memory to work with. | |
virtual BOOL | IsWebFilter () |
virtual BOOL | IsCompactNativeFilter () |
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: This overrides the baseclass version to save in the proper native state. | |
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: This overrides the baseclass version to save in the proper native state. | |
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: This overrides the baseclass version to save in the proper native state. | |
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: This overrides the baseclass version to save in the proper native state. | |
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: This overrides the baseclass version to save in the proper native state. | |
virtual INT32 | HowCompatibleIsFileType (char *pFileType) |
virtual double | GetSimilarPathTolerance (NodePath *pPath) |
virtual INT32 | GetMaxPathLookUp () |
The max number pf paths that should be looked at by the function FindSimilarPath(). | |
virtual WebPrefsDlgParam * | GetCachedExportOptions () |
Protected Member Functions | |
virtual BaseCamelotFilter * | CreateNULLFilter (Document *pDocument) |
Creates the relevant NULL filter Scope: Protected. | |
virtual char * | GetExportFileType () |
virtual BOOL | BeginDocumentExport () |
This function is called just before document-related records are written out to the file. | |
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 BOOL | WriteCurrentAttributes () |
Write out all current attributes. | |
Protected Attributes | |
UINT32 | FilterNameID |
UINT32 | FilterInfoID |
UINT32 | ExportingMsgID |
Private Member Functions | |
CC_DECLARE_DYNAMIC (CamelotNativeFilter) |
Definition at line 121 of file native.h.
|
Constructor for the Native save/load filter.
Definition at line 139 of file native.cpp. 00140 { 00141 // Set up filter descriptions. 00142 FilterNameID = _R(IDS_FILTERNAME_NATIVE); 00143 FilterInfoID = _R(IDS_NATIVE_FILTERINFO); 00144 ImportMsgID = _R(IDS_IMPORTMSG_NATIVE); 00145 ExportMsgID = _R(IDS_EXPORTMSG_NATIVE); 00146 00147 FilterID = FILTERID_NATIVE; 00148 00149 #ifndef STANDALONE 00150 Flags.CanImport = TRUE; 00151 //WEBSTER-Martin-27/01/97 00152 #ifdef WEBSTER 00153 Flags.CanExport = FALSE; 00154 #else 00155 Flags.CanExport = TRUE; 00156 #endif //WEBSTER 00157 #else 00158 Flags.CanImport = TRUE; 00159 Flags.CanExport = FALSE; 00160 #endif 00161 00162 // Message to show when a problem file is encountered 00163 BadFileMsgID = _R(IDS_NOT_A_NATIVE_FILE); 00164 }
|
|
Tidies up when the filter is destroyed.
Definition at line 179 of file native.cpp.
|
|
This function is called just before document-related records are written out to the file.
Reimplemented from BaseCamelotFilter. Reimplemented in PluginNativeFilter. Definition at line 401 of file native.cpp. 00402 { 00403 BOOL ok = TRUE; 00404 00405 // Writes out a document rec followed by a down rec 00406 // This will ensure that all doc-related records appear as a child of the doc record 00407 if (ok) ok = WriteZeroSizedRecord(TAG_DOCUMENT); 00408 if (ok) ok = WriteZeroSizedRecord(TAG_DOWN); 00409 00410 return ok; 00411 }
|
|
|
|
Creates the relevant NULL filter Scope: Protected.
Implements BaseCamelotFilter. Definition at line 375 of file native.cpp. 00376 { 00377 BaseCamelotFilter* pFilter = new CamelotNULLNativeFilter(this,pDocument); 00378 00379 return pFilter; 00380 }
|
|
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.
Reimplemented from BaseCamelotFilter. Reimplemented in PluginNativeFilter. Definition at line 431 of file native.cpp. 00432 { 00433 BOOL ok = TRUE; 00434 00435 // Writes out an up rec 00436 // This will ensure that all doc-related records appear as a child of the doc record 00437 // by matching the down rec written out by BeginDocumentExport() 00438 if (ok) ok = WriteZeroSizedRecord(TAG_UP); 00439 00440 return ok; 00441 }
|
|
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: This overrides the baseclass version to save in the proper native state.
Reimplemented from BaseCamelotFilter. Reimplemented in FlareTemplateFilter, and PluginNativeFilter. Definition at line 255 of file native.cpp.
|
|
Reimplemented from BaseCamelotFilter. Reimplemented in PluginNativeFilter. Definition at line 156 of file native.h. 00156 { return NULL; }
|
|
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: This overrides the baseclass version to save in the proper native state.
Reimplemented from BaseCamelotFilter. Reimplemented in FlareTemplateFilter, and PluginNativeFilter. Definition at line 313 of file native.cpp. 00314 { 00315 // In native files ensure text is not converted to outlines 00316 return FALSE; 00317 }
|
|
Implements BaseCamelotFilter. Reimplemented in PluginNativeFilter. Definition at line 451 of file native.cpp. 00452 { 00453 return EXPORT_FILETYPE_NATIVE; 00454 }
|
|
The max number pf paths that should be looked at by the function FindSimilarPath().
Reimplemented from BaseCamelotFilter. Reimplemented in PluginNativeFilter. Definition at line 476 of file native.cpp.
|
|
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: This overrides the baseclass version to save in the proper native state.
Reimplemented from BaseCamelotFilter. Reimplemented in FlareTemplateFilter, and PluginNativeFilter. Definition at line 276 of file native.cpp. 00277 { 00278 #if (_OLE_VER >= 0x200) 00279 // Get some documents to check up on. 00280 ERROR2IF(!TheDocument, FALSE, 00281 "Null Document* in CamelotNativeFilter::GetPreviewBitmapExport"); 00282 00283 if(TheDocument->IsAClipboard()) 00284 return FALSE; // clipboard docs don't have previews 00285 00286 CCamDoc* pDoc = TheDocument->GetOilDoc(); 00287 ERROR2IF(!TheDocument->GetOilDoc(), FALSE, 00288 "Null CCamDoc* in CamelotNativeFilter::GetPreviewBitmapExport"); 00289 00290 // We *don't* export a preview bitmap if the associated document is embedded in an 00291 // OLE container. Basically, let the document decide. 00292 return pDoc->ShouldExportPreview(); 00293 #else 00294 return TRUE; 00295 #endif 00296 }
|
|
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: This overrides the baseclass version to save in the proper native state.
Reimplemented from BaseCamelotFilter. Reimplemented in FlareTemplateFilter, and PluginNativeFilter. Definition at line 334 of file native.cpp. 00335 { 00336 // In native files retain inivisible layers 00337 return FALSE; 00338 }
|
|
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: This overrides the baseclass version to save in the proper native state.
Reimplemented from BaseCamelotFilter. Reimplemented in FlareTemplateFilter, and PluginNativeFilter. Definition at line 355 of file native.cpp. 00356 { 00357 // In native files retain unused colours 00358 return FALSE; 00359 }
|
|
Implements BaseCamelotFilter. Reimplemented in PluginNativeFilter. Definition at line 456 of file native.cpp.
|
|
Implements BaseCamelotFilter. Reimplemented in PluginNativeFilter. Definition at line 443 of file native.cpp. 00444 { 00445 if (strcmp(pFileType,GetExportFileType()) == 0) 00446 return 10; 00447 else 00448 return 9; 00449 }
|
|
Initalises the Filter ready for use. Will fail if it can not get enough memory to work with.
Reimplemented from BaseCamelotFilter. Reimplemented in FlareTemplateFilter. Definition at line 196 of file native.cpp. 00197 { 00198 // Get the OILFilter object 00199 pOILFilter = new NativeOILFilter(this); 00200 if (pOILFilter == NULL) 00201 return FALSE; 00202 00203 // Load the description strings 00204 FilterName.Load(FilterNameID); 00205 FilterInfo.Load(FilterInfoID); 00206 00207 BOOL ok = CreateRecordHandlers(); 00208 00209 if (Camelot.DeclareSection( _T("Filters"), 10)) 00210 { 00211 // Preference to turn native file compression on or off 00212 Camelot.DeclarePref( NULL, _T("CompressV2Format"), &BaseCamelotFilter::CompressNative, 0, 1 ); 00213 // Preference to turn xpe bitmap saving on or off 00214 Camelot.DeclarePref( NULL, _T("SaveXPEBitmaps"), &BaseCamelotFilter::SaveXPEBitmaps, 0, 1 ); 00215 // Preference to decide what bitmap format to use for preview bitmaps 00216 Camelot.DeclarePref( NULL, _T("PreviewBitmapFilterType"), &BaseCamelotFilter::PreviewBitmapFilterType, 0, 4 ); 00217 // Preference for the optional export as web pathname when native saving 00218 Camelot.DeclarePref( NULL, _T("DefaultWebExportFilterPath"), &BaseCamelotFilter::DefaultExportPath); 00219 // Preference to turn native file checking for similar paths on or off 00220 Camelot.DeclarePref( NULL, _T("NativeCheckSimilarPaths"), &BaseCamelotFilter::NativeCheckSimilarPaths, 0, 1 ); 00221 } 00222 00223 #ifdef DO_EXPORT 00224 00225 // Initialise the native file export options dialog. 00226 if ( ok ) 00227 { 00228 ok = NativePrefsDlg::Init (); 00229 } 00230 00231 #endif 00232 00233 return ok; 00234 }
|
|
Implements BaseCamelotFilter. Reimplemented in FlareTemplateFilter, and PluginNativeFilter. Definition at line 133 of file native.h. 00133 { return FALSE; }
|
|
Implements BaseCamelotFilter. Reimplemented in FlareTemplateFilter, and PluginNativeFilter. Definition at line 132 of file native.h. 00132 { return FALSE; }
|
|
Write out all current attributes.
Reimplemented from BaseCamelotFilter. Reimplemented in PluginNativeFilter. Definition at line 499 of file native.cpp. 00500 { 00501 BOOL ok = TRUE; 00502 00503 if (ok && TheDocument) 00504 { 00505 AttributeManager* pAttrMgr = &(TheDocument->GetAttributeMgr()); 00506 if (pAttrMgr) 00507 ok = pAttrMgr->WriteCurrentAttributes(this); 00508 } 00509 00510 return (ok); 00511 }
|
|
Reimplemented from BaseCamelotFilter. Reimplemented in FlareTemplateFilter, and PluginNativeFilter. |
|
Reimplemented from BaseCamelotFilter. Reimplemented in FlareTemplateFilter, and PluginNativeFilter. |
|
Reimplemented from BaseCamelotFilter. Reimplemented in FlareTemplateFilter, and PluginNativeFilter. |