Update contrib.
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
29 A set of flags to indicate which non-printing characters (e.g. space, tab,
30 paragraph break, etc.) should be drawn using symbols. By default, all
31 non-printing characters are hidden.
33 An instance of this class is used in
34 CTextLayout::SetNonPrintingCharsVisibility().
38 class TNonPrintingCharVisibility
44 EFNothingVisible=0x000,
46 EFSpacesVisible=0x002,
47 EFParagraphDelimitersVisible=0x004,
48 EFLineBreaksVisible=0x008,
49 EFPotentialHyphensVisible=0x010,
50 EFNonBreakingHyphensVisible=0x020,
51 EFNonBreakingSpacesVisible=0x040,
52 EFPageBreaksVisible=0x080,
53 EFEverythingVisible=0xffffffff
56 IMPORT_C TNonPrintingCharVisibility();
57 IMPORT_C TNonPrintingCharVisibility(const TNonPrintingCharVisibility& aVisibility);
58 IMPORT_C TNonPrintingCharVisibility& operator=(const TNonPrintingCharVisibility& aVisibility);
59 IMPORT_C void ExternalizeL(RWriteStream& aStream)const;
60 IMPORT_C void InternalizeL(RReadStream& aStream);
61 IMPORT_C void SetAllVisible();
62 IMPORT_C void SetNoneVisible();
63 IMPORT_C void SetTabsVisible(TBool aVisible);
64 IMPORT_C void SetSpacesVisible(TBool aVisible);
65 IMPORT_C void SetParagraphDelimitersVisible(TBool aVisible);
66 IMPORT_C void SetLineBreaksVisible(TBool aVisible);
67 IMPORT_C void SetPotentialHyphensVisible(TBool aVisible);
68 IMPORT_C void SetNonBreakingHyphensVisible(TBool aVisible);
69 IMPORT_C void SetNonBreakingSpacesVisible(TBool aVisible);
70 IMPORT_C void SetPageBreaksVisible(TBool aVisible);
72 /** Tests whether all non-printing characters are visible.
73 @return ETrue if all non-printing characters are visible. EFalse if any or
75 inline TBool AllVisible()const{return iVisible==EFEverythingVisible;};
77 /** Tests whether all non-printing characters are hidden.
78 @return ETrue if all non-printing characters are hidden. EFalse if any are
80 inline TBool NoneVisible()const{return iVisible==EFNothingVisible;};
82 /** Tests whether tab stop characters are visible.
83 @return ETrue if tab stop characters are visible. EFalse if hidden. */
84 inline TBool TabsVisible()const{return iVisible&EFTabsVisible;};
86 /** Tests whether space characters are visible.
88 Note: To get the the visibility of non-breaking space characters, use
89 NonBreakingSpacesVisible() instead.
90 @return ETrue if space characters are visible. EFalse if hidden. */
91 inline TBool SpacesVisible()const{return iVisible&EFSpacesVisible;};
93 /** Tests whether paragraph delimiters are visible.
94 @return ETrue if paragraph delimiters are visible. EFalse if hidden. */
95 inline TBool ParagraphDelimitersVisible()const{return iVisible&EFParagraphDelimitersVisible;};
97 /** Tests whether forced line break characters are visible.
98 @return ETrue if forced line break characters are visible. EFalse if hidden.
100 inline TBool LineBreaksVisible()const{return iVisible&EFLineBreaksVisible;};
102 /** Tests whether potential hyphen characters (inserted before a line break
103 within a word) are visible.
105 @return ETrue if potential hyphen characters are visible. EFalse if hidden.
107 inline TBool PotentialHyphensVisible()const{return iVisible&EFPotentialHyphensVisible;};
109 /** Tests whether non-breaking hyphens (enclosing word is always kept on
110 the same line) are visible.
111 @return ETrue if non-breaking hyphens are visible. EFalse if hidden. */
112 inline TBool NonBreakingHyphensVisible()const{return iVisible&EFNonBreakingHyphensVisible;};
114 /** Tests whether non-breaking spaces are visible.
115 @return ETrue if non-breaking spaces are visible. EFalse if hidden. */
116 inline TBool NonBreakingSpacesVisible()const{return iVisible&EFNonBreakingSpacesVisible;};
118 /** Tests whether page break characters are visible.
119 @return ETrue if page break characters are visible. EFalse if hidden. */
120 inline TBool PageBreaksVisible()const{return iVisible&EFPageBreaksVisible;};