1.1 --- a/epoc32/include/txtstyle.inl Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/txtstyle.inl Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,126 @@
1.4 -txtstyle.inl
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 +
1.21 +
1.22 +RParagraphStyleInfo::RParagraphStyleInfo()
1.23 + : iStyle(NULL),iStyleForNextPara(NULL)
1.24 +/** This default C++ constructor is used to construct the object, initializing
1.25 +both style pointers to NULL. */
1.26 + {}
1.27 +
1.28 +RParagraphStyleInfo::RParagraphStyleInfo(CParagraphStyle* aStyle,CParagraphStyle* aStyleForNextPara)
1.29 + : iStyle(aStyle),iStyleForNextPara(aStyleForNextPara)
1.30 +/** The C++ constructor is used to construct the object with a pointer to the style
1.31 +information for the current paragraph and optionally a pointer to the style
1.32 +information for the next paragraph.
1.33 +
1.34 +@param aStyle The style to apply to the current paragraph.
1.35 +@param aStyleForNextPara Optionally, the style to apply to the next paragraph.
1.36 +By default, NULL. */
1.37 + {}
1.38 +
1.39 +
1.40 +
1.41 +void RParagraphStyleInfo::Discard()
1.42 +/** Deletes the style pointer owned by the object. The pointer to the style for
1.43 +the following paragraph is not deleted. */
1.44 + {delete iStyle;}
1.45 +
1.46 +
1.47 +
1.48 +
1.49 +CCharFormatLayer* CParagraphStyle::CharFormatLayer()const
1.50 +/** Gets a pointer to the character format layer owned by the object.
1.51 +
1.52 +Note
1.53 +
1.54 +The style's character formatting is set and retrieved using this pointer.
1.55 +
1.56 +@return Pointer to the style's global character format layer. */
1.57 + {return iCharFormatLayer;}
1.58 +
1.59 +
1.60 +TInt CParagraphStyle::OutlineLevel()const
1.61 +/** Gets the style's outline level.
1.62 +
1.63 +@return The style's outline level. */
1.64 + {return iOutlineLevel;}
1.65 +
1.66 +
1.67 +
1.68 +
1.69 +void CParagraphStyle::SetOutlineLevel(TInt aOutlineLevel)
1.70 +/** Sets the style's outline level.
1.71 +
1.72 +@param aOutlineLevel The style's new outline level. */
1.73 + {iOutlineLevel=aOutlineLevel;}
1.74 +
1.75 +
1.76 +
1.77 +
1.78 +void CParagraphStyle::SetType(TUid aType)
1.79 +/** Sets the style's type UID. On construction, the style's type UID is initialized
1.80 +to KUserDefinedParagraphStyleUid to distinguish it from ordinary paragraph
1.81 +format layers, which have a type of KNormalParagraphStyleUid. This function
1.82 +can be used to change it to another value.
1.83 +
1.84 +@param aType The style's type UID. */
1.85 + {iType=aType;}
1.86 +
1.87 +
1.88 +
1.89 +CParagraphStyle* CParagraphStyle::CloneL()const
1.90 +/** Creates and returns a CParagraphStyle object which is a clone of the current
1.91 +style.
1.92 +
1.93 +@return Pointer to a clone of the current style. */
1.94 + {return STATIC_CAST(CParagraphStyle*,DoCloneL());}
1.95 +
1.96 +
1.97 +
1.98 +
1.99 +const RParagraphStyleInfo& CStyleList::operator[](TInt aIndex)const
1.100 +/** Gets a style from the style list, from its index into the array. Two versions
1.101 +are supplied. The compiler chooses the appropriate version based on the use
1.102 +made of the returned reference. If it is used in an expression where the reference
1.103 +can be modified, then the non-const version is chosen.
1.104 +
1.105 +@param aIndex The index of the style into the list. The first style is at
1.106 +position zero. Must be within the bounds of the array or a panic occurs.
1.107 +@return A const reference to the style at position aIndex in the array.
1.108 +@return A non-const reference to the style at position aIndex in the array. */
1.109 +/** Gets a style from the style list, from its index into the array. Two versions
1.110 +are supplied. The compiler chooses the appropriate version based on the use
1.111 +made of the returned reference. If it is used in an expression where the reference
1.112 +can be modified, then the non-const version is chosen.
1.113 +
1.114 +@param aIndex The index of the style into the list. The first style is at
1.115 +position zero. Must be within the bounds of the array or a panic occurs.
1.116 +@return A const reference to the style at position aIndex in the array.
1.117 +@return A non-const reference to the style at position aIndex in the array. */
1.118 + {return iList->At(aIndex);}
1.119 +
1.120 +
1.121 +RParagraphStyleInfo& CStyleList::operator[](TInt aIndex)
1.122 + {return iList->At(aIndex);}
1.123 +
1.124 +
1.125 +
1.126 +TInt CStyleList::Count()const
1.127 +/** Gets the number of styles in the style list.
1.128 +
1.129 +@return The number of styles in the style list */
1.130 + {return (iList) ? iList->Count() : 0;}