epoc32/include/txtstyle.inl
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
/*
williamr@4
     2
* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     8
*
williamr@4
     9
* Initial Contributors:
williamr@4
    10
* Nokia Corporation - initial contribution.
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
*
williamr@4
    14
* Description: 
williamr@4
    15
*
williamr@4
    16
*/
williamr@4
    17
williamr@2
    18
williamr@2
    19
 
williamr@2
    20
williamr@2
    21
RParagraphStyleInfo::RParagraphStyleInfo()
williamr@2
    22
	: iStyle(NULL),iStyleForNextPara(NULL)
williamr@2
    23
/** This default C++ constructor is used to construct the object, initializing 
williamr@2
    24
both style pointers to NULL. */
williamr@2
    25
	{}
williamr@2
    26
williamr@2
    27
RParagraphStyleInfo::RParagraphStyleInfo(CParagraphStyle* aStyle,CParagraphStyle* aStyleForNextPara)
williamr@2
    28
	: iStyle(aStyle),iStyleForNextPara(aStyleForNextPara)
williamr@2
    29
/** The C++ constructor is used to construct the object with a pointer to the style 
williamr@2
    30
information for the current paragraph and optionally a pointer to the style 
williamr@2
    31
information for the next paragraph.
williamr@2
    32
williamr@2
    33
@param aStyle The style to apply to the current paragraph. 
williamr@2
    34
@param aStyleForNextPara Optionally, the style to apply to the next paragraph. 
williamr@2
    35
By default, NULL. */
williamr@2
    36
	{}
williamr@2
    37
williamr@2
    38
 
williamr@2
    39
williamr@2
    40
void RParagraphStyleInfo::Discard()
williamr@2
    41
/** Deletes the style pointer owned by the object. The pointer to the style for 
williamr@2
    42
the following paragraph is not deleted. */
williamr@2
    43
	{delete iStyle;}
williamr@2
    44
williamr@2
    45
williamr@2
    46
 
williamr@2
    47
williamr@2
    48
CCharFormatLayer* CParagraphStyle::CharFormatLayer()const
williamr@2
    49
/** Gets a pointer to the character format layer owned by the object.
williamr@2
    50
williamr@2
    51
Note
williamr@2
    52
williamr@2
    53
The style's character formatting is set and retrieved using this pointer.
williamr@2
    54
williamr@2
    55
@return Pointer to the style's global character format layer. */
williamr@2
    56
	{return iCharFormatLayer;}
williamr@2
    57
williamr@2
    58
 
williamr@2
    59
TInt CParagraphStyle::OutlineLevel()const
williamr@2
    60
/** Gets the style's outline level.
williamr@2
    61
williamr@2
    62
@return The style's outline level. */
williamr@2
    63
	{return iOutlineLevel;}
williamr@2
    64
williamr@2
    65
williamr@2
    66
 
williamr@2
    67
williamr@2
    68
void CParagraphStyle::SetOutlineLevel(TInt aOutlineLevel)
williamr@2
    69
/** Sets the style's outline level.
williamr@2
    70
williamr@2
    71
@param aOutlineLevel The style's new outline level. */
williamr@2
    72
	{iOutlineLevel=aOutlineLevel;}
williamr@2
    73
williamr@2
    74
williamr@2
    75
 
williamr@2
    76
williamr@2
    77
void CParagraphStyle::SetType(TUid aType)
williamr@2
    78
/** Sets the style's type UID. On construction, the style's type UID is initialized 
williamr@2
    79
to KUserDefinedParagraphStyleUid to distinguish it from ordinary paragraph 
williamr@2
    80
format layers, which have a type of KNormalParagraphStyleUid. This function 
williamr@2
    81
can be used to change it to another value.
williamr@2
    82
williamr@2
    83
@param aType The style's type UID. */
williamr@2
    84
	{iType=aType;}
williamr@2
    85
williamr@2
    86
williamr@2
    87
 
williamr@2
    88
CParagraphStyle* CParagraphStyle::CloneL()const
williamr@2
    89
/** Creates and returns a CParagraphStyle object which is a clone of the current 
williamr@2
    90
style.
williamr@2
    91
williamr@2
    92
@return Pointer to a clone of the current style. */
williamr@2
    93
	{return STATIC_CAST(CParagraphStyle*,DoCloneL());}
williamr@2
    94
williamr@2
    95
williamr@2
    96
 
williamr@2
    97
williamr@2
    98
const RParagraphStyleInfo& CStyleList::operator[](TInt aIndex)const
williamr@2
    99
/** Gets a style from the style list, from its index into the array. Two versions 
williamr@2
   100
are supplied. The compiler chooses the appropriate version based on the use 
williamr@2
   101
made of the returned reference. If it is used in an expression where the reference 
williamr@2
   102
can be modified, then the non-const version is chosen.
williamr@2
   103
williamr@2
   104
@param aIndex The index of the style into the list. The first style is at 
williamr@2
   105
position zero. Must be within the bounds of the array or a panic occurs. 
williamr@2
   106
@return A const reference to the style at position aIndex in the array. 
williamr@2
   107
@return A non-const reference to the style at position aIndex in the array. */
williamr@2
   108
/** Gets a style from the style list, from its index into the array. Two versions 
williamr@2
   109
are supplied. The compiler chooses the appropriate version based on the use 
williamr@2
   110
made of the returned reference. If it is used in an expression where the reference 
williamr@2
   111
can be modified, then the non-const version is chosen.
williamr@2
   112
williamr@2
   113
@param aIndex The index of the style into the list. The first style is at 
williamr@2
   114
position zero. Must be within the bounds of the array or a panic occurs. 
williamr@2
   115
@return A const reference to the style at position aIndex in the array. 
williamr@2
   116
@return A non-const reference to the style at position aIndex in the array. */
williamr@2
   117
	{return iList->At(aIndex);}
williamr@2
   118
williamr@2
   119
williamr@2
   120
RParagraphStyleInfo& CStyleList::operator[](TInt aIndex)
williamr@2
   121
	{return iList->At(aIndex);}
williamr@2
   122
williamr@2
   123
 
williamr@2
   124
williamr@2
   125
TInt CStyleList::Count()const
williamr@2
   126
/** Gets the number of styles in the style list.
williamr@2
   127
williamr@2
   128
@return The number of styles in the style list */
williamr@2
   129
	{return (iList) ? iList->Count() : 0;}