1.1 --- a/epoc32/include/frmvis.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/frmvis.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,123 @@
1.4 -frmvis.h
1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +#ifndef __FRMVIS_H__
1.21 +#define __FRMVIS_H__
1.22 +
1.23 +#include <e32std.h>
1.24 +#include <e32base.h>
1.25 +
1.26 +class RReadStream;
1.27 +class RWriteStream;
1.28 +
1.29 +/**
1.30 +A set of flags to indicate which non-printing characters (e.g. space, tab,
1.31 +paragraph break, etc.) should be drawn using symbols. By default, all
1.32 +non-printing characters are hidden.
1.33 +
1.34 +An instance of this class is used in
1.35 +CTextLayout::SetNonPrintingCharsVisibility().
1.36 +@publishedAll
1.37 +@released
1.38 +*/
1.39 +class TNonPrintingCharVisibility
1.40 +
1.41 + {
1.42 +private:
1.43 + enum TShowFormatChars
1.44 + {
1.45 + EFNothingVisible=0x000,
1.46 + EFTabsVisible=0x001,
1.47 + EFSpacesVisible=0x002,
1.48 + EFParagraphDelimitersVisible=0x004,
1.49 + EFLineBreaksVisible=0x008,
1.50 + EFPotentialHyphensVisible=0x010,
1.51 + EFNonBreakingHyphensVisible=0x020,
1.52 + EFNonBreakingSpacesVisible=0x040,
1.53 + EFPageBreaksVisible=0x080,
1.54 + EFEverythingVisible=0xffffffff
1.55 + };
1.56 +public:
1.57 + IMPORT_C TNonPrintingCharVisibility();
1.58 + IMPORT_C TNonPrintingCharVisibility(const TNonPrintingCharVisibility& aVisibility);
1.59 + IMPORT_C TNonPrintingCharVisibility& operator=(const TNonPrintingCharVisibility& aVisibility);
1.60 + IMPORT_C void ExternalizeL(RWriteStream& aStream)const;
1.61 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.62 + IMPORT_C void SetAllVisible();
1.63 + IMPORT_C void SetNoneVisible();
1.64 + IMPORT_C void SetTabsVisible(TBool aVisible);
1.65 + IMPORT_C void SetSpacesVisible(TBool aVisible);
1.66 + IMPORT_C void SetParagraphDelimitersVisible(TBool aVisible);
1.67 + IMPORT_C void SetLineBreaksVisible(TBool aVisible);
1.68 + IMPORT_C void SetPotentialHyphensVisible(TBool aVisible);
1.69 + IMPORT_C void SetNonBreakingHyphensVisible(TBool aVisible);
1.70 + IMPORT_C void SetNonBreakingSpacesVisible(TBool aVisible);
1.71 + IMPORT_C void SetPageBreaksVisible(TBool aVisible);
1.72 +
1.73 + /** Tests whether all non-printing characters are visible.
1.74 + @return ETrue if all non-printing characters are visible. EFalse if any or
1.75 + all hidden. */
1.76 + inline TBool AllVisible()const{return iVisible==EFEverythingVisible;};
1.77 +
1.78 + /** Tests whether all non-printing characters are hidden.
1.79 + @return ETrue if all non-printing characters are hidden. EFalse if any are
1.80 + visible. */
1.81 + inline TBool NoneVisible()const{return iVisible==EFNothingVisible;};
1.82 +
1.83 + /** Tests whether tab stop characters are visible.
1.84 + @return ETrue if tab stop characters are visible. EFalse if hidden. */
1.85 + inline TBool TabsVisible()const{return iVisible&EFTabsVisible;};
1.86 +
1.87 + /** Tests whether space characters are visible.
1.88 +
1.89 + Note: To get the the visibility of non-breaking space characters, use
1.90 + NonBreakingSpacesVisible() instead.
1.91 + @return ETrue if space characters are visible. EFalse if hidden. */
1.92 + inline TBool SpacesVisible()const{return iVisible&EFSpacesVisible;};
1.93 +
1.94 + /** Tests whether paragraph delimiters are visible.
1.95 + @return ETrue if paragraph delimiters are visible. EFalse if hidden. */
1.96 + inline TBool ParagraphDelimitersVisible()const{return iVisible&EFParagraphDelimitersVisible;};
1.97 +
1.98 + /** Tests whether forced line break characters are visible.
1.99 + @return ETrue if forced line break characters are visible. EFalse if hidden.
1.100 + */
1.101 + inline TBool LineBreaksVisible()const{return iVisible&EFLineBreaksVisible;};
1.102 +
1.103 + /** Tests whether potential hyphen characters (inserted before a line break
1.104 + within a word) are visible.
1.105 +
1.106 + @return ETrue if potential hyphen characters are visible. EFalse if hidden.
1.107 + */
1.108 + inline TBool PotentialHyphensVisible()const{return iVisible&EFPotentialHyphensVisible;};
1.109 +
1.110 + /** Tests whether non-breaking hyphens (enclosing word is always kept on
1.111 + the same line) are visible.
1.112 + @return ETrue if non-breaking hyphens are visible. EFalse if hidden. */
1.113 + inline TBool NonBreakingHyphensVisible()const{return iVisible&EFNonBreakingHyphensVisible;};
1.114 +
1.115 + /** Tests whether non-breaking spaces are visible.
1.116 + @return ETrue if non-breaking spaces are visible. EFalse if hidden. */
1.117 + inline TBool NonBreakingSpacesVisible()const{return iVisible&EFNonBreakingSpacesVisible;};
1.118 +
1.119 + /** Tests whether page break characters are visible.
1.120 + @return ETrue if page break characters are visible. EFalse if hidden. */
1.121 + inline TBool PageBreaksVisible()const{return iVisible&EFPageBreaksVisible;};
1.122 +
1.123 +private:
1.124 + TUint32 iVisible;
1.125 + };
1.126 +
1.127 +#endif