textfltr.h

Go to the documentation of this file.
00001 // $Id: textfltr.h 1282 2006-06-09 09:46:49Z alex $
00002 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
00003 ================================XARAHEADERSTART===========================
00004  
00005                Xara LX, a vector drawing and manipulation program.
00006                     Copyright (C) 1993-2006 Xara Group Ltd.
00007        Copyright on certain contributions may be held in joint with their
00008               respective authors. See AUTHORS file for details.
00009 
00010 LICENSE TO USE AND MODIFY SOFTWARE
00011 ----------------------------------
00012 
00013 This file is part of Xara LX.
00014 
00015 Xara LX is free software; you can redistribute it and/or modify it
00016 under the terms of the GNU General Public License version 2 as published
00017 by the Free Software Foundation.
00018 
00019 Xara LX and its component source files are distributed in the hope
00020 that it will be useful, but WITHOUT ANY WARRANTY; without even the
00021 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00022 See the GNU General Public License for more details.
00023 
00024 You should have received a copy of the GNU General Public License along
00025 with Xara LX (see the file GPL in the root directory of the
00026 distribution); if not, write to the Free Software Foundation, Inc., 51
00027 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00028 
00029 
00030 ADDITIONAL RIGHTS
00031 -----------------
00032 
00033 Conditional upon your continuing compliance with the GNU General Public
00034 License described above, Xara Group Ltd grants to you certain additional
00035 rights. 
00036 
00037 The additional rights are to use, modify, and distribute the software
00038 together with the wxWidgets library, the wxXtra library, and the "CDraw"
00039 library and any other such library that any version of Xara LX relased
00040 by Xara Group Ltd requires in order to compile and execute, including
00041 the static linking of that library to XaraLX. In the case of the
00042 "CDraw" library, you may satisfy obligation under the GNU General Public
00043 License to provide source code by providing a binary copy of the library
00044 concerned and a copy of the license accompanying it.
00045 
00046 Nothing in this section restricts any of the rights you have under
00047 the GNU General Public License.
00048 
00049 
00050 SCOPE OF LICENSE
00051 ----------------
00052 
00053 This license applies to this program (XaraLX) and its constituent source
00054 files only, and does not necessarily apply to other Xara products which may
00055 in part share the same code base, and are subject to their own licensing
00056 terms.
00057 
00058 This license does not apply to files in the wxXtra directory, which
00059 are built into a separate library, and are subject to the wxWindows
00060 license contained within that directory in the file "WXXTRA-LICENSE".
00061 
00062 This license does not apply to the binary libraries (if any) within
00063 the "libs" directory, which are subject to a separate license contained
00064 within that directory in the file "LIBS-LICENSE".
00065 
00066 
00067 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
00068 ----------------------------------------------
00069 
00070 Subject to the terms of the GNU Public License (see above), you are
00071 free to do whatever you like with your modifications. However, you may
00072 (at your option) wish contribute them to Xara's source tree. You can
00073 find details of how to do this at:
00074   http://www.xaraxtreme.org/developers/
00075 
00076 Prior to contributing your modifications, you will need to complete our
00077 contributor agreement. This can be found at:
00078   http://www.xaraxtreme.org/developers/contribute/
00079 
00080 Please note that Xara will not accept modifications which modify any of
00081 the text between the start and end of this header (marked
00082 XARAHEADERSTART and XARAHEADEREND).
00083 
00084 
00085 MARKS
00086 -----
00087 
00088 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
00089 designs are registered or unregistered trademarks, design-marks, and/or
00090 service marks of Xara Group Ltd. All rights in these marks are reserved.
00091 
00092 
00093       Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
00094                         http://www.xara.com/
00095 
00096 =================================XARAHEADEREND============================
00097  */
00098 
00099 // An input filter for importing text files.
00100 
00101 
00102 #ifndef INC_TEXTFLTR
00103 #define INC_TEXTFLTR
00104 
00105 //#include "ccfile.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00106 //#include "filters.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00107 #include "stack.h"
00108 
00109 
00110 #if BUILD_TEXT_FILTERS  
00111 
00112 class Page;
00113 class TextStory;
00114 class VisibleTextNode;
00115 class RTFTextFilter;
00116 class Pathname;
00117 
00118 
00119 /********************************************************************************************
00120 >   class BaseTextFilter : public TextFilter
00121 
00122     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00123     Created:    24/11/95
00124     Purpose:    Base class for all text importers/exporters.  Repository for all common code
00125 ********************************************************************************************/
00126 
00127 class BaseTextFilter : public TextFilter
00128 {
00129     CC_DECLARE_DYNAMIC(BaseTextFilter);
00130     
00131 public:
00132     BaseTextFilter();
00133     ~BaseTextFilter();
00134 
00135     // Operations on story being created
00136 protected:
00137     TextStory* CreateImportStory(DocCoord Pos);
00138     VisibleTextNode* AddCharToStory(TextStory* pStory, WCHAR NewChar);
00139     BOOL AddNewLineToStory(TextStory* pStory);
00140     BOOL AddTabToStory(TextStory* pStory, MILLIPOINT TabLength = 4000);
00141 };
00142 
00143 
00144 #if BUILD_OTHER_TEXT_FILTER
00145 
00146 /********************************************************************************************
00147 >   class ANSITextFilter : public BaseTextFilter
00148 
00149     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00150     Created:    24/11/95
00151     Purpose:    Encapsulates a ANSI text filter system.  Also load multi-byte files, but not
00152                 Unicode ones.
00153 ********************************************************************************************/
00154 
00155 class ANSITextFilter : public BaseTextFilter
00156 {
00157     CC_DECLARE_DYNAMIC(ANSITextFilter);
00158     
00159 public:
00160     ANSITextFilter();
00161     ~ANSITextFilter();
00162     BOOL Init();    
00163 
00164     // Works out if opening a file of this type requires a default document to be loaded
00165     // or does the file format supply the document.
00166     virtual BOOL IsDefaultDocRequired(const TCHAR* pcszPathName);
00167     INT32 HowCompatible(PathName& Filename, ADDR HeaderStart, UINT32 HeaderSize, UINT32 FileSize);
00168 
00169     BOOL DoImport(SelOperation* Op, CCLexFile*, Document* DestDoc,
00170                   BOOL AutoChosen, ImportPosition* Pos = NULL);
00171     BOOL DoExport(Operation*, CCLexFile*, PathName*, Document*);
00172 
00173 protected:
00174     BOOL PrepareToImport();
00175     void CleanUpAfterImport();
00176     virtual BOOL DoInternalImport(TextStory* pImportStory, CCLexFile* pFile);
00177     virtual BOOL SkipHeader(CCLexFile* pFile);
00178     virtual WCHAR GetNextCharacter(CCLexFile* pFile);
00179 
00180     UINT32 BytesReadSoFar;
00181     BOOL EscapeWasPressed;
00182 };
00183 
00184 
00185 
00186 /********************************************************************************************
00187 >   class UnicodeTextFilter : public ANSITextFilter
00188 
00189     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00190     Created:    25/11/95
00191     Purpose:    Unicode text filter system.  Derived from ANSI text filer as they have so
00192                 much in common.  Overrides a few virtual functions do to the Unicode specific
00193                 tasks
00194 ********************************************************************************************/
00195 class UnicodeTextFilter : public ANSITextFilter
00196 {
00197     CC_DECLARE_DYNAMIC(UnicodeTextFilter);
00198     
00199 public:
00200     UnicodeTextFilter();
00201     ~UnicodeTextFilter();
00202     BOOL Init();    
00203 
00204     INT32 HowCompatible(PathName& Filename, ADDR HeaderStart, UINT32 HeaderSize, UINT32 FileSize);
00205 
00206 protected:
00207     virtual BOOL SkipHeader(CCLexFile* pFile);
00208     virtual WCHAR GetNextCharacter(CCLexFile* pFile);
00209 };
00210 
00211 
00212 
00213 typedef INT32 TWIP;
00214 const INT32 TwipToMillpoint = 1000/20;      // One 'twip' = one twentith of a point
00215 
00216 
00217 
00218 
00219 /********************************************************************************************
00220 >   class RTFColourTable : public List
00221 
00222     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00223     Created:    6/12/95
00224     Purpose:    Stores the colour table from the RTF file.  These are held as DocColors
00225                 (having been read as rgb tuples).
00226 ********************************************************************************************/
00227 class RTFColourTable : public List
00228 {
00229     CC_DECLARE_DYNAMIC(RTFColourTable);
00230 
00231 public:
00232     DocColour GetColourAt(INT32 TableIndex);
00233 };
00234 
00235 
00236 /********************************************************************************************
00237 >   class RTFColourTableEntry : public ListItem
00238 
00239     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00240     Created:    6/12/95
00241     Purpose:    Stores one colour in the colour table from the RTF file.
00242 ********************************************************************************************/
00243 class RTFColourTableEntry : public ListItem
00244 {
00245     CC_DECLARE_DYNAMIC(RTFColourTableEntry);
00246 
00247 public:
00248     DocColour Colour;
00249 };
00250 
00251 
00252 
00253 /********************************************************************************************
00254 >   class RTFFontTable : public List
00255 
00256     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00257     Created:    6/12/95
00258     Purpose:    Stores the font table from the RTF file. 
00259 ********************************************************************************************/
00260 class RTFFontTable : public List
00261 {
00262     CC_DECLARE_DYNAMIC(RTFFontTable);
00263 
00264 public:
00265     BOOL GetIndexedFont(INT32 TableIndex, String_64* FontName);
00266 };
00267 
00268 
00269 /********************************************************************************************
00270 >   class RTFFontTableEntry : public ListItem
00271 
00272     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00273     Created:    6/12/95
00274     Purpose:    Stores the colour table from the RTF file.  These are held as DocColors
00275                 (having been read as rgb tuples).
00276 ********************************************************************************************/
00277 class RTFFontTableEntry : public ListItem
00278 {
00279     CC_DECLARE_DYNAMIC(RTFFontTableEntry);
00280 
00281 public:
00282     enum FontFamilyType {FamNil = 0, FamRoman, FamSwiss, FamModern, FamScript, FamDecor, FamTech, FamBiDi};
00283 
00284     RTFFontTableEntry();
00285     ~RTFFontTableEntry();
00286 
00287     String_64 RealFontName;         // The font name as specified by the RTF file
00288     String_64 ApplyFontName;        // The font we are actually applying (allows for subsitution)
00289     FontFamilyType FontFamily;      // The font family type as specified by the RTF file
00290     INT32 CharacterSet;             // The character set of the font
00291     INT32 CodePage;                 // The code page text in this font is in
00292     INT32 FontIndex;                    // The font number (table is not contigious)
00293 };
00294 
00295 
00296 
00297 // When you want to handle a new RTF control word derive it from RTFAttributeAction for
00298 // handling attribute changes, otherwise derive from RTFControlAction.
00299 // Remember to add you new class to be tested in RTFTextFilter::ParseRTFKeyword!!!
00300 
00301 
00302 /********************************************************************************************
00303 >   class RTFControlAction : public CC_CLASS_MEMDUMP
00304 
00305     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00306     Created:    6/12/95
00307     Purpose:    Base class of the RTF control word handlers
00308 ********************************************************************************************/
00309 class RTFControlAction : public CC_CLASS_MEMDUMP
00310 {
00311 public:
00312     CC_DECLARE_MEMDUMP(RTFControlAction)
00313     RTFControlAction(RTFTextFilter* pFilt, INT32 Param);
00314 
00315     virtual BOOL ExecuteControl() = 0;
00316 
00317 protected:
00318     static BOOL ExecuteControlCarefully(RTFControlAction* pAction);
00319 
00320     INT32 Parameter;
00321     RTFTextFilter* pFilter;
00322 };
00323 
00324 
00325 
00326 /********************************************************************************************
00327 >   class RTFAttributeAction : public RTFControlAction
00328 
00329     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00330     Created:    6/12/95
00331     Purpose:    Base class of the RTF attribute control word handlers
00332 ********************************************************************************************/
00333 class RTFAttributeAction : public RTFControlAction
00334 {
00335 public:
00336     CC_DECLARE_MEMDUMP(RTFAttributeAction)
00337     RTFAttributeAction(RTFTextFilter* pFilt, INT32 Param);
00338 };
00339 
00340 
00341 
00342 /********************************************************************************************
00343 >   class RTFEnterSkipDest : public RTFControlAction
00344 
00345     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00346     Created:    6/12/95
00347     Purpose:    New RTF destination handler
00348 ********************************************************************************************/
00349 class RTFEnterSkipDest : public RTFControlAction
00350 {
00351 public:
00352     CC_DECLARE_MEMDUMP(RTFEnterSkipDest)
00353     RTFEnterSkipDest(RTFTextFilter* pFilt);
00354 
00355     static BOOL IsThisAction(StringBase* pControl);
00356     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00357     BOOL ExecuteControl();
00358 };
00359 
00360 
00361 
00362 /********************************************************************************************
00363 >   class RTFColourTableAction : public RTFControlAction
00364 
00365     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00366     Created:    6/12/95
00367     Purpose:    RTF colour table handler
00368 ********************************************************************************************/
00369 class RTFColourTableAction : public RTFControlAction
00370 {
00371 public:
00372     CC_DECLARE_MEMDUMP(RTFColourTableAction)
00373     RTFColourTableAction(RTFTextFilter* pFilt);
00374 
00375     static BOOL IsThisAction(StringBase* pControl);
00376     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00377     BOOL ExecuteControl();
00378 };
00379 
00380 
00381 /********************************************************************************************
00382 >   class RTFFontTableAction : public RTFControlAction
00383 
00384     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00385     Created:    7/12/95
00386     Purpose:    RTF font table handler
00387 ********************************************************************************************/
00388 class RTFFontTableAction : public RTFControlAction
00389 {
00390 public:
00391     CC_DECLARE_MEMDUMP(RTFFontTableAction)
00392     RTFFontTableAction(RTFTextFilter* pFilt);
00393 
00394     static BOOL IsThisAction(StringBase* pControl);
00395     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00396     BOOL ExecuteControl();
00397 };
00398 
00399 
00400 /********************************************************************************************
00401 >   class RTFNewParaAction : public RTFControlAction
00402 
00403     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00404     Created:    6/12/95
00405     Purpose:    RTF new paragraph handler
00406 ********************************************************************************************/
00407 class RTFNewParaAction : public RTFControlAction
00408 {
00409 public:
00410     CC_DECLARE_MEMDUMP(RTFNewParaAction)
00411     RTFNewParaAction(RTFTextFilter* pFilt);
00412 
00413     static BOOL IsThisAction(StringBase* pControl);
00414     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00415     
00416     BOOL ExecuteControl();
00417 };
00418 
00419 
00420 
00421 /********************************************************************************************
00422 >   class RTFBoldAttribute : public RTFAttributeAction
00423 
00424     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00425     Created:    6/12/95
00426     Purpose:    RTF text bold attribute handler
00427 ********************************************************************************************/
00428 class RTFBoldAttribute : public RTFAttributeAction
00429 {
00430 public:
00431     CC_DECLARE_MEMDUMP(RTFBoldAttribute)
00432     RTFBoldAttribute(RTFTextFilter* pFilt, INT32 Param = 1);
00433 
00434     static BOOL IsThisAction(StringBase* pControl);
00435     static BOOL CreateAndExecute(INT32 Param, BOOL UseParam, RTFTextFilter* pFilter);
00436     BOOL ExecuteControl();
00437 };
00438 
00439 
00440 
00441 /********************************************************************************************
00442 >   class RTFItalicAttribute : public RTFAttributeAction
00443 
00444     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00445     Created:    6/12/95
00446     Purpose:    RTF text colour attribute handler
00447 ********************************************************************************************/
00448 class RTFItalicAttribute : public RTFAttributeAction
00449 {
00450 public:
00451     CC_DECLARE_MEMDUMP(RTFItalicAttribute)
00452     RTFItalicAttribute(RTFTextFilter* pFilt, INT32 Param = 1);
00453 
00454     static BOOL IsThisAction(StringBase* pControl);
00455     static BOOL CreateAndExecute(INT32 Param, BOOL UseParam, RTFTextFilter* pFilter);
00456     BOOL ExecuteControl();
00457 };
00458 
00459 
00460 
00461 /********************************************************************************************
00462 >   class RTFTextSizeAttribute : public RTFAttributeAction
00463 
00464     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00465     Created:    6/12/95
00466     Purpose:    RTF text size attribute handler
00467 ********************************************************************************************/
00468 class RTFTextSizeAttribute : public RTFAttributeAction
00469 {
00470 public:
00471     CC_DECLARE_MEMDUMP(RTFTextSizeAttribute)
00472     RTFTextSizeAttribute(RTFTextFilter* pFilt, MILLIPOINT Param);
00473 
00474     static BOOL IsThisAction(StringBase* pControl);
00475     static BOOL CreateAndExecute(TWIP Param, BOOL UseParam, RTFTextFilter* pFilter);
00476     BOOL ExecuteControl();
00477 };
00478 
00479 
00480 
00481 /********************************************************************************************
00482 >   class RTFSuperscriptAttribute : public RTFAttributeAction
00483 
00484     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00485     Created:    6/12/95
00486     Purpose:    RTF text superscript attribute handler
00487 ********************************************************************************************/
00488 class RTFSuperscriptAttribute : public RTFAttributeAction
00489 {
00490 public:
00491     CC_DECLARE_MEMDUMP(RTFSuperscriptAttribute)
00492     RTFSuperscriptAttribute(RTFTextFilter* pFilt);
00493 
00494     static BOOL IsThisAction(StringBase* pControl);
00495     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00496     BOOL ExecuteControl();
00497 };
00498 
00499 
00500 
00501 /********************************************************************************************
00502 >   class RTFSubscriptAttribute : public RTFAttributeAction
00503 
00504     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00505     Created:    6/12/95
00506     Purpose:    RTF text subscript attribute handler
00507 ********************************************************************************************/
00508 class RTFSubscriptAttribute : public RTFAttributeAction
00509 {
00510 public:
00511     CC_DECLARE_MEMDUMP(RTFSubscriptAttribute)
00512     RTFSubscriptAttribute(RTFTextFilter* pFilt);
00513 
00514     static BOOL IsThisAction(StringBase* pControl);
00515     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00516     BOOL ExecuteControl();
00517 };
00518 
00519 
00520 /********************************************************************************************
00521 >   class RTFNoscriptAttribute : public RTFAttributeAction
00522 
00523     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00524     Created:    6/12/95
00525     Purpose:    RTF text superscript/subscript off attribute handler
00526 ********************************************************************************************/
00527 class RTFNoscriptAttribute : public RTFAttributeAction
00528 {
00529 public:
00530     CC_DECLARE_MEMDUMP(RTFNoscriptAttribute)
00531     RTFNoscriptAttribute(RTFTextFilter* pFilt);
00532 
00533     static BOOL IsThisAction(StringBase* pControl);
00534     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00535     BOOL ExecuteControl();
00536 };
00537 
00538 
00539 /********************************************************************************************
00540 >   class RTFTextColourAttribute : public RTFAttributeAction
00541 
00542     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00543     Created:    6/12/95
00544     Purpose:    RTF text colour attribute handler
00545 ********************************************************************************************/
00546 class RTFTextColourAttribute : public RTFAttributeAction
00547 {
00548 public:
00549     CC_DECLARE_MEMDUMP(RTFTextColourAttribute)
00550     RTFTextColourAttribute(RTFTextFilter* pFilt, INT32 ColourNumber = 0);
00551 
00552     static BOOL IsThisAction(StringBase* pControl);
00553     static BOOL CreateAndExecute(INT32 Param, BOOL UseParam, RTFTextFilter* pFilter);
00554     BOOL ExecuteControl();
00555 };
00556 
00557 
00558 /********************************************************************************************
00559 >   class RTFTextFontAttribute : public RTFAttributeAction
00560 
00561     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00562     Created:    6/12/95
00563     Purpose:    RTF text font attribute handler
00564 ********************************************************************************************/
00565 class RTFTextFontAttribute : public RTFAttributeAction
00566 {
00567 public:
00568     CC_DECLARE_MEMDUMP(RTFTextFontAttribute)
00569     RTFTextFontAttribute(RTFTextFilter* pFilt, INT32 FontNumber = 0);
00570 
00571     static BOOL IsThisAction(StringBase* pControl);
00572     static BOOL CreateAndExecute(INT32 Param, BOOL UseParam, RTFTextFilter* pFilter);
00573     BOOL ExecuteControl();
00574 };
00575 
00576 
00577 /********************************************************************************************
00578 >   class RTFQPTrackingAttribute : public RTFAttributeAction
00579 
00580     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00581     Created:    6/12/95
00582     Purpose:    RTF tracking (defined in 1/4 points) attribute handler
00583 ********************************************************************************************/
00584 class RTFQPTrackingAttribute : public RTFAttributeAction
00585 {
00586 public:
00587     CC_DECLARE_MEMDUMP(RTFQPTrackingAttribute)
00588     RTFQPTrackingAttribute(RTFTextFilter* pFilt, INT32 Gap = 0);
00589 
00590     static BOOL IsThisAction(StringBase* pControl);
00591     static BOOL CreateAndExecute(INT32 Param, BOOL UseParam, RTFTextFilter* pFilter);
00592     BOOL ExecuteControl();
00593 };
00594 
00595 
00596 
00597 /********************************************************************************************
00598 >   class RTFTWIPTrackingAttribute : public RTFAttributeAction
00599 
00600     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00601     Created:    6/12/95
00602     Purpose:    RTF tracking (defined in twips) attribute handler
00603 ********************************************************************************************/
00604 class RTFTWIPTrackingAttribute : public RTFAttributeAction
00605 {
00606 public:
00607     CC_DECLARE_MEMDUMP(RTFTWIPTrackingAttribute)
00608     RTFTWIPTrackingAttribute(RTFTextFilter* pFilt, INT32 Gap = 0);
00609 
00610     static BOOL IsThisAction(StringBase* pControl);
00611     static BOOL CreateAndExecute(TWIP Param, BOOL UseParam, RTFTextFilter* pFilter);
00612     BOOL ExecuteControl();
00613 };
00614 
00615 
00616 
00617 /********************************************************************************************
00618 >   class RTFPaperWidth : public RTFControlAction
00619 
00620     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00621     Created:    14/12/95
00622     Purpose:    Reads RTF document's paper width
00623 ********************************************************************************************/
00624 class RTFPaperWidth : public RTFControlAction
00625 {
00626 public:
00627     CC_DECLARE_MEMDUMP(RTFPaperWidth)
00628     RTFPaperWidth(RTFTextFilter* pFilt, MILLIPOINT Width);
00629 
00630     static BOOL IsThisAction(StringBase* pControl);
00631     static BOOL CreateAndExecute(RTFTextFilter* pFilter, TWIP Width);
00632     BOOL ExecuteControl();
00633 };
00634 
00635 
00636 
00637 /********************************************************************************************
00638 >   class RTFPaperHeight : public RTFControlAction
00639 
00640     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00641     Created:    14/12/95
00642     Purpose:    Read RTF document's paper height
00643 ********************************************************************************************/
00644 class RTFPaperHeight : public RTFControlAction
00645 {
00646 public:
00647     CC_DECLARE_MEMDUMP(RTFPaperHeight)
00648     RTFPaperHeight(RTFTextFilter* pFilt, MILLIPOINT Height);
00649 
00650     static BOOL IsThisAction(StringBase* pControl);
00651     static BOOL CreateAndExecute(RTFTextFilter* pFilter, TWIP Height);
00652     BOOL ExecuteControl();
00653 };
00654 
00655 
00656 
00657 /********************************************************************************************
00658 >   class RTFLeftMargin : public RTFControlAction
00659 
00660     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00661     Created:    14/12/95
00662     Purpose:    Sets the width of the left-hand page margin
00663 ********************************************************************************************/
00664 class RTFLeftMargin : public RTFControlAction
00665 {
00666 public:
00667     CC_DECLARE_MEMDUMP(RTFLeftMargin)
00668     RTFLeftMargin(RTFTextFilter* pFilt, MILLIPOINT LeftMargin);
00669 
00670     static BOOL IsThisAction(StringBase* pControl);
00671     static BOOL CreateAndExecute(RTFTextFilter* pFilter, TWIP LeftMargin);
00672     BOOL ExecuteControl();
00673 };
00674 
00675 
00676 
00677 /********************************************************************************************
00678 >   class RTFRightMargin : public RTFControlAction
00679 
00680     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00681     Created:    14/12/95
00682     Purpose:    Sets the width of the right-hand page margin
00683 ********************************************************************************************/
00684 class RTFRightMargin : public RTFControlAction
00685 {
00686 public:
00687     CC_DECLARE_MEMDUMP(RTFRightMargin)
00688     RTFRightMargin(RTFTextFilter* pFilt, MILLIPOINT RightMargin);
00689 
00690     static BOOL IsThisAction(StringBase* pControl);
00691     static BOOL CreateAndExecute(RTFTextFilter* pFilter, MILLIPOINT RightMargin);
00692     BOOL ExecuteControl();
00693 };
00694 
00695 
00696 
00697 /********************************************************************************************
00698 >   class RTFTopMargin : public RTFControlAction
00699 
00700     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00701     Created:    14/12/95
00702     Purpose:    Sets the height of the margin at the top of the page
00703 ********************************************************************************************/
00704 class RTFTopMargin : public RTFControlAction
00705 {
00706 public:
00707     CC_DECLARE_MEMDUMP(RTFTopMargin)
00708     RTFTopMargin(RTFTextFilter* pFilt, MILLIPOINT TopMargin);
00709 
00710     static BOOL IsThisAction(StringBase* pControl);
00711     static BOOL CreateAndExecute(RTFTextFilter* pFilter, TWIP TopMargin);
00712     BOOL ExecuteControl();
00713 };
00714 
00715 
00716 
00717 /********************************************************************************************
00718 >   class RTFBottomMargin : public RTFControlAction
00719 
00720     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00721     Created:    14/12/95
00722     Purpose:    Sets the height of the margin at the bottom of the page
00723 ********************************************************************************************/
00724 class RTFBottomMargin : public RTFControlAction
00725 {
00726 public:
00727     CC_DECLARE_MEMDUMP(RTFBottomMargin)
00728     RTFBottomMargin(RTFTextFilter* pFilt, MILLIPOINT BottomMargin);
00729 
00730     static BOOL IsThisAction(StringBase* pControl);
00731     static BOOL CreateAndExecute(RTFTextFilter* pFilter, TWIP BottomMargin);
00732     BOOL ExecuteControl();
00733 };
00734 
00735 
00736 
00737 /********************************************************************************************
00738 >   class RTFResetCharAttrs : public RTFControlAction
00739 
00740     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00741     Created:    18/12/95
00742     Purpose:    Resets all the character attributes back to their default values
00743 ********************************************************************************************/
00744 class RTFResetCharAttrs : public RTFControlAction
00745 {
00746 public:
00747     CC_DECLARE_MEMDUMP(RTFResetCharAttrs)
00748     RTFResetCharAttrs(RTFTextFilter* pFilt);
00749 
00750     static BOOL IsThisAction(StringBase* pControl);
00751     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00752     BOOL ExecuteControl();
00753 };
00754 
00755 
00756 
00757 /********************************************************************************************
00758 >   class RTFResetParaAttrs : public RTFControlAction
00759 
00760     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00761     Created:    18/12/95
00762     Purpose:    Resets all the paragraph attributes back to their default values
00763 ********************************************************************************************/
00764 class RTFResetParaAttrs : public RTFControlAction
00765 {
00766 public:
00767     CC_DECLARE_MEMDUMP(RTFResetParaAttrs)
00768     RTFResetParaAttrs(RTFTextFilter* pFilt);
00769 
00770     static BOOL IsThisAction(StringBase* pControl);
00771     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00772     BOOL ExecuteControl();
00773 };
00774 
00775 
00776 
00777 /********************************************************************************************
00778 >   class RTFTableRowAction : public RTFControlAction
00779 
00780     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00781     Created:    18/12/95
00782     Purpose:    Resets all the paragraph attributes back to their default values
00783 ********************************************************************************************/
00784 class RTFTableRowAction : public RTFControlAction
00785 {
00786 public:
00787     CC_DECLARE_MEMDUMP(RTFTableRowAction)
00788     RTFTableRowAction(RTFTextFilter* pFilt);
00789 
00790     static BOOL IsThisAction(StringBase* pControl);
00791     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00792     BOOL ExecuteControl();
00793 };
00794 
00795 
00796 
00797 /********************************************************************************************
00798 >   class RTFTableCellAction : public RTFControlAction
00799 
00800     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00801     Created:    18/12/95
00802     Purpose:    Resets all the paragraph attributes back to their default values
00803 ********************************************************************************************/
00804 class RTFTableCellAction : public RTFControlAction
00805 {
00806 public:
00807     CC_DECLARE_MEMDUMP(RTFTableCellAction)
00808     RTFTableCellAction(RTFTextFilter* pFilt);
00809 
00810     static BOOL IsThisAction(StringBase* pControl);
00811     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00812     BOOL ExecuteControl();
00813 };
00814 
00815 
00816 
00817 /********************************************************************************************
00818 >   class RTFTabAction : public RTFControlAction
00819 
00820     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00821     Created:    3/1/96
00822     Purpose:    Processes a tab
00823 ********************************************************************************************/
00824 class RTFTabAction : public RTFControlAction
00825 {
00826 public:
00827     CC_DECLARE_MEMDUMP(RTFTabAction)
00828     RTFTabAction(RTFTextFilter* pFilt);
00829 
00830     static BOOL IsThisAction(StringBase* pControl);
00831     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00832     BOOL ExecuteControl();
00833 };
00834 
00835 
00836 
00837 /********************************************************************************************
00838 >   class RTFSingleCharAction : public RTFControlAction
00839 
00840     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00841     Created:    2/1/96
00842     Purpose:    Processes a single 'special' character
00843 ********************************************************************************************/
00844 class RTFSingleCharAction : public RTFControlAction
00845 {
00846 public:
00847     CC_DECLARE_MEMDUMP(RTFSingleCharAction)
00848 protected:
00849     RTFSingleCharAction(RTFTextFilter* pFilt, WCHAR Character);
00850 
00851 public:
00852     BOOL ExecuteControl();
00853 };
00854 
00855 
00856 
00857 /********************************************************************************************
00858 >   class RTFHexCharAction : public RTFSingleCharAction
00859 
00860     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00861     Created:    2/1/96
00862     Purpose:    Processes a character defined by two hex chars
00863 ********************************************************************************************/
00864 class RTFHexCharAction : public RTFSingleCharAction
00865 {
00866 public:
00867     CC_DECLARE_MEMDUMP(RTFHexCharAction)
00868     RTFHexCharAction(RTFTextFilter* pFilt, WCHAR Character);
00869 
00870     static BOOL IsThisAction(StringBase* pControl);
00871     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00872 };
00873 
00874 
00875 
00876 /********************************************************************************************
00877 >   class RTFEmDashAction : public RTFSingleCharAction
00878 
00879     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00880     Created:    3/1/96
00881     Purpose:    Processes a em dash
00882 ********************************************************************************************/
00883 class RTFEmDashAction : public RTFSingleCharAction
00884 {
00885 public:
00886     CC_DECLARE_MEMDUMP(RTFEmDashAction)
00887     RTFEmDashAction(RTFTextFilter* pFilt);
00888 
00889     static BOOL IsThisAction(StringBase* pControl);
00890     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00891 };
00892 
00893 
00894 
00895 /********************************************************************************************
00896 >   class RTFEnDashAction : public RTFSingleCharAction
00897 
00898     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00899     Created:    3/1/96
00900     Purpose:    Processes a en dash
00901 ********************************************************************************************/
00902 class RTFEnDashAction : public RTFSingleCharAction
00903 {
00904 public:
00905     CC_DECLARE_MEMDUMP(RTFEnDashAction)
00906     RTFEnDashAction(RTFTextFilter* pFilt);
00907 
00908     static BOOL IsThisAction(StringBase* pControl);
00909     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00910 };
00911 
00912 
00913 
00914 /********************************************************************************************
00915 >   class RTFEmSpaceAction : public RTFSingleCharAction
00916 
00917     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00918     Created:    3/1/96
00919     Purpose:    Processes a em space
00920 ********************************************************************************************/
00921 class RTFEmSpaceAction : public RTFSingleCharAction
00922 {
00923 public:
00924     CC_DECLARE_MEMDUMP(RTFEmSpaceAction)
00925     RTFEmSpaceAction(RTFTextFilter* pFilt);
00926 
00927     static BOOL IsThisAction(StringBase* pControl);
00928     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00929 };
00930 
00931 
00932 
00933 /********************************************************************************************
00934 >   class RTFEnSpaceAction : public RTFSingleCharAction
00935 
00936     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00937     Created:    3/1/96
00938     Purpose:    Processes a en dash
00939 ********************************************************************************************/
00940 class RTFEnSpaceAction : public RTFSingleCharAction
00941 {
00942 public:
00943     CC_DECLARE_MEMDUMP(RTFEnSpaceAction)
00944     RTFEnSpaceAction(RTFTextFilter* pFilt);
00945 
00946     static BOOL IsThisAction(StringBase* pControl);
00947     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00948 };
00949 
00950 
00951 
00952 /********************************************************************************************
00953 >   class RTFBulletAction : public RTFSingleCharAction
00954 
00955     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00956     Created:    3/1/96
00957     Purpose:    Processes a bullet symbol
00958 ********************************************************************************************/
00959 class RTFBulletAction : public RTFSingleCharAction
00960 {
00961 public:
00962     CC_DECLARE_MEMDUMP(RTFBulletAction)
00963     RTFBulletAction(RTFTextFilter* pFilt);
00964 
00965     static BOOL IsThisAction(StringBase* pControl);
00966     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00967 };
00968 
00969 
00970 
00971 /********************************************************************************************
00972 >   class RTFSingleLeftQuoteAction : public RTFSingleCharAction
00973 
00974     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00975     Created:    3/1/96
00976     Purpose:    Processes a single left hand quote
00977 ********************************************************************************************/
00978 class RTFSingleLeftQuoteAction : public RTFSingleCharAction
00979 {
00980 public:
00981     CC_DECLARE_MEMDUMP(RTFSingleLeftQuoteAction)
00982     RTFSingleLeftQuoteAction(RTFTextFilter* pFilt);
00983 
00984     static BOOL IsThisAction(StringBase* pControl);
00985     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
00986 };
00987 
00988 
00989 
00990 /********************************************************************************************
00991 >   class RTFSingleRightQuoteAction : public RTFSingleCharAction
00992 
00993     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
00994     Created:    3/1/96
00995     Purpose:    Processes a single right hand quote
00996 ********************************************************************************************/
00997 class RTFSingleRightQuoteAction : public RTFSingleCharAction
00998 {
00999 public:
01000     CC_DECLARE_MEMDUMP(RTFSingleRightQuoteAction)
01001     RTFSingleRightQuoteAction(RTFTextFilter* pFilt);
01002 
01003     static BOOL IsThisAction(StringBase* pControl);
01004     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
01005 };
01006 
01007 
01008 
01009 /********************************************************************************************
01010 >   class RTFDoubleLeftQuoteAction : public RTFSingleCharAction
01011 
01012     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
01013     Created:    3/1/96
01014     Purpose:    Processes a double left hand quote
01015 ********************************************************************************************/
01016 class RTFDoubleLeftQuoteAction : public RTFSingleCharAction
01017 {
01018 public:
01019     CC_DECLARE_MEMDUMP(RTFDoubleLeftQuoteAction)
01020     RTFDoubleLeftQuoteAction(RTFTextFilter* pFilt);
01021 
01022     static BOOL IsThisAction(StringBase* pControl);
01023     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
01024 };
01025 
01026 
01027 
01028 /********************************************************************************************
01029 >   class RTFDoubleRightQuoteAction : public RTFSingleCharAction
01030 
01031     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
01032     Created:    3/1/96
01033     Purpose:    Processes a single right hand quote
01034 ********************************************************************************************/
01035 class RTFDoubleRightQuoteAction : public RTFSingleCharAction
01036 {
01037 public:
01038     CC_DECLARE_MEMDUMP(RTFDoubleRightQuoteAction)
01039     RTFDoubleRightQuoteAction(RTFTextFilter* pFilt);
01040 
01041     static BOOL IsThisAction(StringBase* pControl);
01042     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
01043 };
01044 
01045 
01046 
01047 /********************************************************************************************
01048 >   class RTFNonBreakSpaceAction : public RTFSingleCharAction
01049 
01050     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
01051     Created:    3/1/96
01052     Purpose:    Processes a non-breaking space character
01053 ********************************************************************************************/
01054 class RTFNonBreakSpaceAction : public RTFSingleCharAction
01055 {
01056 public:
01057     CC_DECLARE_MEMDUMP(RTFNonBreakSpaceAction)
01058     RTFNonBreakSpaceAction(RTFTextFilter* pFilt);
01059 
01060     static BOOL IsThisAction(StringBase* pControl);
01061     static BOOL CreateAndExecute(RTFTextFilter* pFilter);
01062 };
01063 
01064 
01065 
01066 /********************************************************************************************
01067 >   class StateStore : public ListItem
01068 
01069     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
01070     Created:    15/12/95
01071     Purpose:    Holds the current non-arribute state of the importer.  Can be poped onto the
01072                 stack.
01073 ********************************************************************************************/
01074 class StateStore : public ListItem
01075 {
01076     CC_DECLARE_DYNAMIC(StateStore)
01077 
01078 public:
01079     StateStore();
01080     ~StateStore();
01081     
01082     StateStore& operator=(const StateStore&);
01083 
01084     enum DestinationStateTypes { rdsNorm, rdsSkip };
01085     enum InternalStateTypes { risNorm, risBin };
01086 
01087     DestinationStateTypes   DestinationState;       // Reading or skipping text
01088     InternalStateTypes      InternalState;          // Normal, binary or hex
01089     MILLIPOINT InterCharGap;
01090     // If you add member variables initialise in constructor and add to operator= too!
01091 };
01092 
01093 
01094 
01095 /********************************************************************************************
01096 >   class RTFDefaultAttributes : public CC_CLASS_MEMDUMP
01097 
01098     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
01099     Created:    18/12/95
01100     Purpose:    Keeps a copy of the attributes that the current attributes are set back to
01101                 when a 'plain' or 'pard' command is encountered
01102 ********************************************************************************************/
01103 class RTFDefaultAttributes : public CC_CLASS_MEMDUMP
01104 {
01105 public:
01106     String_64 FontName;
01107 };
01108 
01109 
01110 
01111 /********************************************************************************************
01112 >   class RTFTextFilter : public BaseTextFilter
01113 
01114     Author:     Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
01115     Created:    25/11/95
01116     Purpose:    Encapsulates a Rich Text Format filter system.  RTF loading code based on
01117                 'rtfreadr' from MSDN
01118 ********************************************************************************************/
01119 class RTFTextFilter : public BaseTextFilter
01120 {
01121     CC_DECLARE_DYNAMIC(RTFTextFilter);
01122     
01123 public:
01124     friend class RTFTextOILFilter;
01125 
01126     RTFTextFilter();
01127     ~RTFTextFilter();
01128 
01129     // Various virtual functions for filtery things
01130     BOOL Init();    
01131     virtual BOOL IsDefaultDocRequired(const TCHAR* pcszPathName);
01132     INT32 HowCompatible(PathName& Filename, ADDR HeaderStart, UINT32 HeaderSize, UINT32 FileSize);
01133     BOOL DoImport(SelOperation* Op, CCLexFile*, Document* DestDoc,
01134                   BOOL AutoChosen, ImportPosition* Pos = NULL);
01135     BOOL DoExport(Operation*, CCLexFile*, PathName*, Document*);
01136 
01137     // Access functions for the control handlers to set attribute states
01138     BOOL SetBold(BOOL On)                   {return SetTextBold(On);}
01139     BOOL SetItalic(BOOL On)                 {return SetTextItalic(On);}
01140     BOOL SetSize(MILLIPOINT NewSize)        {return SetTextSize(NewSize);}
01141     MILLIPOINT GetTextSize()
01142         {return ((TxtFontSizeAttribute*) CurrentAttrs[ATTR_TXTFONTSIZE].pAttr)->FontSize;}
01143     BOOL SetSuperscript();
01144     BOOL SetSubscript();
01145     BOOL SetNoscript()                      {return RemoveTextScript();}
01146     BOOL SetTextColour(DocColour& NewCol)   {return SetFillColour(NewCol);}
01147     BOOL SetFont(String_64* pName)          {return SetTextTypeFace(pName);}
01148 
01149     BOOL ResetCharacterAttributes();
01150     BOOL ResetParagraphAttributes();
01151 
01152     // More functions for control handlers
01153     void SetSkipping()  {CurrentState.DestinationState = StateStore::rdsSkip;}
01154     BOOL StartNewLine() {return AddNewLineToStory(pImportStory);}
01155     BOOL InsertTab()    {return AddTabToStory(pImportStory);}
01156     BOOL InsertChar(WCHAR Char) {return ParseChar(Char);}
01157 
01158     // Information Table handlers
01159     BOOL ReadColourTable();
01160     RTFColourTable* GetColourTable()        {return &ColourTable;}
01161     BOOL ReadFontTable();
01162     RTFFontTable* GetFontTable()            {return &FontTable;}
01163 
01164     BOOL ReadCharFromFile(TCHAR* ch, BOOL SkipCR = TRUE);
01165 
01166 protected:
01167     // Import helpers
01168     BOOL PrepareToImport();                 // Does initialisations
01169     void CleanUpAfterImport();              // Frees memory (empties tables etc..)
01170     BOOL DoInternalImport();                // The actual import loop
01171 
01172     BOOL InitialiseInfo();                  // Inits RTF document info held in filter
01173 
01174     // From rtfreadr - function headers
01175     BOOL PushRTFState();
01176     BOOL PopRTFState();
01177     BOOL ParseRTFKeyword();
01178     BOOL ParseChar(WCHAR Char);
01179     BOOL TranslateKeyword(StringBase* pKeyword, INT32 param, BOOL fParam);
01180 
01181     BOOL EndGroupAction(StateStore::DestinationStateTypes rds);
01182 
01183     // File processors
01184     BOOL ReadKeyword(StringBase* pKeyword, INT32* pParam, BOOL* pParamUsed);
01185     BOOL SkipBackChar(INT32 Count = 1);
01186     BOOL ReadOneFontFromTable();
01187 
01188     // RTF member variable declarations
01189     RTFDefaultAttributes DefaultAttrs;
01190     StateStore CurrentState;
01191     INT32 cbBin;
01192     BOOL fSkipDestIfUnk;
01193 
01194     UINT32 BytesReadSoFar;                  // Count of the bytes read so far
01195     TextStory* pImportStory;                // Pointer to the story we are importing into
01196     CCLexFile* pImportFile;                 // Pointer to file we are importing from
01197     BOOL EscapeWasPressed;                  // TRUE if the use pressed ESCAPE to abort the import
01198     BOOL ImportHasFinished;
01199 
01200     // Various stacks and tables
01201     MarkedStack StateStack;                 // RTF state stack
01202     AttrRecordList PreviousAttributes;      // Attribute stack
01203     RTFColourTable ColourTable;             // Text colour lookup table
01204     RTFFontTable FontTable;                 // Text font lookup table
01205 
01206     // Document information
01207     MILLIPOINT  PaperWidth;
01208     MILLIPOINT  PaperHeight;
01209     MILLIPOINT  LeftMargin;
01210     MILLIPOINT  RightMargin;
01211     MILLIPOINT  TopMargin;
01212     MILLIPOINT  BottomMargin;
01213 
01214 public:
01215     // Access functions for internal members
01216     void SetPaperWidth(MILLIPOINT NewWidth)     {PaperWidth = NewWidth;}
01217     void SetPaperHeight(MILLIPOINT NewHeight)   {PaperHeight = NewHeight;}
01218     void SetLeftMargin(MILLIPOINT NewMargin)    {LeftMargin = NewMargin;}
01219     void SetRightMargin(MILLIPOINT NewMargin)   {RightMargin = NewMargin;}
01220     void SetTopMargin(MILLIPOINT NewMargin)     {TopMargin = NewMargin;}
01221     void SetBottomMargin(MILLIPOINT NewMargin)  {BottomMargin = NewMargin;}
01222 
01223     void SetInterCharGap(MILLIPOINT NewGap)     {CurrentState.InterCharGap = NewGap;}
01224 };
01225 
01226 #endif  //#if BUILD_OTHER_TEXT_FILTER
01227 
01228 #endif  //include
01229 #endif  //#if BUILD_TEXT_FILTERS

Generated on Sat Nov 10 03:47:09 2007 for Camelot by  doxygen 1.4.4