epoc32/include/txtrich.inl
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 2003-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 
    17 const TUint32 KStyleListExternallyOwned=0x01;
    18 const TUint32 KParaTypeIsSingle=0x02;
    19 
    20  
    21 
    22 TBool CRichText::StyleListPresent()const
    23 /** Tests whether the rich text object uses a style list. The style list may be 
    24 owned by the object itself, or may be externally owned.
    25 
    26 @return ETrue if the object uses a style list. EFalse if not */
    27 	{return iStyleList.IsPtr() && iStyleList.AsPtr();}
    28 
    29 
    30  
    31 CStyleList* CRichText::StyleList()const
    32 /** Gets a pointer to the style list used by the rich text object.
    33 
    34 @return The object's style list. NULL if no style list present. */
    35 	{return (StyleListPresent()) ? iStyleList.AsPtr() : NULL;}
    36 
    37 
    38  
    39 
    40 TInt CRichText::StyleCount()const
    41 /** Gets the number of styles contained in the rich text object's style list. Returns 
    42 zero if there is no style list present.
    43 
    44 @return The number of styles in the style list */
    45 	{return (StyleListPresent()) ? iStyleList->Count():0;}
    46 
    47 
    48 void CRichText::SetStyleListExternallyOwned(TBool aExternallyOwned)
    49 /** Sets whether the style list used by this rich text object is owned by 
    50 the object itself, or is externally owned.
    51 
    52 @param aExternallyOwned ETrue if the style list should be marked as 
    53 externally owned, EFalse if not. */
    54 	{
    55 	if (aExternallyOwned) iFlags|=KStyleListExternallyOwned;
    56 	else iFlags&=~KStyleListExternallyOwned;
    57 	}
    58 
    59 
    60  
    61 
    62 TBool CRichText::StyleListExternallyOwned()const
    63 /** Tests whether the style list used by this rich text object is owned by the 
    64 object itself, or is externally owned. This value is set using SetStyleListExternallyOwned().
    65 
    66 @return ETrue if the rich text object's style list is externally owned. EFalse 
    67 if it owns its style list, or if it does not use a style list. */
    68 	{return iFlags&KStyleListExternallyOwned;}
    69 
    70 
    71  
    72 void CRichText::NotifyStyleDeletedL(const CParagraphStyle* aStyle)
    73 /** Removes a style from all paragraphs to which it applies. The formatting is 
    74 reset to the global character and paragraph format layers, except that any 
    75 specific formatting which has been applied to the paragraphs is retained.
    76 
    77 Notes:
    78 
    79 This function should be called on the text content object after deleting a 
    80 style in the style list.
    81 
    82 A panic occurs if the rich text object does not use a style list (this can 
    83 be tested for using StyleListPresent()).
    84 
    85 @param aStyle Pointer to the style to remove from the rich text object. */
    86 	{NotifyStyleChangedL(NULL,aStyle);}
    87 
    88 
    89  
    90 
    91 MRichTextStoreResolver* CRichText::StoreResolver()const
    92 /** Gets the store resolver. A store resolver may be set during construction, or 
    93 by calling CRichText::SetPictureFactory().
    94 
    95 @return The store resolver. This determines which file store the picture is 
    96 stored in. */
    97 	{return iStoreResolver;}
    98 
    99 
   100  
   101 
   102 MPictureFactory* CRichText::PictureFactory()const
   103 /** Gets the picture factory. A picture factory may be set during construction, 
   104 or by calling CRichText::SetPictureFactory().
   105 
   106 @return The picture factory */
   107 	{return iPictureFactory;}