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.
15 * Definitions of non-printing characters' visibility classes.
23 EXPORT_C TNonPrintingCharVisibility::TNonPrintingCharVisibility()
24 :iVisible(EFNothingVisible)
28 EXPORT_C TNonPrintingCharVisibility::TNonPrintingCharVisibility(const TNonPrintingCharVisibility& aVisibility)
29 :iVisible(aVisibility.iVisible)
32 EXPORT_C TNonPrintingCharVisibility& TNonPrintingCharVisibility::operator=(const TNonPrintingCharVisibility& aVisibility)
34 iVisible=aVisibility.iVisible;
38 /** Externalises a TNonPrintingCharVisibility object to a write stream. The
39 presence of this function means that the standard templated operator<<()
40 (defined in s32strm.h) is available to externalise objects of this class.
42 @param aStream Stream to which the object should be externalised. */
43 EXPORT_C void TNonPrintingCharVisibility::ExternalizeL(RWriteStream& aStream)const
45 aStream.WriteUint32L(iVisible);
48 /** Internalises a TNonPrintingCharVisibility object from a read stream. The
49 presence of this function means that the standard templated operator>>()
50 (defined in s32strm.h) is available to internalise objects of this class.
52 @param aStream Stream from which the object should be internalised. */
53 EXPORT_C void TNonPrintingCharVisibility::InternalizeL(RReadStream& aStream)
55 iVisible=aStream.ReadUint32L();
58 /** Sets all non-printing characters to be drawn using symbols. */
59 EXPORT_C void TNonPrintingCharVisibility::SetAllVisible()
61 iVisible=(TUint32)EFEverythingVisible;
64 /** Sets all non-printing characters to be hidden. */
65 EXPORT_C void TNonPrintingCharVisibility::SetNoneVisible()
67 iVisible=EFNothingVisible;
70 /** Sets the visibility of tab stops.
72 @param aVisible True for visible tab stops. False for hidden. */
73 EXPORT_C void TNonPrintingCharVisibility::SetTabsVisible(TBool aVisible)
76 iVisible | EFTabsVisible : iVisible & ~EFTabsVisible;
79 /** Sets the visibility of space characters.
81 @param aVisible True for visible space characters. False for hidden. */
82 EXPORT_C void TNonPrintingCharVisibility::SetSpacesVisible(TBool aVisible)
85 iVisible | EFSpacesVisible : iVisible & ~EFSpacesVisible;
88 /** Sets the visibility of paragraph delimiters.
90 @param aVisible True for visible paragraph delimiters, false for hidden. */
91 EXPORT_C void TNonPrintingCharVisibility::SetParagraphDelimitersVisible(TBool aVisible)
94 iVisible | EFParagraphDelimitersVisible
95 : iVisible & ~EFParagraphDelimitersVisible;
98 /** Sets the visibility of line breaks (force a new line without beginning a
101 @param aVisible True for visible line breaks. False for hidden. */
102 EXPORT_C void TNonPrintingCharVisibility::SetLineBreaksVisible(TBool aVisible)
105 iVisible | EFLineBreaksVisible : iVisible & ~EFLineBreaksVisible;
108 /** Sets the visibility of potential hyphens (inserted before a line break
111 @param aVisible True for visible potential hyphens, false for hidden. */
112 EXPORT_C void TNonPrintingCharVisibility::SetPotentialHyphensVisible(TBool aVisible)
115 iVisible | EFPotentialHyphensVisible
116 : iVisible & ~EFPotentialHyphensVisible;
119 /** Sets the visibility of non-breaking hyphens (enclosing word is always kept
122 @param aVisible True for visible non-breaking hyphens, false for hidden. */
123 EXPORT_C void TNonPrintingCharVisibility::SetNonBreakingHyphensVisible(TBool aVisible)
126 iVisible | EFNonBreakingHyphensVisible
127 : iVisible & ~EFNonBreakingHyphensVisible;
130 /** Sets the visibility of non-breaking spaces.
132 @param aVisible True for visible non-breaking spaces, false for hidden. */
133 EXPORT_C void TNonPrintingCharVisibility::SetNonBreakingSpacesVisible(TBool aVisible)
136 iVisible | EFNonBreakingSpacesVisible
137 : iVisible & ~EFNonBreakingSpacesVisible;
140 /** Sets the visibility of page breaks.
142 @param aVisible True for visible page breaks, false for hidden. */
143 EXPORT_C void TNonPrintingCharVisibility::SetPageBreaksVisible(TBool aVisible)
146 iVisible | EFPageBreaksVisible
147 : iVisible & ~EFPageBreaksVisible;