00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131 #ifndef INC_TXTATTR
00132 #define INC_TXTATTR
00133
00134 #include "node.h"
00135 #include "attrval.h"
00136 #include "nodeattr.h"
00137 #include "trans2d.h"
00138 #include "fixed16.h"
00139
00140 #include <list>
00141
00142 enum Justification { JLEFT, JRIGHT, JCENTRE, JFULL };
00143 enum TxtTabType { LeftTab, RightTab, CentreTab, DecimalTab };
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158 class TxtBaseClassAttribute : public AttributeValue
00159 {
00160 CC_DECLARE_DYNAMIC(TxtBaseClassAttribute)
00161 public:
00162
00163 TxtBaseClassAttribute() {};
00164
00165 virtual void Restore(RenderRegion *, BOOL) = 0;
00166 };
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180 class TxtFontTypefaceAttribute : public TxtBaseClassAttribute
00181 {
00182 CC_DECLARE_DYNCREATE(TxtFontTypefaceAttribute)
00183 public:
00184
00185 TxtFontTypefaceAttribute();
00186 TxtFontTypefaceAttribute(UINT32 TypefaceHandle);
00187
00188 virtual void Restore (RenderRegion *, BOOL);
00189 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00190
00191 virtual void SimpleCopy(AttributeValue *);
00192 virtual NodeAttribute *MakeNode();
00193
00194 BOOL IsDifferent(AttributeValue *pAttr);
00195
00196 virtual TxtFontTypefaceAttribute& operator=(TxtFontTypefaceAttribute& Attrib);
00197 INT32 operator==(const TxtFontTypefaceAttribute& Attrib);
00198
00199
00200
00201 WORD HTypeface;
00202 BOOL IsBold;
00203 BOOL IsItalic;
00204
00205 static BOOL Init();
00206 };
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219 class TxtFontSizeAttribute : public TxtBaseClassAttribute
00220 {
00221 CC_DECLARE_DYNCREATE(TxtFontSizeAttribute)
00222 public:
00223
00224 TxtFontSizeAttribute();
00225 TxtFontSizeAttribute(MILLIPOINT FontSize);
00226
00227 virtual void Restore (RenderRegion *, BOOL);
00228 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00229
00230 virtual void SimpleCopy(AttributeValue *);
00231 virtual NodeAttribute *MakeNode();
00232
00233 BOOL IsDifferent(AttributeValue *pAttr);
00234
00235 virtual TxtFontSizeAttribute& operator=(TxtFontSizeAttribute& Attrib);
00236 INT32 operator==(const TxtFontSizeAttribute& Attrib);
00237
00238
00239 MILLIPOINT FontSize;
00240
00241 static BOOL Init();
00242 };
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258 class TxtBoldAttribute : public TxtBaseClassAttribute
00259 {
00260 CC_DECLARE_DYNCREATE(TxtBoldAttribute)
00261 public:
00262
00263 TxtBoldAttribute();
00264 TxtBoldAttribute(BOOL boldOn);
00265
00266 virtual void Restore (RenderRegion *, BOOL);
00267 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00268
00269 virtual void SimpleCopy(AttributeValue *);
00270 virtual NodeAttribute *MakeNode();
00271
00272 BOOL IsDifferent(AttributeValue *pAttr);
00273
00274 virtual TxtBoldAttribute& operator=(TxtBoldAttribute& Attrib);
00275 INT32 operator==(const TxtBoldAttribute& Attrib);
00276
00277
00278 BOOL BoldOn;
00279
00280 static BOOL Init();
00281 };
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295 class TxtItalicAttribute : public TxtBaseClassAttribute
00296 {
00297 CC_DECLARE_DYNCREATE(TxtItalicAttribute)
00298 public:
00299
00300 TxtItalicAttribute();
00301 TxtItalicAttribute(BOOL italicOn);
00302
00303 virtual void Restore (RenderRegion *, BOOL);
00304 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00305
00306 virtual void SimpleCopy(AttributeValue *);
00307 virtual NodeAttribute *MakeNode();
00308
00309 BOOL IsDifferent(AttributeValue *pAttr);
00310
00311 virtual TxtItalicAttribute& operator=(TxtItalicAttribute& Attrib);
00312 INT32 operator==(const TxtItalicAttribute& Attrib);
00313
00314
00315
00316 BOOL ItalicOn;
00317
00318 static BOOL Init();
00319 };
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333 class TxtUnderlineAttribute : public TxtBaseClassAttribute
00334 {
00335 CC_DECLARE_DYNCREATE(TxtUnderlineAttribute)
00336 public:
00337 TxtUnderlineAttribute();
00338 TxtUnderlineAttribute(BOOL underlined);
00339
00340 virtual void Restore (RenderRegion *, BOOL);
00341 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00342
00343 virtual void SimpleCopy(AttributeValue *);
00344 virtual NodeAttribute *MakeNode();
00345
00346 BOOL IsDifferent(AttributeValue *pAttr);
00347
00348 virtual TxtUnderlineAttribute& operator=(TxtUnderlineAttribute& Attrib);
00349 INT32 operator==(const TxtUnderlineAttribute& Attrib);
00350
00351 BOOL Underlined;
00352
00353 static BOOL Init();
00354 };
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368 class TxtJustificationAttribute : public TxtBaseClassAttribute
00369 {
00370 CC_DECLARE_DYNCREATE(TxtJustificationAttribute)
00371 public:
00372
00373 TxtJustificationAttribute();
00374 TxtJustificationAttribute(Justification Value);
00375
00376 virtual void Restore (RenderRegion *, BOOL);
00377 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00378
00379 virtual void SimpleCopy(AttributeValue *);
00380 virtual NodeAttribute *MakeNode();
00381
00382 BOOL IsDifferent(AttributeValue *pAttr);
00383
00384 virtual TxtJustificationAttribute& operator=(TxtJustificationAttribute& Attrib);
00385 INT32 operator==(const TxtJustificationAttribute& Attrib);
00386
00387 static BOOL Init();
00388
00389 Justification justification;
00390 };
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407 class TxtTrackingAttribute : public TxtBaseClassAttribute
00408 {
00409 CC_DECLARE_DYNCREATE(TxtTrackingAttribute)
00410 public:
00411
00412 TxtTrackingAttribute();
00413 TxtTrackingAttribute(MILLIPOINT tracking);
00414
00415 virtual void Restore (RenderRegion *, BOOL);
00416 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00417
00418 virtual void SimpleCopy(AttributeValue *);
00419 virtual NodeAttribute *MakeNode();
00420
00421 BOOL IsDifferent(AttributeValue *pAttr);
00422
00423 virtual TxtTrackingAttribute& operator=(TxtTrackingAttribute& Attrib);
00424 INT32 operator==(const TxtTrackingAttribute& Attrib);
00425
00426
00427 static BOOL Init();
00428
00429 MILLIPOINT Tracking;
00430 };
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444 class TxtAspectRatioAttribute : public TxtBaseClassAttribute
00445 {
00446 CC_DECLARE_DYNCREATE(TxtAspectRatioAttribute)
00447 public:
00448
00449 TxtAspectRatioAttribute();
00450 TxtAspectRatioAttribute(FIXED16 aspect);
00451
00452 virtual void Restore (RenderRegion *, BOOL);
00453 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00454
00455 virtual void SimpleCopy(AttributeValue *);
00456 virtual NodeAttribute *MakeNode();
00457
00458 BOOL IsDifferent(AttributeValue *pAttr);
00459
00460 virtual TxtAspectRatioAttribute& operator=(TxtAspectRatioAttribute& Attrib);
00461 INT32 operator==(const TxtAspectRatioAttribute& Attrib);
00462
00463 static BOOL Init();
00464
00465 FIXED16 AspectRatio;
00466 };
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480 class TxtScriptAttribute : public TxtBaseClassAttribute
00481 {
00482 CC_DECLARE_DYNCREATE(TxtScriptAttribute)
00483 public:
00484
00485 TxtScriptAttribute();
00486 TxtScriptAttribute(FIXED16 offset, FIXED16 size);
00487
00488 virtual void Restore (RenderRegion *, BOOL);
00489 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00490
00491 virtual void SimpleCopy(AttributeValue *);
00492 virtual NodeAttribute *MakeNode();
00493
00494 BOOL IsDifferent(AttributeValue *pAttr);
00495
00496 virtual TxtScriptAttribute& operator=(TxtScriptAttribute& Attrib);
00497 INT32 operator==(const TxtScriptAttribute& Attrib);
00498
00499 static BOOL Init();
00500
00501 FIXED16 Offset;
00502 FIXED16 Size;
00503 };
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00516
00517 class TxtBaseLineAttribute : public TxtBaseClassAttribute
00518 {
00519 CC_DECLARE_DYNCREATE(TxtBaseLineAttribute)
00520 public:
00521
00522 TxtBaseLineAttribute();
00523 TxtBaseLineAttribute(MILLIPOINT value);
00524
00525 virtual void Restore (RenderRegion *, BOOL);
00526 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00527
00528 virtual void SimpleCopy(AttributeValue *);
00529 virtual NodeAttribute *MakeNode();
00530
00531 BOOL IsDifferent(AttributeValue *pAttr);
00532
00533 virtual TxtBaseLineAttribute& operator=(TxtBaseLineAttribute& Attrib);
00534 INT32 operator==(const TxtBaseLineAttribute& Attrib);
00535
00536 static BOOL Init();
00537
00538 MILLIPOINT Value;
00539 };
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553 class TxtLineSpaceAttribute : public TxtBaseClassAttribute
00554 {
00555 CC_DECLARE_DYNCREATE(TxtLineSpaceAttribute)
00556 public:
00557
00558 TxtLineSpaceAttribute();
00559 TxtLineSpaceAttribute(MILLIPOINT Value);
00560 TxtLineSpaceAttribute(FIXED16 Ratio);
00561
00562 virtual void Restore (RenderRegion *, BOOL);
00563 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00564
00565 virtual void SimpleCopy(AttributeValue *);
00566 virtual NodeAttribute *MakeNode();
00567
00568 BOOL IsDifferent(AttributeValue *pAttr);
00569
00570 virtual TxtLineSpaceAttribute& operator=(TxtLineSpaceAttribute& Attrib);
00571 INT32 operator==(const TxtLineSpaceAttribute& Attrib);
00572
00573 static BOOL Init();
00574
00575 BOOL IsARatio() const;
00576
00577
00578 BOOL IsRatio:1;
00579
00580 MILLIPOINT Value;
00581 FIXED16 Ratio;
00582
00583 };
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595 class TxtTabStop
00596 {
00597 public:
00598
00599 TxtTabStop(TxtTabType TheType, MILLIPOINT ThePosition);
00600
00601 TxtTabStop(TxtTabType TheType, MILLIPOINT ThePosition, WCHAR DecimalPointChar, WCHAR TabFillerChar);
00602
00603
00604 inline TxtTabType GetType() const { return mType; }
00605 void SetType(TxtTabType TheType);
00606 inline MILLIPOINT GetPosition() const { return mPosition; }
00607 inline void SetPosition(MILLIPOINT ThePosition) { mPosition = ThePosition; }
00608 inline WCHAR GetDecimalPointChar() const { return mDecimalPointChar; }
00609 inline void SetDecimalPointChar(WCHAR DecimalPointChar) { mDecimalPointChar = DecimalPointChar; }
00610 inline WCHAR GetTabFillerChar() const { return mTabFillerChar; }
00611 inline void SetTabFillerChar(WCHAR TheChar) { mTabFillerChar = TheChar; }
00612
00613 private:
00614 TxtTabType mType;
00615 MILLIPOINT mPosition;
00616 WCHAR mDecimalPointChar;
00617 WCHAR mTabFillerChar;
00618 };
00619
00620
00621 BOOL operator==(const TxtTabStop& t1, const TxtTabStop& t2);
00622 BOOL operator!=(const TxtTabStop& t1, const TxtTabStop& t2);
00623
00624 typedef list<TxtTabStop> TxtRuler;
00625
00626
00627 typedef list<TxtTabStop>::iterator TxtTabStopIterator;
00628 typedef list<TxtTabStop>::const_iterator const_TxtTabStopIterator;
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642 class TxtRulerAttribute : public TxtBaseClassAttribute
00643 {
00644 CC_DECLARE_DYNCREATE(TxtRulerAttribute)
00645 public:
00646
00647 TxtRulerAttribute();
00648 ~TxtRulerAttribute();
00649
00650 virtual void Restore (RenderRegion *, BOOL);
00651 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00652
00653 virtual void SimpleCopy(AttributeValue *);
00654 virtual NodeAttribute *MakeNode();
00655
00656 BOOL IsDifferent(AttributeValue *pAttr);
00657
00658 virtual TxtRulerAttribute& operator=(TxtRulerAttribute& Attrib);
00659 INT32 operator==(const TxtRulerAttribute& Attrib);
00660
00661
00662 void AddTabStop(TxtTabType Type, MILLIPOINT Position);
00663 void AddTabStop(TxtTabType Type, MILLIPOINT Position, WCHAR DecimalPointChar, WCHAR TabFillerChar);
00664 void AddTabStop(TxtTabStop TabStop);
00665 void FindTabStop (MILLIPOINT MinPos, TxtTabType* pType, MILLIPOINT* pPos, WCHAR* pDecimalPointChar) const;
00666 const_TxtTabStopIterator begin() const { return Value->begin(); }
00667 const_TxtTabStopIterator end() const { return Value->end(); }
00668 TxtTabStopIterator begin() { return Value->begin(); }
00669 TxtTabStopIterator end() { return Value->end(); }
00670 INT32 NumTabStops() const { return Value->size(); }
00671
00672 static BOOL Init();
00673 static void FindTabStopInRuler(const TxtRuler* pRuler, MILLIPOINT MinPos,
00674 TxtTabType* pType, MILLIPOINT* pPos, WCHAR* pDecimalPointChar);
00675
00676
00677
00678 TxtRuler* Value;
00679 private:
00680
00681 TxtRulerAttribute(const TxtRulerAttribute&);
00682 };
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695 class TxtLeftMarginAttribute : public TxtBaseClassAttribute
00696 {
00697 CC_DECLARE_DYNCREATE(TxtLeftMarginAttribute)
00698 public:
00699
00700 TxtLeftMarginAttribute();
00701 TxtLeftMarginAttribute(MILLIPOINT value);
00702
00703 virtual void Restore (RenderRegion *, BOOL);
00704 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00705
00706 virtual void SimpleCopy(AttributeValue *);
00707 virtual NodeAttribute *MakeNode();
00708
00709 BOOL IsDifferent(AttributeValue *pAttr);
00710
00711 virtual TxtLeftMarginAttribute& operator=(TxtLeftMarginAttribute& Attrib);
00712 INT32 operator==(const TxtLeftMarginAttribute& Attrib);
00713
00714 static BOOL Init();
00715
00716 MILLIPOINT Value;
00717 };
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730 class TxtRightMarginAttribute : public TxtBaseClassAttribute
00731 {
00732 CC_DECLARE_DYNCREATE(TxtRightMarginAttribute)
00733 public:
00734
00735 TxtRightMarginAttribute();
00736 TxtRightMarginAttribute(MILLIPOINT value);
00737
00738 virtual void Restore (RenderRegion *, BOOL);
00739 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00740
00741 virtual void SimpleCopy(AttributeValue *);
00742 virtual NodeAttribute *MakeNode();
00743
00744 BOOL IsDifferent(AttributeValue *pAttr);
00745
00746 virtual TxtRightMarginAttribute& operator=(TxtRightMarginAttribute& Attrib);
00747 INT32 operator==(const TxtRightMarginAttribute& Attrib);
00748
00749 static BOOL Init();
00750
00751 MILLIPOINT Value;
00752 };
00753
00754
00755
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765 class TxtFirstIndentAttribute : public TxtBaseClassAttribute
00766 {
00767 CC_DECLARE_DYNCREATE(TxtFirstIndentAttribute)
00768 public:
00769
00770 TxtFirstIndentAttribute();
00771 TxtFirstIndentAttribute(MILLIPOINT value);
00772
00773 virtual void Restore (RenderRegion *, BOOL);
00774 virtual void Render(RenderRegion *pRegion, BOOL Temp = FALSE);
00775
00776 virtual void SimpleCopy(AttributeValue *);
00777 virtual NodeAttribute *MakeNode();
00778
00779 BOOL IsDifferent(AttributeValue *pAttr);
00780
00781 virtual TxtFirstIndentAttribute& operator=(TxtFirstIndentAttribute& Attrib);
00782 INT32 operator==(const TxtFirstIndentAttribute& Attrib);
00783
00784 static BOOL Init();
00785
00786 MILLIPOINT Value;
00787 };
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802 class AttrTxtBase : public NodeAttribute
00803 {
00804 CC_DECLARE_DYNCREATE(AttrTxtBase)
00805
00806 public:
00807
00808 AttrTxtBase();
00809 AttrTxtBase(Node* ContextNode,
00810 AttachNodeDirection Direction,
00811 BOOL Locked=FALSE,
00812 BOOL Mangled=FALSE,
00813 BOOL Marked=FALSE,
00814 BOOL Selected=FALSE);
00815
00816 virtual BOOL IsKindOfTextAttribute() const { return TRUE; }
00817
00818 virtual BOOL EffectsParentBounds() { return TRUE; };
00819 virtual void BaseLineRelativeTransform(FIXED16 Scale, FIXED16 Aspect) { return; }
00820
00821 };
00822
00823
00824
00825
00826
00827
00828
00829
00830
00831
00832
00833 class AttrTxtFontTypeface : public AttrTxtBase
00834 {
00835 CC_DECLARE_DYNCREATE(AttrTxtFontTypeface)
00836
00837 public:
00838
00839 AttrTxtFontTypeface();
00840 AttrTxtFontTypeface(Node* ContextNode,
00841 AttachNodeDirection Direction,
00842 BOOL Locked=FALSE,
00843 BOOL Mangled=FALSE,
00844 BOOL Marked=FALSE,
00845 BOOL Selected=FALSE);
00846
00847
00848 void Render( RenderRegion* pRender );
00849
00850 Node* SimpleCopy();
00851
00852 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
00853
00854 virtual UINT32 GetAttrNameID(void);
00855 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTFONTTYPEFACE; }
00856
00857
00858
00859 void GetDebugDetails(StringBase* Str);
00860
00861 virtual UINT32 GetNodeSize() const;
00862
00863 virtual AttributeValue* GetAttributeValue() { return &Value; }
00864
00865 void SetBold(BOOL State) { Value.IsBold = State; }
00866 void SetItalic(BOOL State) { Value.IsItalic = State; }
00867 BOOL IsBold() { return Value.IsBold; }
00868 BOOL IsItalic() { return Value.IsItalic; }
00869 BOOL IsATypeface() const { return TRUE; }
00870
00871
00872 void UpdateCachedData();
00873
00874 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
00875
00876 private:
00877 void CopyNodeContents( AttrTxtFontTypeface* NodeCopy );
00878
00879
00880 public:
00881 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
00882 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
00883
00884 public:
00885 TxtFontTypefaceAttribute Value;
00886 };
00887
00888
00889
00890
00891
00892
00893
00894
00895
00896
00897
00898
00899 class AttrTxtBold : public AttrTxtBase
00900 {
00901 CC_DECLARE_DYNCREATE(AttrTxtBold)
00902
00903 public:
00904
00905 AttrTxtBold();
00906 AttrTxtBold(Node* ContextNode,
00907 AttachNodeDirection Direction,
00908 BOOL Locked=FALSE,
00909 BOOL Mangled=FALSE,
00910 BOOL Marked=FALSE,
00911 BOOL Selected=FALSE);
00912
00913
00914 void Render( RenderRegion* pRender );
00915
00916 Node* SimpleCopy();
00917
00918 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
00919
00920 virtual UINT32 GetAttrNameID(void);
00921 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTBOLD; }
00922
00923
00924
00925 void GetDebugDetails(StringBase* Str);
00926
00927 virtual UINT32 GetNodeSize() const;
00928
00929 virtual AttributeValue* GetAttributeValue() { return &Value; }
00930
00931 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
00932
00933 private:
00934 void CopyNodeContents( AttrTxtBold* NodeCopy );
00935
00936
00937 public:
00938 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
00939 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
00940
00941 public:
00942 TxtBoldAttribute Value;
00943 };
00944
00945
00946
00947
00948
00949
00950
00951
00952
00953
00954
00955
00956 class AttrTxtItalic : public AttrTxtBase
00957 {
00958 CC_DECLARE_DYNCREATE(AttrTxtItalic)
00959
00960 public:
00961
00962 AttrTxtItalic();
00963 AttrTxtItalic(Node* ContextNode,
00964 AttachNodeDirection Direction,
00965 BOOL Locked=FALSE,
00966 BOOL Mangled=FALSE,
00967 BOOL Marked=FALSE,
00968 BOOL Selected=FALSE);
00969
00970
00971 void Render( RenderRegion* pRender );
00972
00973 Node* SimpleCopy();
00974
00975 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
00976
00977 virtual UINT32 GetAttrNameID(void);
00978 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTITALIC; }
00979
00980
00981
00982 void GetDebugDetails(StringBase* Str);
00983
00984 virtual UINT32 GetNodeSize() const;
00985
00986 virtual AttributeValue* GetAttributeValue() { return &Value; }
00987
00988 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
00989
00990 private:
00991 void CopyNodeContents( AttrTxtItalic* NodeCopy );
00992
00993
00994 public:
00995 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
00996 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
00997
00998 public:
00999 TxtItalicAttribute Value;
01000 };
01001
01002
01003
01004
01005
01006
01007
01008
01009
01010
01011
01012
01013 class AttrTxtUnderline : public AttrTxtBase
01014 {
01015 CC_DECLARE_DYNCREATE(AttrTxtUnderline)
01016
01017 public:
01018
01019 AttrTxtUnderline();
01020 AttrTxtUnderline(Node* ContextNode,
01021 AttachNodeDirection Direction,
01022 BOOL Locked=FALSE,
01023 BOOL Mangled=FALSE,
01024 BOOL Marked=FALSE,
01025 BOOL Selected=FALSE);
01026
01027
01028 void Render( RenderRegion* pRender );
01029
01030 Node* SimpleCopy();
01031
01032 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
01033
01034 virtual UINT32 GetAttrNameID(void);
01035 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTUNDERLINE; }
01036
01037
01038
01039 void GetDebugDetails(StringBase* Str);
01040
01041 virtual UINT32 GetNodeSize() const;
01042
01043 virtual AttributeValue* GetAttributeValue() { return &Value; }
01044
01045 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
01046
01047 private:
01048 void CopyNodeContents( AttrTxtUnderline* NodeCopy );
01049
01050
01051 public:
01052 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01053 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01054
01055 public:
01056 TxtUnderlineAttribute Value;
01057 };
01058
01059
01060
01061
01062
01063
01064
01065
01066
01067
01068
01069
01070 class AttrTxtAspectRatio : public AttrTxtBase
01071 {
01072 CC_DECLARE_DYNCREATE(AttrTxtAspectRatio)
01073
01074 public:
01075
01076 AttrTxtAspectRatio();
01077 AttrTxtAspectRatio(Node* ContextNode,
01078 AttachNodeDirection Direction,
01079 BOOL Locked=FALSE,
01080 BOOL Mangled=FALSE,
01081 BOOL Marked=FALSE,
01082 BOOL Selected=FALSE);
01083
01084
01085 void Render( RenderRegion* pRender );
01086
01087 Node* SimpleCopy();
01088
01089 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
01090
01091 virtual UINT32 GetAttrNameID(void);
01092 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTASPECTRATIO; }
01093
01094
01095
01096 void GetDebugDetails(StringBase* Str);
01097
01098 virtual UINT32 GetNodeSize() const;
01099
01100 virtual AttributeValue* GetAttributeValue() { return &Value; }
01101 virtual void BaseLineRelativeTransform(FIXED16 Scale, FIXED16 Aspect);
01102
01103 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
01104
01105 private:
01106 void CopyNodeContents( AttrTxtAspectRatio* NodeCopy );
01107
01108
01109 public:
01110 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01111 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01112
01113 public:
01114 TxtAspectRatioAttribute Value;
01115 };
01116
01117
01118
01119
01120
01121
01122
01123
01124
01125
01126
01127
01128 class AttrTxtJustification : public AttrTxtBase
01129 {
01130 CC_DECLARE_DYNCREATE(AttrTxtJustification)
01131
01132 public:
01133
01134 AttrTxtJustification();
01135 AttrTxtJustification(Node* ContextNode,
01136 AttachNodeDirection Direction,
01137 BOOL Locked=FALSE,
01138 BOOL Mangled=FALSE,
01139 BOOL Marked=FALSE,
01140 BOOL Selected=FALSE);
01141
01142
01143 void Render( RenderRegion* pRender );
01144
01145 Node* SimpleCopy();
01146
01147 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
01148
01149 virtual UINT32 GetAttrNameID(void);
01150
01151
01152
01153 void GetDebugDetails(StringBase* Str);
01154
01155 virtual UINT32 GetNodeSize() const;
01156
01157 virtual AttributeValue* GetAttributeValue() { return &Value; }
01158 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTJUSTIFICATION; }
01159
01160 virtual BOOL IsALineLevelAttrib() {return TRUE;};
01161
01162 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
01163
01164 private:
01165 void CopyNodeContents( AttrTxtJustification* NodeCopy );
01166
01167
01168 public:
01169 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01170 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01171
01172 public:
01173 TxtJustificationAttribute Value;
01174 };
01175
01176
01177
01178
01179
01180
01181
01182
01183
01184
01185
01186
01187 class AttrTxtTracking : public AttrTxtBase
01188 {
01189 CC_DECLARE_DYNCREATE(AttrTxtTracking)
01190
01191 public:
01192
01193 AttrTxtTracking();
01194 AttrTxtTracking(Node* ContextNode,
01195 AttachNodeDirection Direction,
01196 BOOL Locked=FALSE,
01197 BOOL Mangled=FALSE,
01198 BOOL Marked=FALSE,
01199 BOOL Selected=FALSE);
01200
01201
01202 void Render( RenderRegion* pRender );
01203
01204 Node* SimpleCopy();
01205
01206 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
01207
01208 virtual UINT32 GetAttrNameID(void);
01209 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTTRACKING; }
01210
01211
01212
01213 void GetDebugDetails(StringBase* Str);
01214
01215 virtual UINT32 GetNodeSize() const;
01216
01217 virtual AttributeValue* GetAttributeValue() { return &Value; }
01218
01219 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
01220
01221 private:
01222 void CopyNodeContents( AttrTxtTracking* NodeCopy );
01223
01224
01225 public:
01226 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01227 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01228
01229 public:
01230 TxtTrackingAttribute Value;
01231 };
01232
01233
01234
01235
01236
01237
01238
01239
01240
01241
01242
01243
01244 class AttrTxtFontSize : public AttrTxtBase
01245 {
01246 CC_DECLARE_DYNCREATE(AttrTxtFontSize)
01247
01248 public:
01249
01250 AttrTxtFontSize();
01251 AttrTxtFontSize(Node* ContextNode,
01252 AttachNodeDirection Direction,
01253 BOOL Locked=FALSE,
01254 BOOL Mangled=FALSE,
01255 BOOL Marked=FALSE,
01256 BOOL Selected=FALSE);
01257
01258
01259 void Render( RenderRegion* pRender );
01260
01261 Node* SimpleCopy();
01262
01263 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
01264
01265 virtual UINT32 GetAttrNameID(void);
01266 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTFONTSIZE; }
01267
01268
01269
01270 void GetDebugDetails(StringBase* Str);
01271
01272 virtual UINT32 GetNodeSize() const;
01273
01274 virtual AttributeValue* GetAttributeValue() { return &Value; }
01275
01276 virtual void BaseLineRelativeTransform(FIXED16 Scale, FIXED16 Aspect);
01277
01278 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
01279
01280 private:
01281 void CopyNodeContents( AttrTxtFontSize* NodeCopy );
01282
01283
01284 public:
01285 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01286 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01287
01288 public:
01289 TxtFontSizeAttribute Value;
01290 };
01291
01292
01293
01294
01295
01296
01297
01298
01299
01300
01301
01302
01303 class AttrTxtScript : public AttrTxtBase
01304 {
01305 CC_DECLARE_DYNCREATE(AttrTxtScript)
01306
01307 public:
01308
01309 AttrTxtScript();
01310 AttrTxtScript(Node* ContextNode,
01311 AttachNodeDirection Direction,
01312 BOOL Locked=FALSE,
01313 BOOL Mangled=FALSE,
01314 BOOL Marked=FALSE,
01315 BOOL Selected=FALSE);
01316
01317
01318 void Render( RenderRegion* pRender );
01319
01320 Node* SimpleCopy();
01321
01322 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
01323
01324 virtual UINT32 GetAttrNameID(void);
01325 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTSCRIPT; }
01326
01327
01328
01329 void GetDebugDetails(StringBase* Str);
01330
01331 virtual UINT32 GetNodeSize() const;
01332
01333 virtual AttributeValue* GetAttributeValue() { return &Value; }
01334
01335 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
01336
01337 private:
01338 void CopyNodeContents( AttrTxtScript* NodeCopy );
01339
01340
01341 public:
01342 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01343 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01344
01345 public:
01346 TxtScriptAttribute Value;
01347 };
01348
01349
01350
01351
01352
01353
01354
01355
01356
01357
01358
01359
01360 class AttrTxtBaseLine : public AttrTxtBase
01361 {
01362 CC_DECLARE_DYNCREATE(AttrTxtBaseLine)
01363
01364 public:
01365
01366 AttrTxtBaseLine();
01367 AttrTxtBaseLine(Node* ContextNode,
01368 AttachNodeDirection Direction,
01369 BOOL Locked=FALSE,
01370 BOOL Mangled=FALSE,
01371 BOOL Marked=FALSE,
01372 BOOL Selected=FALSE);
01373
01374
01375 void Render( RenderRegion* pRender );
01376
01377 Node* SimpleCopy();
01378
01379 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
01380
01381 virtual UINT32 GetAttrNameID(void);
01382 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTBASELINE; }
01383
01384
01385
01386 void GetDebugDetails(StringBase* Str);
01387
01388 virtual UINT32 GetNodeSize() const;
01389
01390 virtual AttributeValue* GetAttributeValue() { return &Value; }
01391
01392 virtual void BaseLineRelativeTransform(FIXED16 Scale, FIXED16 Aspect);
01393
01394 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
01395
01396 private:
01397 void CopyNodeContents( AttrTxtBaseLine* NodeCopy );
01398
01399
01400 public:
01401 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01402 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01403
01404 public:
01405 TxtBaseLineAttribute Value;
01406 };
01407
01408
01409
01410
01411
01412
01413
01414
01415
01416
01417
01418 class AttrTxtLeftMargin : public AttrTxtBase
01419 {
01420 CC_DECLARE_DYNCREATE(AttrTxtLeftMargin)
01421
01422 public:
01423
01424 AttrTxtLeftMargin() {}
01425 AttrTxtLeftMargin(Node* ContextNode,
01426 AttachNodeDirection Direction,
01427 BOOL Locked=FALSE,
01428 BOOL Mangled=FALSE,
01429 BOOL Marked=FALSE,
01430 BOOL Selected=FALSE);
01431
01432 void Render( RenderRegion* pRender );
01433
01434 Node* SimpleCopy();
01435
01436 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
01437
01438 virtual UINT32 GetAttrNameID(void);
01439 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTLEFTMARGIN; }
01440
01441 void GetDebugDetails(StringBase* Str);
01442
01443 virtual UINT32 GetNodeSize() const;
01444
01445 virtual AttributeValue* GetAttributeValue() { return &Value; }
01446 virtual BOOL IsALineLevelAttrib() { return TRUE; }
01447
01448 virtual void BaseLineRelativeTransform(FIXED16 Scale, FIXED16 Aspect);
01449
01450 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
01451
01452 private:
01453 void CopyNodeContents( AttrTxtLeftMargin* NodeCopy );
01454
01455
01456 public:
01457 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01458 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01459
01460 public:
01461 TxtLeftMarginAttribute Value;
01462 };
01463
01464
01465
01466
01467
01468
01469
01470
01471
01472
01473
01474 class AttrTxtRightMargin : public AttrTxtBase
01475 {
01476 CC_DECLARE_DYNCREATE(AttrTxtRightMargin)
01477
01478 public:
01479
01480 AttrTxtRightMargin() {}
01481 AttrTxtRightMargin(Node* ContextNode,
01482 AttachNodeDirection Direction,
01483 BOOL Locked=FALSE,
01484 BOOL Mangled=FALSE,
01485 BOOL Marked=FALSE,
01486 BOOL Selected=FALSE);
01487
01488 void Render( RenderRegion* pRender );
01489
01490 Node* SimpleCopy();
01491
01492 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
01493
01494 virtual UINT32 GetAttrNameID(void);
01495 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTRIGHTMARGIN; }
01496
01497 void GetDebugDetails(StringBase* Str);
01498
01499 virtual UINT32 GetNodeSize() const;
01500
01501 virtual AttributeValue* GetAttributeValue() { return &Value; }
01502 virtual BOOL IsALineLevelAttrib() { return TRUE; }
01503
01504 virtual void BaseLineRelativeTransform(FIXED16 Scale, FIXED16 Aspect);
01505
01506 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
01507
01508 private:
01509 void CopyNodeContents( AttrTxtRightMargin* NodeCopy );
01510
01511
01512 public:
01513 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01514 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01515
01516 public:
01517 TxtRightMarginAttribute Value;
01518 };
01519
01520
01521
01522
01523
01524
01525
01526
01527
01528
01529
01530 class AttrTxtFirstIndent : public AttrTxtBase
01531 {
01532 CC_DECLARE_DYNCREATE(AttrTxtFirstIndent)
01533
01534 public:
01535
01536 AttrTxtFirstIndent() {}
01537 AttrTxtFirstIndent(Node* ContextNode,
01538 AttachNodeDirection Direction,
01539 BOOL Locked=FALSE,
01540 BOOL Mangled=FALSE,
01541 BOOL Marked=FALSE,
01542 BOOL Selected=FALSE);
01543
01544 void Render( RenderRegion* pRender );
01545
01546 Node* SimpleCopy();
01547
01548 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
01549
01550 virtual UINT32 GetAttrNameID(void);
01551 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTFIRSTINDENT; }
01552
01553 void GetDebugDetails(StringBase* Str);
01554
01555 virtual UINT32 GetNodeSize() const;
01556
01557 virtual AttributeValue* GetAttributeValue() { return &Value; }
01558 virtual BOOL IsALineLevelAttrib() { return TRUE; }
01559
01560 virtual void BaseLineRelativeTransform(FIXED16 Scale, FIXED16 Aspect);
01561
01562 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
01563
01564 private:
01565 void CopyNodeContents( AttrTxtFirstIndent* NodeCopy );
01566
01567
01568 public:
01569 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01570 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01571
01572 public:
01573 TxtFirstIndentAttribute Value;
01574 };
01575
01576
01577
01578
01579
01580
01581
01582
01583
01584
01585
01586 class AttrTxtRuler : public AttrTxtBase
01587 {
01588 CC_DECLARE_DYNCREATE(AttrTxtRuler)
01589
01590 public:
01591
01592 AttrTxtRuler() {}
01593 AttrTxtRuler(Node* ContextNode,
01594 AttachNodeDirection Direction,
01595 BOOL Locked=FALSE,
01596 BOOL Mangled=FALSE,
01597 BOOL Marked=FALSE,
01598 BOOL Selected=FALSE);
01599
01600 void Render( RenderRegion* pRender );
01601
01602 Node* SimpleCopy();
01603
01604 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
01605
01606 virtual UINT32 GetAttrNameID(void);
01607 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTRULER; }
01608
01609 void GetDebugDetails(StringBase* Str);
01610
01611 virtual UINT32 GetNodeSize() const;
01612
01613 virtual AttributeValue* GetAttributeValue() { return &Value; }
01614 virtual BOOL IsALineLevelAttrib() { return TRUE; }
01615
01616 virtual void BaseLineRelativeTransform(FIXED16 Scale, FIXED16 Aspect);
01617
01618 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
01619
01620 private:
01621 void CopyNodeContents( AttrTxtRuler* NodeCopy );
01622
01623
01624 public:
01625 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01626 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01627
01628 public:
01629 TxtRulerAttribute Value;
01630 };
01631
01632
01633
01634
01635
01636
01637
01638
01639
01640
01641
01642
01643 class AttrTxtLineSpace : public AttrTxtBase
01644 {
01645 CC_DECLARE_DYNCREATE(AttrTxtLineSpace)
01646
01647 public:
01648
01649 AttrTxtLineSpace();
01650 AttrTxtLineSpace(MILLIPOINT Value);
01651 AttrTxtLineSpace(FIXED16 Ratio);
01652
01653 AttrTxtLineSpace(Node* ContextNode,
01654 AttachNodeDirection Direction,
01655 BOOL Locked=FALSE,
01656 BOOL Mangled=FALSE,
01657 BOOL Marked=FALSE,
01658 BOOL Selected=FALSE);
01659
01660
01661 void Render( RenderRegion* pRender );
01662
01663 Node* SimpleCopy();
01664
01665 virtual INT32 operator==(const NodeAttribute& NodeAttrib);
01666
01667 virtual UINT32 GetAttrNameID(void);
01668 virtual AttrIndex GetAttributeIndex () { return ATTR_TXTLINESPACE; }
01669
01670
01671
01672 void GetDebugDetails(StringBase* Str);
01673
01674 virtual UINT32 GetNodeSize() const;
01675
01676 virtual AttributeValue* GetAttributeValue() { return &Value; }
01677
01678 virtual BOOL IsALineLevelAttrib() {return TRUE;};
01679
01680 BOOL IsARatio() { return Value.IsARatio(); }
01681
01682 virtual void BaseLineRelativeTransform(FIXED16 Scale, FIXED16 Aspect);
01683
01684 virtual void PolyCopyNodeContents(NodeRenderable* pNodeCopy);
01685
01686 private:
01687 void CopyNodeContents( AttrTxtLineSpace* NodeCopy );
01688
01689
01690 public:
01691 virtual BOOL WritePreChildrenWeb(BaseCamelotFilter* pFilter);
01692 virtual BOOL WritePreChildrenNative(BaseCamelotFilter* pFilter);
01693
01694 public:
01695 TxtLineSpaceAttribute Value;
01696 };
01697
01698
01699
01700
01701
01702
01703
01704
01705
01706
01707
01708
01709
01710
01711
01712
01713
01714
01715
01716
01717
01718
01719
01720
01721
01722
01723
01724
01725
01726
01727
01728
01729
01730
01731
01732
01733
01734
01735
01736
01737
01738
01739
01740
01741
01742
01743
01744
01745
01746
01747
01748
01749
01750
01751
01752
01753
01754
01755
01756
01757
01758
01759
01760
01761
01762
01763
01764
01765
01766
01767
01768
01769
01770
01771
01772
01773
01774
01775
01776 class CharDescription:public CCObject
01777 {
01778 CC_DECLARE_DYNCREATE(CharDescription)
01779
01780
01781 CharDescription() {};
01782 CharDescription(CharDescription& that);
01783 CharDescription(WCHAR CharCode, WORD TypefaceHandle, BOOL Bold, BOOL Italic);
01784
01785 WCHAR GetCharCode() { return (WCHAR)(charHandle >> 16); }
01786 WORD GetTypefaceHandle() { return (WORD)(charHandle & 0x00003FFF); }
01787 BOOL GetBold() { return ((charHandle & 0x00008000) != 0); }
01788 BOOL GetItalic() { return ((charHandle & 0x00004000) != 0); }
01789
01790 public:
01791 UINT32 charHandle;
01792
01793 CharDescription& operator=(CharDescription& that) { this->charHandle =that.charHandle; return *this; }
01794 BOOL operator==(CharDescription& that) const { return this->charHandle==that.charHandle; }
01795 BOOL operator!=(CharDescription& that) const { return this->charHandle!=that.charHandle; }
01796 };
01797
01798 #endif