epoc32/include/frmvis.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 frmvis.h
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // 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
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __FRMVIS_H__
       
    17 #define __FRMVIS_H__
       
    18 
       
    19 #include <e32std.h>
       
    20 #include <e32base.h>
       
    21 
       
    22 class RReadStream;
       
    23 class RWriteStream;
       
    24 
       
    25 /** 
       
    26 A set of flags to indicate which non-printing characters (e.g. space, tab,
       
    27 paragraph break, etc.) should be drawn using symbols. By default, all
       
    28 non-printing characters are hidden.
       
    29 
       
    30 An instance of this class is used in
       
    31 CTextLayout::SetNonPrintingCharsVisibility().
       
    32 @publishedAll
       
    33 @released
       
    34 */
       
    35 class TNonPrintingCharVisibility
       
    36 
       
    37 	{
       
    38 private:
       
    39 	enum TShowFormatChars
       
    40 		{
       
    41 		EFNothingVisible=0x000,
       
    42 		EFTabsVisible=0x001,
       
    43 		EFSpacesVisible=0x002,
       
    44 		EFParagraphDelimitersVisible=0x004,
       
    45 		EFLineBreaksVisible=0x008,
       
    46 		EFPotentialHyphensVisible=0x010,
       
    47 		EFNonBreakingHyphensVisible=0x020,
       
    48 		EFNonBreakingSpacesVisible=0x040,
       
    49 		EFPageBreaksVisible=0x080,
       
    50 		EFEverythingVisible=0xffffffff
       
    51 		};
       
    52 public:
       
    53 	IMPORT_C TNonPrintingCharVisibility();
       
    54 	IMPORT_C TNonPrintingCharVisibility(const TNonPrintingCharVisibility& aVisibility);
       
    55 	IMPORT_C TNonPrintingCharVisibility& operator=(const TNonPrintingCharVisibility& aVisibility);
       
    56 	IMPORT_C void ExternalizeL(RWriteStream& aStream)const;
       
    57 	IMPORT_C void InternalizeL(RReadStream& aStream);
       
    58 	IMPORT_C void SetAllVisible();
       
    59 	IMPORT_C void SetNoneVisible();
       
    60 	IMPORT_C void SetTabsVisible(TBool aVisible);
       
    61 	IMPORT_C void SetSpacesVisible(TBool aVisible);
       
    62 	IMPORT_C void SetParagraphDelimitersVisible(TBool aVisible);
       
    63 	IMPORT_C void SetLineBreaksVisible(TBool aVisible);
       
    64 	IMPORT_C void SetPotentialHyphensVisible(TBool aVisible);
       
    65 	IMPORT_C void SetNonBreakingHyphensVisible(TBool aVisible);
       
    66 	IMPORT_C void SetNonBreakingSpacesVisible(TBool aVisible);
       
    67 	IMPORT_C void SetPageBreaksVisible(TBool aVisible);
       
    68 
       
    69 	/** Tests whether all non-printing characters are visible.
       
    70 	@return ETrue if all non-printing characters are visible. EFalse if any or
       
    71 	all hidden. */
       
    72 	inline TBool AllVisible()const{return iVisible==EFEverythingVisible;};
       
    73 
       
    74 	/** Tests whether all non-printing characters are hidden.
       
    75 	@return ETrue if all non-printing characters are hidden. EFalse if any are
       
    76 	visible. */
       
    77 	inline TBool NoneVisible()const{return iVisible==EFNothingVisible;};
       
    78 
       
    79 	/** Tests whether tab stop characters are visible.
       
    80 	@return ETrue if tab stop characters are visible. EFalse if hidden. */
       
    81 	inline TBool TabsVisible()const{return iVisible&EFTabsVisible;};
       
    82 
       
    83 	/** Tests whether space characters are visible.
       
    84 
       
    85 	Note: To get the the visibility of non-breaking space characters, use
       
    86 	NonBreakingSpacesVisible() instead.
       
    87 	@return ETrue if space characters are visible. EFalse if hidden. */
       
    88 	inline TBool SpacesVisible()const{return iVisible&EFSpacesVisible;};
       
    89 
       
    90 	/** Tests whether paragraph delimiters are visible.
       
    91 	@return ETrue if paragraph delimiters are visible. EFalse if hidden. */
       
    92 	inline TBool ParagraphDelimitersVisible()const{return iVisible&EFParagraphDelimitersVisible;};
       
    93 	
       
    94 	/** Tests whether forced line break characters are visible.
       
    95 	@return ETrue if forced line break characters are visible. EFalse if hidden.
       
    96 	*/
       
    97 	inline TBool LineBreaksVisible()const{return iVisible&EFLineBreaksVisible;};
       
    98 	
       
    99 	/** Tests whether potential hyphen characters (inserted before a line break
       
   100 	within a word) are visible.
       
   101 
       
   102 	@return ETrue if potential hyphen characters are visible. EFalse if hidden.
       
   103 	*/
       
   104 	inline TBool PotentialHyphensVisible()const{return iVisible&EFPotentialHyphensVisible;};
       
   105 	
       
   106 	/** Tests whether non-breaking hyphens (enclosing word is always kept on
       
   107 	the same line) are visible.
       
   108 	@return ETrue if non-breaking hyphens are visible. EFalse if hidden. */
       
   109 	inline TBool NonBreakingHyphensVisible()const{return iVisible&EFNonBreakingHyphensVisible;};
       
   110 	
       
   111 	/** Tests whether non-breaking spaces are visible.
       
   112 	@return ETrue if non-breaking spaces are visible. EFalse if hidden. */
       
   113 	inline TBool NonBreakingSpacesVisible()const{return iVisible&EFNonBreakingSpacesVisible;};
       
   114 
       
   115 	/** Tests whether page break characters are visible.
       
   116 	@return ETrue if page break characters are visible. EFalse if hidden. */
       
   117 	inline TBool PageBreaksVisible()const{return iVisible&EFPageBreaksVisible;};
       
   118 
       
   119 private:
       
   120 	TUint32 iVisible;
       
   121 	};
       
   122 
       
   123 #endif