epoc32/include/txtfrmat.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
williamr@2
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     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
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
williamr@2
    17
TBool TTabStop::operator!=(const TTabStop& aTabStop)const
williamr@2
    18
/** Compares two tab stops for inequality. They are different if the twips 
williamr@2
    19
position or alignment is different.
williamr@2
    20
williamr@2
    21
@param aTabStop The tab stop to compare with the current tab stop 
williamr@2
    22
@return ETrue if the objects' twips position or alignment differs. EFalse if 
williamr@2
    23
equal. */
williamr@2
    24
	{return !(*this==aTabStop);}
williamr@2
    25
williamr@2
    26
williamr@2
    27
TBool TParaBorder::operator!=(const TParaBorder& aParaBorder)const
williamr@2
    28
/**  Compares two paragraph border sides for inequality. Two paragraph border 
williamr@2
    29
sides are different if any of their data members are different.
williamr@2
    30
williamr@2
    31
@param aBorder The paragraph border to compare with the current border.
williamr@2
    32
@return ETrue if the two paragraph border sides are different, 
williamr@2
    33
EFalse if not. */
williamr@2
    34
	{return !(*this==aParaBorder);}
williamr@2
    35
williamr@2
    36
 
williamr@2
    37
TBool TBullet::operator!=(const TBullet& aBullet)const
williamr@2
    38
/** Compares two bullet points for inequality. Two bullet points are unequal if 
williamr@2
    39
any of their data members are different.
williamr@2
    40
williamr@2
    41
@param aBullet The bullet point to compare. 
williamr@2
    42
@return ETrue if the two bullet points are different, EFalse if not. */
williamr@2
    43
	{return !(*this==aBullet);}
williamr@2
    44
williamr@2
    45
williamr@2
    46
 
williamr@2
    47
void CParaFormat::RemoveAllTabs()
williamr@2
    48
/** Removes all tab stops from the object. */
williamr@2
    49
	{
williamr@2
    50
	if (iTabList)
williamr@2
    51
		{
williamr@2
    52
		delete iTabList;
williamr@2
    53
		iTabList = NULL;
williamr@2
    54
		}
williamr@2
    55
	}
williamr@2
    56
williamr@2
    57
 
williamr@2
    58
TInt CParaFormat::TabCount()const
williamr@2
    59
/** Gets a count of the total number of tab stops in the object's tab list. If 
williamr@2
    60
the object has no tab list, returns zero.
williamr@2
    61
williamr@2
    62
@return The number of tab stops. */
williamr@2
    63
	{return (iTabList)?iTabList->Count():0;}
williamr@2
    64
williamr@2
    65
williamr@2
    66
 
williamr@2
    67
williamr@2
    68
TParaFormatMask::TParaFormatMask()
williamr@2
    69
	:iGuard(0)
williamr@2
    70
/** The default C++ constructor constructs a paragraph format mask, initialising 
williamr@2
    71
all bits to zero. */
williamr@2
    72
	{}
williamr@2
    73
williamr@2
    74
 
williamr@2
    75
void TParaFormatMask::SetAttrib(TTextFormatAttribute aAttribute)
williamr@2
    76
/** Sets a single attribute flag in the paragraph format mask.
williamr@2
    77
williamr@2
    78
@param aAttribute The attribute flag to set. */
williamr@2
    79
	{iGuard|=(1<<aAttribute);}
williamr@2
    80
williamr@2
    81
 
williamr@2
    82
williamr@2
    83
void TParaFormatMask::ClearAttrib(TTextFormatAttribute aAttribute)
williamr@2
    84
/** Clears a single attribute flag in the paragraph format mask.
williamr@2
    85
williamr@2
    86
@param aAttribute The attribute flag to clear. */
williamr@2
    87
	{iGuard&=~(1<<aAttribute);}
williamr@2
    88
williamr@2
    89
 
williamr@2
    90
williamr@2
    91
