#include <ftfilter.h>
Inheritance diagram for FlareTemplateFilter:
Public Member Functions | |
FlareTemplateFilter () | |
Constructor for the Native save/load filter. | |
~FlareTemplateFilter () | |
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 | HowCompatible (PathName &Filename, ADDR HeaderStart, UINT32 HeaderSize, UINT32 FileSize) |
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 This is always disabled in this filter. | |
virtual BOOL | ShouldExportHTMLTag () |
Public access to the HTML to clipboard. | |
virtual BOOL | GetHTMLToClipboard () |
Public access to the HTML to clipboard. | |
virtual BOOL | SetHTMLToClipboard (BOOL NewHTMLToClipboard) |
Set a new state for HTMLToClipboard. | |
Protected Member Functions | |
virtual CXaraFile * | CreateCXaraFile () |
This overrides the BaseCamelotFilter version to return a CXaraTempateFile. | |
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 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. | |
Protected Attributes | |
UINT32 | FilterNameID |
UINT32 | FilterInfoID |
UINT32 | ExportingMsgID |
Static Protected Attributes | |
static INT32 | FTBitmapCompression = 75 |
static BOOL | FTPreviewBitmapExport = FALSE |
static BOOL | FTConvertTextToOutlines = FALSE |
static BOOL | FTHTMLToClipboard = FALSE |
static BOOL | FTConvertBlendsToOutlines = FALSE |
Private Member Functions | |
CC_DECLARE_DYNAMIC (FlareTemplateFilter) |
Definition at line 120 of file ftfilter.h.
|
Constructor for the Native save/load filter.
Definition at line 150 of file ftfilter.cpp. 00151 { 00152 // Set up filter descriptions. 00153 FilterNameID = _R(IDS_FILTERNAME_FLARETEMPLATE); 00154 FilterInfoID = _R(IDS_FLARETEMPLATE_FILTERINFO); 00155 ImportMsgID = _R(IDS_IMPORTMSG_FLARETEMPLATE); 00156 ExportMsgID = _R(IDS_EXPORTMSG_FLARETEMPLATE); 00157 00158 FilterID = FILTERID_FLARETEMPLATE; 00159 00160 Flags.CanImport = FALSE; // Import needs TemplMan COM object 00161 Flags.CanExport = TRUE; 00162 00163 // Message to show when a problem file is encountered 00164 BadFileMsgID = _R(IDS_NOT_A_FLARETEMPLATE_FILE); 00165 }
|
|
Tidies up when the filter is destroyed.
Definition at line 178 of file ftfilter.cpp.
|
|
|
|
Corrects the file header so that it contains the correct information now that we have correctly reached the end of the file.
Reimplemented from BaseCamelotFilter. Definition at line 146 of file ftfilter.h. 00146 { return(TRUE); };
|
|
This overrides the BaseCamelotFilter version to return a CXaraTempateFile.
Reimplemented from BaseCamelotFilter. Definition at line 319 of file ftfilter.cpp. 00320 { 00321 CXaraFile* pCXaraFile = new CXaraTemplateFile; 00322 00323 if (pCXaraFile != NULL) 00324 pCXaraFile->SetFilter(this); 00325 00326 return(pCXaraFile); 00327 }
|
|
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.
Reimplemented from CamelotNativeFilter. Definition at line 355 of file ftfilter.cpp. 00356 { 00357 return FlareTemplateFilter::FTBitmapCompression; 00358 }
|
|
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.
Note: Virtual so that can be overriden in native filter to save in the proper native state Reimplemented from BaseCamelotFilter. Definition at line 481 of file ftfilter.cpp. 00482 { 00483 return FlareTemplateFilter::FTConvertBlendsToOutlines; 00484 }
|
|
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.
Reimplemented from CamelotNativeFilter. Definition at line 438 of file ftfilter.cpp. 00439 { 00440 return FlareTemplateFilter::FTConvertTextToOutlines; 00441 }
|
|
Public access to the HTML to clipboard.
Definition at line 653 of file ftfilter.cpp. 00654 { 00655 return(FlareTemplateFilter::FTHTMLToClipboard); 00656 }
|
|
Public access function.
Reimplemented from BaseCamelotFilter. Definition at line 599 of file ftfilter.cpp. 00600 { 00601 return(FALSE); 00602 }
|
|
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.
Reimplemented from CamelotNativeFilter. Definition at line 397 of file ftfilter.cpp. 00398 { 00399 return FlareTemplateFilter::FTPreviewBitmapExport; 00400 }
|
|
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.
Reimplemented from CamelotNativeFilter. Definition at line 524 of file ftfilter.cpp. 00525 { 00526 return(FALSE); 00527 }
|
|
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.
Reimplemented from CamelotNativeFilter. Definition at line 563 of file ftfilter.cpp. 00564 { 00565 return FALSE; 00566 }
|
|
Reimplemented from BaseCamelotFilter. Definition at line 274 of file ftfilter.cpp. 00276 { 00277 PORTNOTE("byteorder", "TODO: Check byte ordering") 00278 // How compatible we think the file is 00279 INT32 HowCompatible = 0; 00280 00281 // Check that we've got enough data to do our check 00282 if (HeaderSize > 9) 00283 { 00284 // Check that the first eight bytes are our magic identifier 00285 BYTE* pByte = (BYTE*)HeaderStart; 00286 // If the first 9 bytes are FLARETEXT and the next is a CR or LF then 00287 // it is most likely our format 00288 00289 if ((memcmp(pByte, "FLARETEXT", 9) == 0) && 00290 ((pByte[9] == 13) || (pByte[9] == 10))) 00291 { 00292 // We like this file 00293 HowCompatible = 9; 00294 } 00295 } 00296 00297 // TRACEUSER( "Gerry", _T("FTFilter::HowCompatible returning = %d\n"), HowCompatible); 00298 00299 // Return the found value to the caller. 00300 return(HowCompatible); 00301 }
|
|
Initalises the Filter ready for use. Will fail if it can not get enough memory to work with.
Reimplemented from CamelotNativeFilter. Definition at line 195 of file ftfilter.cpp. 00196 { 00197 // Get the OILFilter object 00198 pOILFilter = new FlareTemplateOILFilter(this); 00199 if (pOILFilter == NULL) 00200 return FALSE; 00201 00202 // Load the description strings 00203 FilterName.Load(FilterNameID); 00204 FilterInfo.Load(FilterInfoID); 00205 00206 BOOL ok = TRUE; 00207 00208 if (ok) ok = CreateRecordHandlers(); 00209 00210 if (Camelot.DeclareSection(_T("Filters"), 10)) 00211 { 00212 // Preferences for the Flare Template options dialog box 00213 00214 // These override the baseclass versions 00215 00216 // Preference for bitmap compression requested by the user 00217 // 101 -201 means use PNG but remember old JPEG setting 00218 // 0-100 use JPEG with this quality setting 00219 Camelot.DeclarePref( NULL, _T("FTBitmapCompression"), &FlareTemplateFilter::FTBitmapCompression, 0, 201 ); 00220 // Preference for whether we export a preview bitmap in web files 00221 Camelot.DeclarePref( NULL, _T("FTExportPreviewBitmap"), &FlareTemplateFilter::FTPreviewBitmapExport, 0, 1 ); 00222 // Preference for whether we convert all text to outlines in web files (baring some assumed fonts) 00223 Camelot.DeclarePref( NULL, _T("FTConvertTextToOutlines"), &FlareTemplateFilter::FTConvertTextToOutlines, 0, 1 ); 00224 // Preference for whether we export an HTML tag to the clipboard 00225 Camelot.DeclarePref( NULL, _T("FTHTMLToClipboard"), &FlareTemplateFilter::FTHTMLToClipboard, 0, 1 ); 00226 // Preference for whether we convert all blends to outlines in web files 00227 Camelot.DeclarePref( NULL, _T("FTConvertBlendsToOutlines"), &FlareTemplateFilter::FTConvertBlendsToOutlines, 0, 1 ); 00228 } 00229 00230 // All ok? 00231 return ok; 00232 }
|
|
Reimplemented from CamelotNativeFilter. Definition at line 133 of file ftfilter.h. 00134 { return !BaseCamelotFilter::GetMinimalWebFormat(); } // TRUE by default
|
|
Reimplemented from CamelotNativeFilter. Definition at line 131 of file ftfilter.h. 00132 { return BaseCamelotFilter::GetMinimalWebFormat(); } // FALSE by default
|
|
Set up a new state for the the current bitmap compression. 200 = no compression, 0 = full compression. (Very much like the JPEG compression percentage).
Reimplemented from BaseCamelotFilter. Definition at line 374 of file ftfilter.cpp. 00375 { 00376 INT32 Old = FlareTemplateFilter::FTBitmapCompression; 00377 FlareTemplateFilter::FTBitmapCompression = NewBmpComp; 00378 return Old; 00379 }
|
|
Set up a new state for the the convert blends to outlines. True means convert blends to outlines, False means do not.
Reimplemented from BaseCamelotFilter. Definition at line 501 of file ftfilter.cpp. 00502 { 00503 BOOL Old = FlareTemplateFilter::FTConvertBlendsToOutlines; 00504 FlareTemplateFilter::FTConvertBlendsToOutlines = NewConvertBlendsToOutlines; 00505 return Old; 00506 }
|
|
Set up a new state for the the convert text to outlines. True means convert text to outlines, False means do not.
Reimplemented from BaseCamelotFilter. Definition at line 456 of file ftfilter.cpp. 00457 { 00458 BOOL Old = FlareTemplateFilter::FTConvertTextToOutlines; 00459 FlareTemplateFilter::FTConvertTextToOutlines = NewConvertTextToOutlines; 00460 return Old; 00461 }
|
|
Set a new state for HTMLToClipboard.
Reimplemented from BaseCamelotFilter. Definition at line 634 of file ftfilter.cpp. 00635 { 00636 BOOL Old = FlareTemplateFilter::FTHTMLToClipboard; 00637 FlareTemplateFilter::FTHTMLToClipboard = fNewValue; 00638 return Old; 00639 }
|
|
Set up a new state for the min web format flag This is always disabled in this filter.
Reimplemented from BaseCamelotFilter. Definition at line 617 of file ftfilter.cpp. 00618 { 00619 return(FALSE); 00620 }
|
|
Set up a new state for the the current export preview bitmap. True means export a preview bitmap, False means do not.
Reimplemented from BaseCamelotFilter. Definition at line 415 of file ftfilter.cpp. 00416 { 00417 BOOL Old = FlareTemplateFilter::FTPreviewBitmapExport; 00418 FlareTemplateFilter::FTPreviewBitmapExport = NewExportPreviewBmp; 00419 return Old; 00420 }
|
|
Set up a new state for the the remove invisible layers. True means remove invisible layers, False means do not.
Reimplemented from BaseCamelotFilter. Definition at line 542 of file ftfilter.cpp. 00543 { 00544 return(FALSE); 00545 }
|
|
Set up a new state for the the remove unused colours. True means remove unused colours, False means do not.
Reimplemented from BaseCamelotFilter. Definition at line 581 of file ftfilter.cpp. 00582 { 00583 return(FALSE); 00584 }
|
|
Func to set total the progress bar count. If there is a progress bar available, it is updated by this call. Scope: Protected.
Reimplemented from BaseCamelotFilter. Definition at line 243 of file ftfilter.cpp. 00244 { 00245 TotalProgressBarCount = n; 00246 00247 if (TotalProgressBarCount == 0 && GetCCFile() != NULL) 00248 TotalProgressBarCount = GetCCFile()->Size(); 00249 00250 return(IncProgressBarCount(0)); 00251 }
|
|
Public access to the HTML to clipboard.
Reimplemented from BaseCamelotFilter. Definition at line 670 of file ftfilter.cpp. 00671 { 00672 return(FlareTemplateFilter::FTHTMLToClipboard); 00673 }
|
|
Reimplemented from CamelotNativeFilter. Definition at line 157 of file ftfilter.h. |
|
Reimplemented from CamelotNativeFilter. Definition at line 152 of file ftfilter.h. |
|
Reimplemented from CamelotNativeFilter. Definition at line 151 of file ftfilter.h. |
|
Definition at line 161 of file ftfilter.h. |
|
Definition at line 165 of file ftfilter.h. |
|
Definition at line 163 of file ftfilter.h. |
|
Definition at line 164 of file ftfilter.h. |
|
Definition at line 162 of file ftfilter.h. |