epoc32/include/txtstyle.inl
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     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  
    17 
    18 RParagraphStyleInfo::RParagraphStyleInfo()
    19 	: iStyle(NULL),iStyleForNextPara(NULL)
    20 /** This default C++ constructor is used to construct the object, initializing 
    21 both style pointers to NULL. */
    22 	{}
    23 
    24 RParagraphStyleInfo::RParagraphStyleInfo(CParagraphStyle* aStyle,CParagraphStyle* aStyleForNextPara)
    25 	: iStyle(aStyle),iStyleForNextPara(aStyleForNextPara)
    26 /** The C++ constructor is used to construct the object with a pointer to the style 
    27 information for the current paragraph and optionally a pointer to the style 
    28 information for the next paragraph.
    29 
    30 @param aStyle The style to apply to the current paragraph. 
    31 @param aStyleForNextPara Optionally, the style to apply to the next paragraph. 
    32 By default, NULL. */
    33 	{}
    34 
    35  
    36 
    37 void RParagraphStyleInfo::Discard()
    38 /** Deletes the style pointer owned by the object. The pointer to the style for 
    39 the following paragraph is not deleted. */
    40 	{delete iStyle;}
    41 
    42 
    43  
    44 
    45 CCharFormatLayer* CParagraphStyle::CharFormatLayer()const
    46 /** Gets a pointer to the character format layer owned by the object.
    47 
    48 Note
    49 
    50 The style's character formatting is set and retrieved using this pointer.
    51 
    52 @return Pointer to the style's global character format layer. */
    53 	{return iCharFormatLayer;}
    54 
    55  
    56 TInt CParagraphStyle::OutlineLevel()const
    57 /** Gets the style's outline level.
    58 
    59 @return The style's outline level. */
    60 	{return iOutlineLevel;}
    61 
    62 
    63  
    64 
    65 void CParagraphStyle::SetOutlineLevel(TInt aOutlineLevel)
    66 /** Sets the style's outline level.
    67 
    68 @param aOutlineLevel The style's new outline level. */
    69 	{iOutlineLevel=aOutlineLevel;}
    70 
    71 
    72  
    73 
    74 void CParagraphStyle::SetType(TUid aType)
    75 /** Sets the style's type UID. On construction, the style's type UID is initialized 
    76 to KUserDefinedParagraphStyleUid to distinguish it from ordinary paragraph 
    77 format layers, which have a type of KNormalParagraphStyleUid. This function 
    78 can be used to change it to another value.
    79 
    80 @param aType The style's type UID. */
    81 	{iType=aType;}
    82 
    83 
    84  
    85 CParagraphStyle* CParagraphStyle::CloneL()const
    86 /** Creates and returns a CParagraphStyle object which is a clone of the current 
    87 style.
    88 
    89 @return Pointer to a clone of the current style. */
    90 	{return STATIC_CAST(CParagraphStyle*,DoCloneL());}
    91 
    92 
    93  
    94 
    95 const RParagraphStyleInfo& CStyleList::operator[](TInt aIndex)const
    96 /** Gets a style from the style list, from its index into the array. Two versions 
    97 are supplied. The compiler chooses the appropriate version based on the use 
    98 made of the returned reference. If it is used in an expression where the reference 
    99 can be modified, then the non-const version is chosen.
   100 
   101 @param aIndex The index of the style into the list. The first style is at 
   102 position zero. Must be within the bounds of the array or a panic occurs. 
   103 @return A const reference to the style at position aIndex in the array. 
   104 @return A non-const reference to the style at position aIndex in the array. */
   105 /** Gets a style from the style list, from its index into the array. Two versions 
   106 are supplied. The compiler chooses the appropriate version based on the use 
   107 made of the returned reference. If it is used in an expression where the reference 
   108 can be modified, then the non-const version is chosen.
   109 
   110 @param aIndex The index of the style into the list. The first style is at 
   111 position zero. Must be within the bounds of the array or a panic occurs. 
   112 @return A const reference to the style at position aIndex in the array. 
   113 @return A non-const reference to the style at position aIndex in the array. */
   114 	{return iList->At(aIndex);}
   115 
   116 
   117 RParagraphStyleInfo& CStyleList::operator[](TInt aIndex)
   118 	{return iList->At(aIndex);}
   119 
   120  
   121 
   122 TInt CStyleList::Count()const
   123 /** Gets the number of styles in the style list.
   124 
   125 @return The number of styles in the style list */
   126 	{return (iList) ? iList->Count() : 0;}