TBool TParaFormatMask::AttribIsSet(TTextFormatAttribute aAttribute)const
williamr@2
    92
/** Tests whether an attribute flag is set.
williamr@2
    93
williamr@2
    94
@param aAttribute The paragraph format attribute to test for. 
williamr@2
    95
@return ETrue if the flag is set, EFalse if not. */
williamr@2
    96
	{return (iGuard&(1<<aAttribute));}
williamr@2
    97
williamr@2
    98
 
williamr@2
    99
williamr@2
   100
TBool TParaFormatMask::IsNull()const
williamr@2
   101
/** Tests whether the mask is NULL, indicating that no flags have been set.
williamr@2
   102
williamr@2
   103
@return ETrue if mask is NULL, EFalse if not NULL. */
williamr@2
   104
	{return !iGuard;}
williamr@2
   105
williamr@2
   106
 
williamr@2
   107
TBool TParaFormatMask::operator!=(const TParaFormatMask& aMask)const
williamr@2
   108
/** Compares two paragraph format masks for inequality.
williamr@2
   109
williamr@2
   110
@param aMask The mask to compare. 
williamr@2
   111
@return ETrue if any flags are different. EFalse if all flags are the same. */
williamr@2
   112
	{return !(*this==aMask);}
williamr@2
   113
williamr@2
   114
williamr@2
   115
 
williamr@2
   116
williamr@2
   117
TCharFormatMask::TCharFormatMask()
williamr@2
   118
	:iGuard(0)
williamr@2
   119
/** The default C++ constructor constructs a character format mask, initialising 
williamr@2
   120
all bits to zero. */
williamr@2
   121
	{}
williamr@2
   122
williamr@2
   123
 
williamr@2
   124
williamr@2
   125
void TCharFormatMask::SetAttrib(TTextFormatAttribute aAttribute)
williamr@2
   126
/** Sets a single attribute flag in the character format mask.
williamr@2
   127
williamr@2
   128
@param aAttribute The attribute flag to set. */
williamr@2
   129
	{iGuard|=(1<<((aAttribute-KMaxParaAttributes)-1));}
williamr@2
   130
williamr@2
   131
 
williamr@2
   132
void TCharFormatMask::ClearAttrib(TTextFormatAttribute aAttribute)
williamr@2
   133
/** Clears a single attribute flag in the character format mask.
williamr@2
   134
williamr@2
   135
@param aAttribute The attribute flag to clear. */
williamr@2
   136
	{iGuard&=~(1<<((aAttribute-KMaxParaAttributes)-1));}
williamr@2
   137
williamr@2
   138
 
williamr@2
   139
williamr@2
   140
TBool TCharFormatMask::AttribIsSet(TTextFormatAttribute aAttribute)const
williamr@2
   141
/** Tests whether an attribute flag is set.
williamr@2
   142
williamr@2
   143
@param aAttribute The character format attribute to test for. 
williamr@2
   144
@return ETrue if the flag is set, EFalse if not. */
williamr@2
   145
	{return iGuard&(1<<((aAttribute-KMaxParaAttributes)-1));}
williamr@2
   146
williamr@2
   147
 
williamr@2
   148
TBool TCharFormatMask::IsNull()const
williamr@2
   149
/** Tests whether the mask is NULL, indicating that no flags have been set.
williamr@2
   150
williamr@2
   151
@return ETrue if mask is NULL, EFalse if not NULL. */
williamr@2
   152
	{return !iGuard;}
williamr@2
   153
williamr@2
   154
 
williamr@2
   155
TBool TCharFormatMask::operator!=(const TCharFormatMask& aMask)const
williamr@2
   156
/** Compares two paragraph format masks for inequality.
williamr@2
   157
williamr@2
   158
@param aMask The mask to compare. 
williamr@2
   159
@return ETrue if any flags are different. EFalse if all flags are the same. */
williamr@2
   160
	{return !(*this==aMask);}