1.1 --- a/epoc32/include/txtrich.inl Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/txtrich.inl Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,107 @@
1.4 -txtrich.inl
1.5 +// Copyright (c) 2003-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 +
1.21 +const TUint32 KStyleListExternallyOwned=0x01;
1.22 +const TUint32 KParaTypeIsSingle=0x02;
1.23 +
1.24 +
1.25 +
1.26 +TBool CRichText::StyleListPresent()const
1.27 +/** Tests whether the rich text object uses a style list. The style list may be
1.28 +owned by the object itself, or may be externally owned.
1.29 +
1.30 +@return ETrue if the object uses a style list. EFalse if not */
1.31 + {return iStyleList.IsPtr() && iStyleList.AsPtr();}
1.32 +
1.33 +
1.34 +
1.35 +CStyleList* CRichText::StyleList()const
1.36 +/** Gets a pointer to the style list used by the rich text object.
1.37 +
1.38 +@return The object's style list. NULL if no style list present. */
1.39 + {return (StyleListPresent()) ? iStyleList.AsPtr() : NULL;}
1.40 +
1.41 +
1.42 +
1.43 +
1.44 +TInt CRichText::StyleCount()const
1.45 +/** Gets the number of styles contained in the rich text object's style list. Returns
1.46 +zero if there is no style list present.
1.47 +
1.48 +@return The number of styles in the style list */
1.49 + {return (StyleListPresent()) ? iStyleList->Count():0;}
1.50 +
1.51 +
1.52 +void CRichText::SetStyleListExternallyOwned(TBool aExternallyOwned)
1.53 +/** Sets whether the style list used by this rich text object is owned by
1.54 +the object itself, or is externally owned.
1.55 +
1.56 +@param aExternallyOwned ETrue if the style list should be marked as
1.57 +externally owned, EFalse if not. */
1.58 + {
1.59 + if (aExternallyOwned) iFlags|=KStyleListExternallyOwned;
1.60 + else iFlags&=~KStyleListExternallyOwned;
1.61 + }
1.62 +
1.63 +
1.64 +
1.65 +
1.66 +TBool CRichText::StyleListExternallyOwned()const
1.67 +/** Tests whether the style list used by this rich text object is owned by the
1.68 +object itself, or is externally owned. This value is set using SetStyleListExternallyOwned().
1.69 +
1.70 +@return ETrue if the rich text object's style list is externally owned. EFalse
1.71 +if it owns its style list, or if it does not use a style list. */
1.72 + {return iFlags&KStyleListExternallyOwned;}
1.73 +
1.74 +
1.75 +
1.76 +void CRichText::NotifyStyleDeletedL(const CParagraphStyle* aStyle)
1.77 +/** Removes a style from all paragraphs to which it applies. The formatting is
1.78 +reset to the global character and paragraph format layers, except that any
1.79 +specific formatting which has been applied to the paragraphs is retained.
1.80 +
1.81 +Notes:
1.82 +
1.83 +This function should be called on the text content object after deleting a
1.84 +style in the style list.
1.85 +
1.86 +A panic occurs if the rich text object does not use a style list (this can
1.87 +be tested for using StyleListPresent()).
1.88 +
1.89 +@param aStyle Pointer to the style to remove from the rich text object. */
1.90 + {NotifyStyleChangedL(NULL,aStyle);}
1.91 +
1.92 +
1.93 +
1.94 +
1.95 +MRichTextStoreResolver* CRichText::StoreResolver()const
1.96 +/** Gets the store resolver. A store resolver may be set during construction, or
1.97 +by calling CRichText::SetPictureFactory().
1.98 +
1.99 +@return The store resolver. This determines which file store the picture is
1.100 +stored in. */
1.101 + {return iStoreResolver;}
1.102 +
1.103 +
1.104 +
1.105 +
1.106 +MPictureFactory* CRichText::PictureFactory()const
1.107 +/** Gets the picture factory. A picture factory may be set during construction,
1.108 +or by calling CRichText::SetPictureFactory().
1.109 +
1.110 +@return The picture factory */
1.111 + {return iPictureFactory;}